• Eugene @Eugene-Kolesnikov ·

    Example of an error:

    <source>:179:19: error: static assertion failed due to requirement 'StringLiteral<6>{{"Hello"}}.string_view().size() < 2'
      179 |     static_assert(name.string_view().size() < 2);
          |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    <source>:182:21: note: in instantiation of template class 'TestStruct<StringLiteral<6UL>{{"Hello"}}>' requested here
      182 | TestStruct<"Hello"> ts;
          |                     ^
    <source>:179:45: note: expression evaluates to '5 < 2'
      179 |     static_assert(name.string_view().size() < 2);
          |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
    1 error generated.
    Compiler returned: 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment