diff --git a/include/anyany/anyany.hpp b/include/anyany/anyany.hpp index 4e78e28..bdab378 100644 --- a/include/anyany/anyany.hpp +++ b/include/anyany/anyany.hpp @@ -217,11 +217,17 @@ template struct exist_for { private: template - static auto check_fn(int) -> decltype(Method::template do_invoke, std::true_type{}); + static auto check_fn(int) -> decltype(Method::template do_invoke, std::true_type{}) { + throw; + } template // for pseudomethods, must be consteval fn - static auto check_fn(bool) -> decltype(Method{}.template do_value(), std::true_type{}); + static auto check_fn(bool) -> decltype(Method{}.template do_value(), std::true_type{}) { + throw; + } template - static auto check_fn(...) -> std::false_type; + static auto check_fn(...) -> std::false_type { + throw; + } public: static constexpr inline bool value = (decltype(check_fn, Methods>(0))::value && ...); @@ -316,9 +322,13 @@ struct copy_method { namespace noexport { -auto get_any_copy_method(type_list<>) -> void; +auto get_any_copy_method(type_list<>) -> void { + throw; +} template -auto get_any_copy_method(type_list, Tail...>) -> copy_method; +auto get_any_copy_method(type_list, Tail...>) -> copy_method { + throw; +} template auto get_any_copy_method(type_list) { return get_any_copy_method(type_list{}); @@ -514,9 +524,13 @@ namespace noexport { // searches for ::type, // if no ::type, then Plugin itself used template -auto select_plugin(int) -> typename Plugin::type; +auto select_plugin(int) -> typename Plugin::type { + throw; +} template -auto select_plugin(...) -> Plugin; +auto select_plugin(...) -> Plugin { + throw; +} } // namespace noexport diff --git a/include/anyany/noexport/anyany_details.hpp b/include/anyany/noexport/anyany_details.hpp index aaa64d7..dee7b30 100644 --- a/include/anyany/noexport/anyany_details.hpp +++ b/include/anyany/noexport/anyany_details.hpp @@ -187,7 +187,9 @@ template struct AA_MSVC_EBO inheritor_of : Ts... {}; template -auto inherit_without_duplicates(type_list<>, type_list) -> inheritor_of; +auto inherit_without_duplicates(type_list<>, type_list) -> inheritor_of { + throw; +} template auto inherit_without_duplicates(type_list, type_list l) { @@ -212,12 +214,18 @@ struct type_identity { }; template -auto get_method_signature(int) -> type_identity; +auto get_method_signature(int) -> type_identity { + throw; +} template auto get_method_signature(bool) - -> type_identity)>>; + -> type_identity)>> { + throw; +} template -auto get_method_signature(...) -> type_identity; +auto get_method_signature(...) -> type_identity { + throw; +} template using signature_t = typename decltype(get_method_signature(0))::type; @@ -327,7 +335,9 @@ constexpr bool contains_second_layer_list(aa::type_list) { } template