what's the best way to define a concept with a nested concept requirements for a data member of the type? Something along these lines:
template<typename T>
concept MyConcept = requires(T a) {
{a.something} -> std::integral;
};
This doesn't work because a.something is picked up as a reference (delctype((a.something))). The best I came up with that works is something like this that forces an rvalue:
constexpr auto copy = [](auto value) { return value; };
template<typename T>
concept MyConcept = requires(T a) {
{copy(a.something)} -> std::integral;
};
Do I have any better options?