title: New C++ Mongo driver: how to see type and how to get string value
body: <p>I've got two questions that I cannot find an answer for in the tutorial.</p>
  
  <p>I get a document and then an element from the doc like this:</p>
  
  <pre><code>        bsoncxx::document::element e = doc["id"];
  
          if (!e || e.type() != bsoncxx::type::k_int32) return ERROR;
          int id = e.get_int32();
  </code></pre>
  
  <p>Is there a way to get a string value for the type, for debugging purposes?
  Like:</p>
  
  <pre><code>        std::cout &lt;&lt; e.type() &lt;&lt; std::endl;
  </code></pre>
  
  <p>(which doesn't work)</p>
  
  <p>The second question is how to convert the utf8 type value into a std::string.
  This doesn't work:</p>
  
  <pre><code>        e = doc["name"];
          if (!e || e.type() != bsoncxx::type::k_utf8) return ERROR;
          string name = e.get_utf8().value;
  </code></pre>
  
  <p>Any tips?</p>