Rcpp Version 1.0.7
tinyformat.h
Go to the documentation of this file.
1 // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 //
3 // tinyformat.h: Rcpp R/C++ interface class library -- tinyformat.h wrapper
4 //
5 // Copyright (C) 2008 - 2009 Dirk Eddelbuettel
6 // Copyright (C) 2009 - 2017 Dirk Eddelbuettel and Romain Francois
7 //
8 // This file is part of Rcpp.
9 //
10 // Rcpp is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 2 of the License, or
13 // (at your option) any later version.
14 //
15 // Rcpp is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
22 
23 #ifndef Rcpp_tinyformat_h
24 #define Rcpp_tinyformat_h
25 
26 namespace Rcpp {
27 void stop(const std::string& message);
28 }
29 #define TINYFORMAT_ERROR(REASON) ::Rcpp::stop(REASON)
30 
31 #if __cplusplus >= 201103L
32 #define TINYFORMAT_USE_VARIADIC_TEMPLATES
33 #else
34 // Don't use C++11 features (support older compilers)
35 #define TINYFORMAT_NO_VARIADIC_TEMPLATES
36 #endif
37 
38 #define TINYFORMAT_ASSERT(cond) do if (!(cond)) ::Rcpp::stop("Assertion failed"); while(0)
39 
40 #include "tinyformat/tinyformat.h"
41 
42 #endif // #ifndef Rcpp_tinyformat_h
tinyformat.h
Rcpp
Rcpp API.
Definition: algo.h:28
Rcpp::stop
void NORET stop(const char *fmt, Args &&... args)
Definition: exceptions.h:51
Rcpp::message
void message(SEXP s)
Definition: message.h:26