strusBase  0.17
type_traits.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
9 #ifndef _STRUS_BASE_TYPE_TRAITS_HPP_INCLUDED
10 #define _STRUS_BASE_TYPE_TRAITS_HPP_INCLUDED
11 
12 #if __cplusplus >= 201103L
13 #include <type_traits>
14 
15 namespace strus {
16 
17 template< typename T >
18 struct is_arithmetic :public std::is_arithmetic<T> {};
19 
20 template< typename T, typename U >
21 struct is_same :public std::is_same<T,U> {};
22 
23 }//namespace
24 
25 #else
26 
27 #include <boost/type_traits.hpp>
28 
29 namespace strus {
30 
31 template< typename T >
32 struct is_arithmetic :public boost::is_arithmetic<T> {};
33 
34 template< typename T, typename U >
35 struct is_same :public boost::is_same<T,U> {};
36 
37 }//namespace
38 
39 #endif
40 
41 #endif
42 
Definition: type_traits.hpp:35
Definition: type_traits.hpp:32