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