Thrill  0.1
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 <[email protected]>
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 
14 namespace tlx {
15 
16 //! \addtogroup tlx_meta
17 //! \{
18 
19 //! SFINAE enable_if -- copy of std::enable_if<> with less extra cruft.
20 template <bool, typename T = void>
21 struct enable_if
22 { };
23 
24 template <typename T>
25 struct 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 /******************************************************************************/
double T
SFINAE enable_if – copy of std::enable_if<> with less extra cruft.
Definition: enable_if.hpp:21