How can I test if a member type exists in a concept template argument, i.e. for typename Container
, test for Container::reverse_iterator
? What's the proper requires-clause ?
We do this with the aptly named type requirement:
template<class Container>
concept has_reverse_iterator = requires {
typename Container::reverse_iterator;
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With