libfoedus-core
FOEDUS Core Library
cxx11.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2015, Hewlett-Packard Development Company, LP.
3  * This program is free software; you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by the Free
5  * Software Foundation; either version 2 of the License, or (at your option)
6  * any later version.
7  *
8  * This program is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11  * more details. You should have received a copy of the GNU General Public
12  * License along with this program; if not, write to the Free Software
13  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14  *
15  * HP designates this particular file as subject to the "Classpath" exception
16  * as provided by HP in the LICENSE.txt file that accompanied this code.
17  */
18 #ifndef FOEDUS_CXX11_HPP_
19 #define FOEDUS_CXX11_HPP_
20 
55 #if __cplusplus < 201103L
56 #ifndef NO_FOEDUS_CXX11_WARNING
57 #pragma message("C++11 is disabled. libfoedus-core can be used without C++11,")
58 #pragma message(" but enabling C++11 allows more flexible use of the library.")
59 #pragma message(" To suppress this warning without enabling C++11, set -DNO_FOEDUS_CXX11_WARNING.")
60 #endif // NO_FOEDUS_CXX11_WARNING
61 
66 #define DISABLE_CXX11_IN_PUBLIC_HEADERS
67 #endif // __cplusplus < 201103L
68 
117 #ifdef DISABLE_CXX11_IN_PUBLIC_HEADERS
118 #include <cstddef> // for NULL
119 #define CXX11_FUNC_DELETE
120 #define CXX11_FUNC_DEFAULT
121 #define CXX11_CONSTEXPR
122 #define CXX11_FINAL
123 #define CXX11_NULLPTR NULL
124 #define CXX11_NOEXCEPT
125 #define CXX11_OVERRIDE
126 #define CXX11_STATIC_ASSERT(expr, message)
127 #else // DISABLE_CXX11_IN_PUBLIC_HEADERS
128 #define CXX11_FUNC_DELETE = delete
129 #define CXX11_FUNC_DEFAULT = default
130 #define CXX11_CONSTEXPR constexpr
131 #define CXX11_FINAL final
132 #define CXX11_NULLPTR nullptr
133 #define CXX11_NOEXCEPT noexcept
134 #define CXX11_OVERRIDE override
135 #define CXX11_STATIC_ASSERT(expr, message) static_assert(expr, message)
136 #endif // DISABLE_CXX11_IN_PUBLIC_HEADERS
137 
138 #endif // FOEDUS_CXX11_HPP_