import ; import ; template concept Printable = requires(T a) { std::cout << a; }; void printIt(const Printable auto& p) { std::cout << p; } struct MyType {}; int main() { using namespace std::string_literals; printIt("Hello Modern World!\n"); // ok, const char* string is printable printIt("Hello Modern World!\n"s); // ok, std::string literal is printable printIt(42); // ok, int is printable // printIt(MyType{}); // error: doesn't adhere to Printable concept }