浏览代码

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

doc
Christos Houtouridis 6 年前
父节点
当前提交
d390e2c544
共有 2 个文件被更改,包括 10 次插入10 次删除
  1. +4
    -4
      include/utl/meta/if.h
  2. +6
    -6
      include/utl/meta/sfinae.h

+ 4
- 4
include/utl/meta/if.h 查看文件

@@ -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 查看文件

@@ -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>


正在加载...
取消
保存