title: Inheriting classes from std::
body: <p>There are many similar questions and I found both pro and against reasons to use this pattern so I am asking this here:</p>
  
  <p>I need to make a JSON implementation in C++ (let's say that it is sort of like a homework). I was thinking to do it like this:</p>
  
  <pre><code>namespace JSON {
    class JSON { };
    class object : public JSON, public std::unordered_map&lt;std::string,JSON&gt; { };
    class vector : public JSON, public std::vector&lt;JSON&gt; { };
    class string : public JSON, public std::string { };
    ...
  };
  </code></pre>
  
  <p>If you think about it, it all make sense. The JSON object "is-an" unordered_map, the JSON vector "is-a" vector and so on. Just that they are also a JSON value and, for example, a JSON vector can contain any type of JSON values (objects, vectors, strings etc.). You get a lot of benefits too, you can then just use the JSON "naturally" in C++ (you can have an actual std::string vector inside json["mystringlist"], json being actually an unordered_map).</p>
  
  <p>I am not really a C++ expert but is there any specific reason why not to do this?</p>