Log concepts
Closed this issue · 1 comments
andrewkcorcoran commented
Is it possible for binlog to support adapting a C++20 concept to avoid having the base type being adapted by the user?
erenon commented
Do you mean this?
template<typename T>
concept Stringable = requires(T a)
{
{ a.str() } -> std::convertible_to<std::string>;
};
BINLOG_ADAPT_CONCEPT(Stringable, str)
int main()
{
std::ostringstream s;
s << "foo";
BINLOG_INFO("{}", s);
}