diff --git a/include/boost/openmethod/policies.hpp b/include/boost/openmethod/policies.hpp index 18b3be4..39c7451 100644 --- a/include/boost/openmethod/policies.hpp +++ b/include/boost/openmethod/policies.hpp @@ -7,7 +7,6 @@ #define BOOST_OPENMETHOD_POLICY_HPP #include - #include #include #include diff --git a/include/boost/openmethod/policies/basic_policy.hpp b/include/boost/openmethod/policies/basic_policy.hpp index 2b047e1..1139158 100644 --- a/include/boost/openmethod/policies/basic_policy.hpp +++ b/include/boost/openmethod/policies/basic_policy.hpp @@ -21,6 +21,18 @@ namespace detail { using class_catalog = detail::static_list; using method_catalog = detail::static_list; +template +struct fork_facet { + using type = Facet; +}; + +template< + typename NewPolicy, typename OldPolicy, + template class GenericFacet, typename... Args> +struct fork_facet> { + using type = GenericFacet; +}; + } // namespace detail namespace policies { @@ -55,12 +67,6 @@ struct error_output : facet {}; struct trace_output : facet {}; struct runtime_checks : facet {}; -// ----------------------------------------------------------------------------- -// Facet implementations - -struct debug; -struct release; - // ----------------------------------------------------------------------------- // domain @@ -86,18 +92,6 @@ vptr_type domain::static_vptr; template std::vector domain::dispatch_data; -template -struct rebind_facet { - using type = Facet; -}; - -template< - typename NewPolicy, typename OldPolicy, - template class GenericFacet, typename... Args> -struct rebind_facet> { - using type = GenericFacet; -}; - template struct basic_policy : abstract_policy, domain, Facets... { using facets = mp11::mp_list; @@ -107,7 +101,7 @@ struct basic_policy : abstract_policy, domain, Facets... { template using fork = basic_policy< - NewPolicy, typename rebind_facet::type...>; + NewPolicy, typename detail::fork_facet::type...>; template using add = basic_policy; diff --git a/test/test_core.cpp b/test/test_core.cpp index 3c261f8..1a5d45c 100644 --- a/test/test_core.cpp +++ b/test/test_core.cpp @@ -306,7 +306,7 @@ struct key2; struct alt_rtti {}; static_assert( - std::is_same_v>::type, domain>); + std::is_same_v>::type, domain>); struct policy1 : basic_policy {}; struct policy2 : policy1::fork {};