SimpleITK  1.0.1
type_traits.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18 #ifndef sitk_nsstd_type_traits_h
19 #define sitk_nsstd_type_traits_h
20 
21 #include "sitkConfigure.h"
22 
23 #if !defined SITK_HAS_TR1_TYPE_TRAITS && !defined SITK_HAS_CXX11_TYPE_TRAITS
24 #error "No system (tr1/c++11) type_traits header available!"
25 #endif
26 
27 #if defined SITK_HAS_CXX11_TYPE_TRAITS || !defined SITK_HAS_TR1_SUB_INCLUDE
28 #include <type_traits>
29 #else
30 #include <tr1/type_traits>
31 #endif
32 
33 
34 namespace itk
35 {
36 namespace simple
37 {
38 namespace nsstd
39 {
40 #if defined SITK_HAS_TR1_TYPE_TRAITS && !defined SITK_HAS_CXX11_TYPE_TRAITS
41 using std::tr1::is_same;
42 using std::tr1::true_type;
43 using std::tr1::false_type;
44 using std::tr1::integral_constant;
45 #else
46 using std::is_same;
47 using std::true_type;
48 using std::false_type;
49 using std::integral_constant;
50 #endif
51 }
52 }
53 }
54 
55 #endif // sitk_nsstd_type_traits_h