I would like to check if a certain type can be used with std::format.
This is my naive attempt:
template<typename Object>
concept formattable = requires(const Object & obj)
{
std::format("{}", obj);
};
But this does not work. It basically returns true for all types. Even those that can't be used with std::format.
static_assert(!formattable<std::vector<int>>); // should return false
Why doesn't it work?