[Rcpp-devel] Rcpp/longlong.h
romain at r-enthusiasts.com
romain at r-enthusiasts.com
Fri Sep 20 01:18:48 CEST 2013
Hello,
I've now moved all occurences of long long to a single file :
Rcpp/longlong.h
Currently this file is included by RcppCommon.h, but we could e.g.
decide not to include it by default so that client code that wants to
use long long could just do:
#include <Rcpp.h>
#include <Rcpp/longlong.h>
So that there are two layers of decision:
- the user decides to use long long support
- we still check that we can actually support it, i.e. wth
defined(__GNUC__) && defined(__LONG_LONG_MAX__) and __extension__
We could also condition the inclusion of the longlong.h file by the
condition we used to use: is this C++11 or clang with some macro. So
that we would have both:
- the behavior that we used to have, that has been tested for years,
...
- the ability to still use long long if we don't have c++11
For example, on OSX gcc has long long but does not implement c++11.
clang does though of course.
I've sent a question to the R-devel mailing list to get insight from
higher up. This should settle whether this is a dead end or there is
hope.
Romain
More information about the Rcpp-devel
mailing list