| helics 3.6.1

config.hpp
1 /*
2 Copyright (c) 2017-2025,
3 Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable
4 Energy, LLC. See the top-level NOTICE for additional details. All rights reserved.
5 SPDX-License-Identifier: BSD-3-Clause
6 */
7 #ifndef HELICS_CPP98_CONFIG_HPP_
8 #define HELICS_CPP98_CONFIG_HPP_
9 #pragma once
10
11 // Detect whether the compiler supports C++11 rvalue references.
12 #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && \
13 defined(__GXX_EXPERIMENTAL_CXX0X__))
14 # define HELICS_HAS_RVALUE_REFS
15 #elif defined(__clang__)
16 # if __has_feature(cxx_rvalue_references)
17 # define HELICS_HAS_RVALUE_REFS
18 # endif
19 #elif defined(_MSC_VER) && (_MSC_VER >= 1900)
20 # define HELICS_HAS_RVALUE_REFS
21 #elif defined(_MSC_VER) && (_MSC_VER >= 1600)
22 # define HELICS_HAS_RVALUE_REFS
23 #endif
24
25 // Detect whether the compiler supports C++11.
26 #if __cplusplus > 199711L
27 # define HELICS_THROWS_EXCEPTION noexcept(false)
28 # define HELICS_NOTHROW noexcept
29 # define HELICS_NULL_POINTER nullptr
30 # define HELICS_HAS_FUNCTIONAL 1
31 #elif defined(_MSC_VER) && (_MSC_VER >= 1900)
32 # define HELICS_THROWS_EXCEPTION noexcept(false)
33 # define HELICS_NOTHROW noexcept
34 # define HELICS_NULL_POINTER nullptr
35 # define HELICS_HAS_FUNCTIONAL 1
36 #else
37 # define HELICS_THROWS_EXCEPTION throw(HelicsException)
38 # define HELICS_NOTHROW throw()
39 # define HELICS_NULL_POINTER NULL
40 # define HELICS_HAS_FUNCTIONAL 0
41 #endif
42
43 #define HELICS_IGNORE_ERROR HELICS_NULL_POINTER
44 #endif