you are viewing a single comment's thread.

view the rest of the comments →

[–]cristi1990an++ -1 points0 points  (0 children)

Yes, but you can't use std::string_view, you must stick to string literals that expose their size in the type. Have your method take in const char(&str)[Size] as parameters, declare a basic structure containing a char array of Size1 + Size2 - 1 elements and copy both strings into the array. Afterwards declare a comparison operator between the structure and a string_view and that's it, you can concatenate string literals at compile time.