Rcpp Version 1.1.2
Loading...
Searching...
No Matches
mask.h
Go to the documentation of this file.
1// mask.h: Rcpp R/C++ interface class library -- masking macros
2//
3// Copyright (C) 2025 IƱaki Ucar
4//
5// This file is part of Rcpp.
6//
7// Rcpp is free software: you can redistribute it and/or modify it
8// under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 2 of the License, or
10// (at your option) any later version.
11//
12// Rcpp is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
19
20#ifndef Rcpp_macros_mask_h
21#define Rcpp_macros_mask_h
22
23#ifndef RCPP_NO_MASK_RF_ERROR
24#ifdef RCPP_MASK_RF_ERROR
25#define Rf_error(...) \
26 _Pragma("GCC warning \"Use of Rf_error() instead of Rcpp::stop(). Calls \
27to Rf_error() in C++ contexts are unsafe: consider using Rcpp::stop() instead, \
28or define RCPP_NO_MASK_RF_ERROR if this is a false positive. More info:\n\
29 - https://github.com/RcppCore/Rcpp/issues/1247\n\
30 - https://github.com/RcppCore/Rcpp/pull/1402\"") \
31 Rf_error(__VA_ARGS__)
32#endif
33#endif
34
35#endif