Rcpp Version 1.1.2
Loading...
Searching...
No Matches
compiler.h
Go to the documentation of this file.
1// compiler.h: Rcpp R/C++ interface class library -- check compiler
2//
3// Copyright (C) 2012 - 2025 Dirk Eddelbuettel, Romain Francois, and Kevin Ushey
4// Copyright (C) 2025 Dirk Eddelbuettel, Romain Francois, Kevin Ushey and IƱaki Ucar
5//
6// This file is part of Rcpp.
7//
8// Rcpp is free software: you can redistribute it and/or modify it
9// under the terms of the GNU General Public License as published by
10// the Free Software Foundation, either version 2 of the License, or
11// (at your option) any later version.
12//
13// Rcpp is distributed in the hope that it will be useful, but
14// WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
20
21#ifndef Rcpp__platform__compiler_h
22#define Rcpp__platform__compiler_h
23
24// NB: A vast list valid identifiers is at these wiki pages:
25// http://sourceforge.net/p/predef/wiki/Home/
26#if !defined(__GNUC__) && !defined(__SUNPRO_CC) && !defined(__clang__) && !defined(__INTEL_COMPILER)
27#error "This compiler is not supported"
28#endif
29
30// Simpler test and minimal standard: C++11 or else we die
31#if __cplusplus < 201103L
32#error "The C++ compilation standard is too old: use C++11 or newer."
33#endif
34
35// C++11 features -- that used to be carefully tested for or worked around via CXX0X / TR1
36// These defines are all planned to get removed just how a number have already been removed. One at a time...
37#include <cmath>
38#include <initializer_list>
39#include <unordered_map>
40#define RCPP_UNORDERED_MAP std::unordered_map // TODO deprecate
41#include <unordered_set>
42#define RCPP_UNORDERED_SET std::unordered_set // TODO deprecate
43
44#if defined(__GNUC__)
45 #define RCPP_HAS_DEMANGLING
46#endif
47
48#endif