From: Wolfgang Bangerth Date: Thu, 27 Jan 2022 00:15:26 +0000 (-0700) Subject: Move a few generic names into a namespace that explains what things refer to. X-Git-Tag: v9.4.0-rc1~553^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77fabf47e1c5970457f48493307784f4ca009e3b;p=dealii.git Move a few generic names into a namespace that explains what things refer to. --- diff --git a/include/deal.II/base/template_constraints.h b/include/deal.II/base/template_constraints.h index 4f6efbbd86..3d9673bf6d 100644 --- a/include/deal.II/base/template_constraints.h +++ b/include/deal.II/base/template_constraints.h @@ -31,51 +31,58 @@ DEAL_II_NAMESPACE_OPEN // Fundamentals, ISO/IEC TS 19568:2017 namespace internal { - template - using void_t = void; - - // base class for nonesuch to inherit from so it is not an aggregate - struct nonesuch_base - {}; - - // primary template handles all types not supporting the archetypal Op - template - class Op, - class... /*Args*/> - struct detector + namespace SupportsOperation { - using value_t = std::false_type; - using type = Default; - }; + template + using void_t = void; + + // base class for nonesuch to inherit from so it is not an aggregate + struct nonesuch_base + {}; + + // primary template handles all types not supporting the archetypal Op + template + class Op, + class... /*Args*/> + struct detector + { + using value_t = std::false_type; + using type = Default; + }; - // specialization recognizes and handles only types supporting Op - template class Op, class... Args> - struct detector>, Op, Args...> - { - using value_t = std::true_type; - using type = Op; - }; + // specialization recognizes and handles only types supporting Op + template class Op, class... Args> + struct detector>, Op, Args...> + { + using value_t = std::true_type; + using type = Op; + }; - struct nonesuch : private internal::nonesuch_base - { - ~nonesuch() = delete; - nonesuch(nonesuch const &) = delete; - void - operator=(nonesuch const &) = delete; - }; + struct nonesuch : private nonesuch_base + { + ~nonesuch() = delete; + nonesuch(nonesuch const &) = delete; + void + operator=(nonesuch const &) = delete; + }; + + } // namespace SupportsOperation template class Op, class... Args> - using detected_or = internal::detector; + using detected_or = + internal::SupportsOperation::detector; template