title: Is std::string a literal type?
body: <p><a href="https://en.cppreference.com/w/cpp/named_req/LiteralType" rel="nofollow noreferrer">https://en.cppreference.com/w/cpp/named_req/LiteralType</a></p>
  <p>Here they write that</p>
  <blockquote>
  <p>Literal types are the types of constexpr variables</p>
  </blockquote>
  <p>However it seems to me that I can't define a constexpr <code>string</code> (it doesn't matter if it has static storage duration or is just a stack-allocated constexpr var).</p>
  <p>But there are the requirements for literal types:</p>
  <blockquote>
  <p>A literal type is any of the following:</p>
  <ul>
  <li>possibly cv-qualified class type that has all of the following properties:
  <ul>
  <li>has a [trivial (until C++20) | constexpr (since C++20)] destructor,</li>
  <li>is one of
  <ul>
  <li>a type with at least one constexpr (possibly template) constructor that is not a copy or move constructor,</li>
  </ul>
  </li>
  </ul>
  </li>
  </ul>
  </blockquote>
  <p>Does <code>std::string</code> satisfy these requirements? Or does it maybe fast a non-conformant destructor?</p>
  <p>There seems to be no link to the dtor here <a href="https://en.cppreference.com/w/cpp/string/basic_string" rel="nofollow noreferrer">https://en.cppreference.com/w/cpp/string/basic_string</a>.</p>
  <p>I understand that it can't be made fully constexpr (at least for now) because of free store allocation.</p>
  <p>I'm just asking whether it is a literal type.</p>