4 ms·
The concept version here would look like: template<typename T> concept WesternishName = requires (T t) { { t.firstName } -> convertible_to<strin
by jcelerier 4y ago
The concept version here would look like:
template<typename T>
concept WesternishName = requires (T t) {
{ t.firstName } -> convertible_to<string>;
{ t.lastName } -> convertible_to<string>;
};
auto concatenate(WesternishName auto t) { return t.firstName + " " + t.lastName; }