mCRL2
Loading...
Searching...
No Matches
type_traits.h
Go to the documentation of this file.
1// Author(s): unknown
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
11
12#ifndef ATERMPP_TYPE_TRAITS_H
13#define ATERMPP_TYPE_TRAITS_H
14
16
17namespace atermpp
18{
19
23template < typename T, typename V = void >
24struct is_container;
25
28template < typename T >
29struct is_container< T, void > : public
30 detail::is_container_impl< typename std::remove_reference< typename std::remove_const< T >::type >::type >
31 { };
32
33template < typename T, typename V >
34struct is_container : public detail::lazy_check_value_type< is_container< T, void >::value, T, V >
35 { };
36
40template < typename T, typename V = void >
41struct enable_if_container : public
42 std::enable_if< is_container< T, V >::value >
43 { };
44
48template < typename T, typename V = void >
49struct disable_if_container : public
50 std::enable_if< !is_container< T, V >::value >
51 { };
52
53// type condition for use with std::enable_if
54template < typename T >
55struct is_set : public
56 detail::is_set_impl< typename std::remove_reference< typename std::remove_const< T >::type >::type >
57 { };
58
59template < template < typename O > class C, typename E >
61{
62 typedef C< E > type;
63};
64
65} // namespace atermpp
66
67#endif // ATERMPP_TYPE_TRAITS_H
The main namespace for the aterm++ library.
Definition algorithm.h:21
Some type traits for implementations.