mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add type_traits/aliases.hpp
This commit is contained in:
parent
dacba801a6
commit
eaea3771fc
8 changed files with 153 additions and 36 deletions
|
@ -1,23 +1,7 @@
|
|||
#ifndef SPROUT_UTILITY_ENABLER_IF_HPP
|
||||
#define SPROUT_UTILITY_ENABLER_IF_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// enabler_t
|
||||
// enabler
|
||||
//
|
||||
typedef void* enabler_t;
|
||||
extern enabler_t enabler;
|
||||
//
|
||||
// enabler_if
|
||||
//
|
||||
template<bool C>
|
||||
class enabler_if
|
||||
: public std::enable_if<C, enabler_t&>
|
||||
{};
|
||||
} // namespace sprout
|
||||
#include <sprout/type_traits/enabler_if.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_UTILITY_ENABLER_IF_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue