title: Need to have empty string as a template parameter
body: <p>I want to have a class that stores a pair of variables of different types, but I need to pass the zero or null defaults for the variables as template parameters. I can do so for int or doubles, but how do I do so for string? I know that that c++ currently does not have string parameters, but what are the laternative designs. I need something like this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  template &lt;typename atype, typename btype, atype anull, btype bnull&gt;
  class simpleClass {
  public:
      atype       var1;
      btype       var2;
  
      simpleClass&lt;atype, btype, anull, bnull&gt;   *parent;          // pointer to parent node
  
      simpleClass(); ~simpleClass();
  };
  template &lt;typename atype, typename btype, atype anull, btype bnull&gt;
  simpleClass&lt;atype, btype, anull, bnull&gt;::simpleClass()  {   var1 = anull; var2 = bnull; 
                          parent  = NULL;  }
  template &lt;typename atype, typename btype, atype anull, btype bnull&gt;
  simpleClass&lt;atype, btype, anull, bnull&gt;::~simpleClass() {}
  
  
  int main() {
      simpleClass&lt;string, int, "", 0&gt; obj;
      obj.var1 = "hello";
      obj.var2 = 45;
      cout &lt;&lt; obj.var2;
      return 0;
  }
  </code></pre>
  
  <p>compiling this, I get</p>
  
  <pre><code>error: ‘struct std::string’ is not a valid type for a template constant parameter
  </code></pre>