The following code is fine
std::bitset<24> foo;
static_assert( std::same_as<std::bitset<24>,std::bitset<foo.size( )>> )
Note the use of foo.size( ) which is a constexpr function. So why does the following not work
template <typename T> concept is_std_bitset = requires( T t )
{
requires std::same_as<T,std::bitset<t.size( )>>;
};
static_assert( is_std_bitset<std::bitset<24>> ) // This fails
It seem like the t.size( ) is not valid in the concept. Is this a generic limitation of concept definitions and if so is there a good way round it?