I'm new to concepts. As far as I understand it the concept library lists all the available std concepts. Yet there seems nothing like std::decay? Compare the following general use case where I want to restrict the input to a method to the class specialization type:
#include <type_traits>
#include <concepts>
template <typename T>
struct some_struct
{
template <typename U, typename = std::enable_if_t<std::is_same_v<std::decay_t<U>, T>>>
void do_something(U obj) {
return ;
}
};
int main()
{
some_struct<int> obj;
obj.do_something(0);
}
How can I accomplish this with concepts?