14#if qCompilerAndStdLib_template_Requires_constraint_not_treated_constexpr_Buggy
15 template <
typename FUNCTION_SIGNATURE>
16 template <
typename CTOR_FUNC_SIG, enable_if_t<is_convertible_v<remove_cvref_t<CTOR_FUNC_SIG>, function<FUNCTION_SIGNATURE>> and
17 not derived_from<remove_cvref_t<CTOR_FUNC_SIG>, Function<FUNCTION_SIGNATURE>>>*>
19 : fFun_{forward<CTOR_FUNC_SIG> (f)}
20 , fOrdering_{fFun_ == nullptr ? OrderingType_{} : ++Private_::sFunctionObjectNextPtrID_}
22 Assert ((fOrdering_ == OrderingType_{}) == (fFun_ ==
nullptr));
24#elif !qCompilerAndStdLib_RequiresNotMatchInlineOutOfLineForTemplateClassBeingDefined_Buggy
25 template <
typename FUNCTION_SIGNATURE>
26 template <
typename CTOR_FUNC_SIG>
27 requires (is_convertible_v<remove_cvref_t<CTOR_FUNC_SIG>, function<FUNCTION_SIGNATURE>> and
28 not derived_from<remove_cvref_t<CTOR_FUNC_SIG>, Function<FUNCTION_SIGNATURE>>)
29 inline Function<FUNCTION_SIGNATURE>::Function (CTOR_FUNC_SIG&& f)
30 : fFun_{forward<CTOR_FUNC_SIG> (f)}
31 , fOrdering_{fFun_ ==
nullptr ? OrderingType_{} : ++Private_::sFunctionObjectNextPtrID_}
33 Assert ((fOrdering_ == OrderingType_{}) == (fFun_ ==
nullptr));
36 template <
typename FUNCTION_SIGNATURE>
37 inline Function<FUNCTION_SIGNATURE>::Function (nullptr_t)
40 Assert (fOrdering_ == OrderingType_{});
42 template <
typename FUNCTION_SIGNATURE>
43 inline Function<FUNCTION_SIGNATURE>::operator STDFUNCTION ()
const
47 template <
typename FUNCTION_SIGNATURE>
48 template <
typename... Args>
49 inline typename Function<FUNCTION_SIGNATURE>::result_type Function<FUNCTION_SIGNATURE>::operator() (Args... args)
const
52 return fFun_ (forward<Args> (args)...);
54 template <
typename FUNCTION_SIGNATURE>
55 inline strong_ordering Function<FUNCTION_SIGNATURE>::operator<=> (
const Function& rhs)
const
57 return fOrdering_ <=> rhs.fOrdering_;
59 template <
typename FUNCTION_SIGNATURE>
60 inline bool Function<FUNCTION_SIGNATURE>::operator== (
const Function& rhs)
const
62 return fOrdering_ == rhs.fOrdering_;
64 template <
typename FUNCTION_SIGNATURE>
67 return Characters::ToString (fOrdering_);
#define RequireNotNull(p)
String is like std::u32string, except it is much easier to use, often much more space efficient,...