Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork219
Closed
Description
After upgrading to 0.12.14,Rcpp::is_na() can't be used onnewDateVector any more. Here is the minimal reproducible example, my session info and the error message.
miminal example
It works fine on Rcpp 0.12.13 but not on 0.12.14.
Rcpp::cppFunction("bool any_na_date(newDateVector dates) {return any(is_na(dates));}")
sessionInfo()
R version 3.4.2 (2017-09-28)Platform: x86_64-apple-darwin15.6.0 (64-bit)Running under: macOS High Sierra 10.13.2Matrix products: defaultBLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylibLAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dyliblocale:[1] zh_CN.UTF-8/zh_CN.UTF-8/zh_CN.UTF-8/C/zh_CN.UTF-8/zh_CN.UTF-8attached base packages:[1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached):[1] compiler_3.4.2 tools_3.4.2 yaml_2.1.14 Rcpp_0.12.14Error message
In file included from file1ba335704213.cpp:1:In file included from /Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp.h:74:In file included from /Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/sugar/sugar.h:31:In file included from /Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/sugar/functions/functions.h:36:/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/sugar/functions/is_na.h:75:25: error: member reference base type 'const typename storage_type<14>::type' (aka 'const double') is not a structure or union return ref[i].is_na() ; ~~~~~~^~~~~~/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/vector/VectorBase.h:46:47: note: in instantiation of member function 'Rcpp::sugar::IsNa_Vector_is_na<Rcpp::newDateVector>::operator[]' requested here return static_cast<const VECTOR*>(this)->operator[](i) ; ^/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/sugar/functions/any.h:68:8: note: in instantiation of member function 'Rcpp::VectorBase<10, false, Rcpp::sugar::IsNa_Vector_is_na<Rcpp::newDateVector> >::operator[]' requested here if( object[i] == TRUE ) { ^/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/sugar/logical/SingleLogicalResult.h:50:27: note: in instantiation of member function 'Rcpp::sugar::Any<false, Rcpp::sugar::IsNa_Vector_is_na<Rcpp::newDateVector> >::apply' requested here static_cast<T&>(*this).apply() ; ^/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/sugar/logical/SingleLogicalResult.h:55:3: note: in instantiation of member function 'Rcpp::sugar::SingleLogicalResult<false, Rcpp::sugar::Any<false, Rcpp::sugar::IsNa_Vector_is_na<Rcpp::newDateVector> > >::apply' requested here apply() ; ^/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/sugar/logical/SingleLogicalResult.h:76:10: note: in instantiation of member function 'Rcpp::sugar::SingleLogicalResult<false, Rcpp::sugar::Any<false, Rcpp::sugar::IsNa_Vector_is_na<Rcpp::newDateVector> > >::is_true' requested here return is_true() ; ^file1ba335704213.cpp:8:8: note: in instantiation of member function 'Rcpp::sugar::SingleLogicalResult<false, Rcpp::sugar::Any<false, Rcpp::sugar::IsNa_Vector_is_na<Rcpp::newDateVector> > >::operator bool' requested herereturn any(is_na(dates)); ^1 error generated.make: *** [file1ba335704213.o] Error 1clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include" -I"/private/var/folders/55/f_cnh9dd40b4lb_6yqzmts8h0000gp/T/RtmpIDkyUL/sourceCpp-x86_64-apple-darwin15.6.0-0.12.14" -I/usr/local/include -fPIC -Wall -g -O2 -c file1ba335704213.cpp -o file1ba335704213.oError in sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, : Error 1 occurred building shared library.Metadata
Metadata
Assignees
Labels
No labels