I'm playing with concepts and expected std::is_equality_comparable to work for vector but it does not.
#include <type_traits>
#include <vector>
#include <concepts>
struct X {};
template<std::equality_comparable T>
bool foo( T v){
return v == v;
}
int main()
{
foo(10);
foo(std::vector<X>{});
}
the compile error fails inside foo
rather than at the function boundary protected by the concept.
Is this a bug or expected behaviour?