-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for logging various templated classes #155
Comments
The closest I got is:
I'm unable to create a specialization (for CustomTag/CustomSerializer) for a nested template of a template:
|
In an ideal situation it would be great to be able to adapt without having to know the template specialisations |
Also we might want to add a requirement to support nested concepts e.g. template<SomeConcept T>
struct S
{
struct S2{};
template<typename U>
concept C = requires(U u)
{...};
};
BINLOG_ADAPT(S<T>);
BINLOG_ADAPT(S<T>::S2);
BINLOG_ADAPT(S<T>::C<U>); |
Would you be interested in a solution (based on ADL) that requires adding a symbol to the namespace of the type that is being made loggable? Perhaps we can create something like: namespace lib {
template<SomeConcept T>
struct S
{
struct S2{};
template<typename U>
concept C = requires(U u)
{...};
};
template <SomeConcept T, typename U>
void binlog_serializer(S<T>::C<U>) -> SomeSerializer<S<T>::C<U>>;
// ^^^-- this could be produced by a macro
} // namespace lib (Also a question for #153) |
Yea I think that would work for our case. |
Such as below. If you control the classes you can have workarounds but if you want to log a class owned by non user code something more is required.
The text was updated successfully, but these errors were encountered: