mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-28 22:18:29 +00:00
22 lines
326 B
C
22 lines
326 B
C
|
#ifndef CTL_ENABLE_IF_H_
|
||
|
#define CTL_ENABLE_IF_H_
|
||
|
|
||
|
namespace ctl {
|
||
|
|
||
|
template<bool B, class T = void>
|
||
|
struct enable_if
|
||
|
{};
|
||
|
|
||
|
template<class T>
|
||
|
struct enable_if<true, T>
|
||
|
{
|
||
|
typedef T type;
|
||
|
};
|
||
|
|
||
|
template<bool B, class T = void>
|
||
|
using enable_if_t = typename enable_if<B, T>::type;
|
||
|
|
||
|
} // namespace ctl
|
||
|
|
||
|
#endif // CTL_ENABLE_IF_H_
|