title: Can you statically assert that object can be converted to a certain type?
body: <p>I'm currently working on a console GUI library for C++11 just to ease some debugging and stuff.</p>
  <p>For a certain class that templates, I want to make sure I can convert the templated type to string before I print it.</p>
  <h2>Example:</h2>
  <pre><code>template&lt;typename T&gt;
  class listbox {
  private:
      std::vector&lt;T&gt; list;
      [...]
  
  public:
      std::string print_item(T&amp; item) { /* static_assert() here */}
  }
  </code></pre>
  <p>So in the &quot;Static Assert&quot; part I want to check if I can convert an item to <code>std::string</code> (or <code>const char*</code> would work as well), so really the question is simple, how do I assert a conversion from a templated type?</p>
  <p>I know the compiler/ide would react to types not being able recognize it,
  but I need a fixed type there to be able to have more control of the string.</p>