Skip to content

Commit

Permalink
Add voidT SFINAE support.
Browse files Browse the repository at this point in the history
  • Loading branch information
HaxyM committed Aug 22, 2024
1 parent 70b7a61 commit 862f941
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/crap/type_traits
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef CRAP_TYPETRAITS
#define CRAP_TYPETRAITS

#include "type_traits.d/voidt.h"

#endif

20 changes: 20 additions & 0 deletions include/crap/type_traits.d/voidt.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef CRAP_TYPETRAITS_VOIDT
#define CRAP_TYPETRAITS_VOIDT

#include "../version.d/libvoidt.h"

#if (crap_lib_void_t >= 201411L)
#include <type_traits>
#endif

namespace crap
{
#if (crap_lib_void_t >= 201411L)
template <class ... Types> using voidT = std :: void_t<Types...>;
#else
//TODO: May require CWG Issue 1558 walkaround.
template <class...> using voidT = void;
#endif
}
#endif

0 comments on commit 862f941

Please sign in to comment.