Skip to content

Apparent C++20 compilation failure #1244

@eddelbuettel

Description

@eddelbuettel

Per email forwarded by BDR and originally to @stla the 'new at CRAN' package jack bonks:

This fails to install with LLVM clang 15.0.7 (current) with libc++ as its
(native) C++ library.

../Rcpp/include/Rcpp/sugar/functions/sapply.h:36:19: error: no template named
'result_of' in namespace 'std'; did you mean 'traits::result_of'?
        typedef typename ::std::result_of<Function(typename
SugarExpression::stored_type)>::type type;
                         ^~~~~~~~~~~~~~~~
                         traits::result_of
.../Rcpp/include/Rcpp/traits/result_of.h:30:8: note: 'traits::result_of'
declared here
struct result_of{
       ^
 ```
jack 5.0.0 specifies C++20, but std::result_of was removed in that standard
having been deprecated in C++17 according to
https://en.cppreference.com/w/cpp/types/result_of
and replaced by invoke_result since C++17.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions