From 892a557ce7962aaec801f8ee3b614a0b8b433730 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Thu, 21 Mar 2024 15:36:54 -0400 Subject: [PATCH] Modernize a bit with some requires statements. --- Reflection/tagged_ctor_arg.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Reflection/tagged_ctor_arg.h b/Reflection/tagged_ctor_arg.h index c4b3388..e868fe2 100644 --- a/Reflection/tagged_ctor_arg.h +++ b/Reflection/tagged_ctor_arg.h @@ -64,11 +64,17 @@ namespace Alepha::Hydrogen::Reflection ::detail:: tagged_ctor_arg_m template< typename Forbidden > struct argument { - template< typename T, typename= std::enable_if_t< not std::is_same_v< T, Forbidden > > > + template< typename T > + requires( not Concepts::SameAs< T, Forbidden > ) constexpr operator T (); }; - template< typename T, typename ... Args, typename= std::enable_if_t< std::is_constructible_v< T, Args... > > > + template< typename T, typename ... Args > + requires( Concepts::ConstructibleFrom< T, Args... > ) + constexpr void construct( const std::tuple< Args... > & ); + + template< typename T, typename ... Args > + requires( Concepts::ConstructibleFrom< T, Args... > ) constexpr void construct( std::tuple< Args... > && ); template