Browse Source

Change _C template parameter. Cygwin ctype.h use it as macro.

doc
Christos Houtouridis 6 years ago
parent
commit
d390e2c544
2 changed files with 10 additions and 10 deletions
  1. +4
    -4
      include/utl/meta/if.h
  2. +6
    -6
      include/utl/meta/sfinae.h

+ 4
- 4
include/utl/meta/if.h View File

@@ -31,9 +31,9 @@
//! @{
namespace utl {
//! select _T1 or _T2 based on _C
//! select _T1 or _T2 based on _Sel
//! @{
template <bool _C, typename _T1, typename _T2>
template <bool _Sel, typename _T1, typename _T2>
struct select_ {
typedef _T1 type;
};
@@ -44,9 +44,9 @@ namespace utl {
};
//! @}
//! select _Tp if _C is true, else SFINAE
//! select _Tp if _Check is true, else SFINAE
//! @{
template <bool _C, typename _Tp = void>
template <bool _Check, typename _Tp = void>
struct if_ {
typedef _Tp type;
};


+ 6
- 6
include/utl/meta/sfinae.h View File

@@ -55,16 +55,16 @@ namespace utl {
//! @}
//! Alias template for if_
template<bool _C, typename _Tp = void>
using if_t = typename if_<_C, _Tp>::type;
template<bool _Check, typename _Tp = void>
using if_t = typename if_<_Check, _Tp>::type;
//! Publicly recognized alias template for if_
template<bool _C, typename _Tp = void>
using enable_if_t = typename if_<_C, _Tp>::type;
template<bool _Check, typename _Tp = void>
using enable_if_t = typename if_<_Check, _Tp>::type;
//! Uniform alias template for if_
template<bool _C, typename _Tp = void>
using use_if_t = typename if_<_C, _Tp>::type;
template<bool _Check, typename _Tp = void>
using use_if_t = typename if_<_Check, _Tp>::type;
//! If same type resolves to _Ret, else SFINAE
template <typename _T1, typename _T2, typename _Ret =_T1>


Loading…
Cancel
Save