[Rcpp-devel] Formatting Fixed - Clang 3.0 and 3.3 errors on sugar/set.h
Chris Jefferson
chris at bubblescope.net
Mon Nov 19 19:40:18 CET 2012
On 19/11/12 17:33, Thell Fowler wrote:
>
> /home/thell/R/library/Rcpp/include/Rcpp/sugar/sets.h:28:2: error:
> invalid preprocessing directive
> #elseif defined(HAS_TR1_UNORDERED_SET)
Without looking any deeper at this (sorry), clang doesn't not accept
elseif, it requires elif.
gcc actually doesn't do what you expect with elseif. It just ignores it
if the #if isn't added, and causes a compile-time error if you end up
actually reaching that line. So in:
#if defined(X)
#elseif defined(Y)
#endif
If X is not defined, nothing is included even if Y is defined. If X is
defined, a compile-time error always occurs.
in you want someone with gcc, clang and c++0x experience have a dig
through these headers, I am happy to download them and have a look.
Chris
More information about the Rcpp-devel
mailing list