SimpleITK  1.0.1
functional.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_functional_h
19 #define sitk_nsstd_functional_h
20 
21 #include "sitkConfigure.h"
22 
23 #if !defined SITK_HAS_TR1_FUNCTIONAL && !defined SITK_HAS_CXX11_FUNCTIONAL
24 #error "No system (tr1/c++11) functional header available!"
25 #endif
26 
27 #if defined SITK_HAS_CXX11_FUNCTIONAL || !defined SITK_HAS_TR1_SUB_INCLUDE
28 #include <functional>
29 #else
30 #include <tr1/functional>
31 #endif
32 
33 namespace itk
34 {
35 namespace simple
36 {
37 namespace nsstd
38 {
39 #if defined SITK_HAS_TR1_FUNCTIONAL && !defined SITK_HAS_CXX11_FUNCTIONAL
40 using std::tr1::function;
41 using std::tr1::bind;
42 namespace placeholders = std::tr1::placeholders;
43 #else
44 using std::function;
45 using std::bind;
46 namespace placeholders = std::placeholders;
47 #endif
48 }
49 }
50 }
51 
52 #endif // sitk_nsstd_functional_h