MySQL 9.6.0
Source Code Documentation
mysql::meta::Is_stringlike Concept Reference

True if Test has a data() member function that returns char, unsigned char, or std::byte, and has a size() member functions returning std::size_t. More...

#include <is_charlike.h>

Concept definition

template<class Test>
concept mysql::meta::Is_stringlike = requires(Test stringlike) {
{ *stringlike.data() } -> Is_charlike;
{ stringlike.size() } -> std::same_as<std::size_t>;
}
True if Test has a data() member function that returns char, unsigned char, or std::byte,...
Definition: is_charlike.h:68

Detailed Description

True if Test has a data() member function that returns char, unsigned char, or std::byte, and has a size() member functions returning std::size_t.

This is useful to define APIs that take a "string", uses only the data and size members, and don't care if it is represented as std::string, std::string_view, or something else that has these members.