1
0
forked from Alepha/Alepha

Optional only ever takes one argument.

Clang warned about this -- Clang's variadic template argument
handling seems to significantly differ from GCC's.  I should
test this out on godbolt sometime.
This commit is contained in:
2023-11-10 11:51:29 -05:00
parent 914c7c7ab3
commit 0ef618e977

View File

@ -18,8 +18,8 @@ namespace Alepha::Hydrogen::Meta
template< typename T >
struct is_optional : std::false_type {};
template< typename T, typename ... Args >
struct is_optional< std::optional< T, Args... > > : std::true_type {};
template< typename T >
struct is_optional< std::optional< T > > : std::true_type {};
template< typename T >
constexpr bool is_optional_v= is_optional< T >::value;