NilFoundation / crypto3-pubkey

Public key cryptography for crypto3 cryptography backend
MIT License
0 stars 3 forks source link

has_static_member_data_context<> template is missing #27

Closed JasonCoombs closed 2 years ago

JasonCoombs commented 2 years ago

https://github.com/NilFoundation/crypto3-pubkey/blob/88d0a13745815185256eefffc378e5ee40e84352/include/nil/crypto3/pubkey/type_traits.hpp#L44

this template must have existed in the past?

JasonCoombs commented 2 years ago

Found the answer:

there is no static member named "context" so BOOST doesn't generate the has_static_member_data_context<> metafunction template.

BOOST_TTI_HAS_STATIC_MEMBER_DATA(context)

https://www.boost.org/doc/libs/1_73_0/libs/tti/doc/html/BOOST_TT_idm46513446631776.html

Example:

        BOOST_TTI_HAS_STATIC_MEMBER_DATA(context)
        template<typename T>
        struct is_eddsa_params {
            static constexpr bool value = has_static_member_data_context<T, const typename T::context_type>::value;
            typedef T type;
        };
JasonCoombs commented 2 years ago

suggestion for style improvement in crypto3: when using BOOST macros like this one, do not leave a blank line between the macro and the template that depends on the macro.