LIBINT  2.1.0-stable
cxxstd.h
1 /* * This file is a part of Libint. * Copyright (C) 2004-2014 Edward F. Valeev * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Library General Public License, version 2, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this program. If not, see http://www.gnu.org/licenses/. * */
2 
3 #ifndef _libint2_include_libint2_cxxstd_h_
4 #define _libint2_include_libint2_cxxstd_h_
5 
6 #ifndef __cplusplus
7 # error "Libint2 requires a C++ compiler"
8 #endif
9 
10 #if __cplusplus >= 201402L
11 # define LIBINT2_CPLUSPLUS_STD 2014
12 #elif __cplusplus >= 201103L
13 # define LIBINT2_CPLUSPLUS_STD 2011
14 #elif __cplusplus >= 199711L
15 # define LIBINT2_CPLUSPLUS_STD 1998
16 #else
17 # define LIBINT2_CPLUSPLUS_STD 0 // unknown standard
18 #endif
19 
20 // workaround: standard Intel compiler (not INDE) is not standard conforming
21 #if defined(__INTEL_COMPILER) && LIBINT2_CPLUSPLUS_STD==0
22 # ifdef __INTEL_CXX11_MODE__
23 # undef LIBINT2_CPLUSPLUS_STD
24 # define LIBINT2_CPLUSPLUS_STD 2011
25 # endif
26 #endif
27 
28 #endif /* header guard */