From 84557dc6d998d0611f4411ff1a62e44d00852846 Mon Sep 17 00:00:00 2001 From: Nahuel Espinosa Date: Tue, 7 Mar 2023 23:49:24 -0300 Subject: [PATCH 1/2] Hide CRTP usage from the user Signed-off-by: Nahuel Espinosa --- include/ciabatta/ciabatta.hpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/include/ciabatta/ciabatta.hpp b/include/ciabatta/ciabatta.hpp index 9165f65..fd42de7 100644 --- a/include/ciabatta/ciabatta.hpp +++ b/include/ciabatta/ciabatta.hpp @@ -61,16 +61,21 @@ struct chain_inherit { template class... Mixins> using mixin_impl = typename chain_inherit, Mixins...>::type; - -} // namespace detail - + template class... Mixins> -struct mixin : ::ciabatta::detail::mixin_impl { +struct mixin_base : ::ciabatta::detail::mixin_impl { template - constexpr mixin(Rest&&... rest) + constexpr mixin_base(Rest&&... rest) : ::ciabatta::detail::mixin_impl( static_cast(rest)...) {} +}; + +} // namespace detail +template