tlx
Loading...
Searching...
No Matches
enable_if.hpp
Go to the documentation of this file.
1/*******************************************************************************
2 * tlx/meta/enable_if.hpp
3 *
4 * Part of tlx - http://panthema.net/tlx
5 *
6 * Copyright (C) 2019 Timo Bingmann <tb@panthema.net>
7 *
8 * All rights reserved. Published under the Boost Software License, Version 1.0
9 ******************************************************************************/
10
11#ifndef TLX_META_ENABLE_IF_HEADER
12#define TLX_META_ENABLE_IF_HEADER
13
14namespace tlx {
15
16//! \addtogroup tlx_meta
17//! \{
18
19//! SFINAE enable_if -- copy of std::enable_if<> with less extra cruft.
20template <bool, typename T = void>
22{ };
23
24template <typename T>
25struct enable_if<true, T> {
26 typedef T type;
27};
28
29//! \}
30
31} // namespace tlx
32
33#endif // !TLX_META_ENABLE_IF_HEADER
34
35/******************************************************************************/
SFINAE enable_if – copy of std::enable_if<> with less extra cruft.
Definition enable_if.hpp:22