Rcpp Version 1.1.2
Loading...
Searching...
No Matches
result_of.h
Go to the documentation of this file.
1
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
2
/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
3
//
4
// result_of.h: Rcpp R/C++ interface class library -- traits to help wrap
5
//
6
// Copyright (C) 2010 - 2024 Dirk Eddelbuettel and Romain Francois
7
// Copyright (C) 2025 Dirk Eddelbuettel, Romain Francois and IƱaki Ucar
8
//
9
// This file is part of Rcpp.
10
//
11
// Rcpp is free software: you can redistribute it and/or modify it
12
// under the terms of the GNU General Public License as published by
13
// the Free Software Foundation, either version 2 of the License, or
14
// (at your option) any later version.
15
//
16
// Rcpp is distributed in the hope that it will be useful, but
17
// WITHOUT ANY WARRANTY; without even the implied warranty of
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
// GNU General Public License for more details.
20
//
21
// You should have received a copy of the GNU General Public License
22
// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
23
24
#ifndef Rcpp__traits__result_of__h
25
#define Rcpp__traits__result_of__h
26
27
namespace
Rcpp
{
28
namespace
traits
{
29
30
template
<
typename
T,
typename
... Args>
31
struct
result_of
{
32
#if __cplusplus < 201703L
33
// deprecated by C++17, removed by C++2020, see https://en.cppreference.com/w/cpp/types/result_of
34
typedef
typename ::std::result_of<T(
typename
Args::stored_type...)>
::type
type
;
35
#else
36
// since C++17, see https://en.cppreference.com/w/cpp/types/result_of
37
typedef
typename ::std::invoke_result<T,
typename
Args::stored_type...>
::type
type
;
38
#endif
39
} ;
40
41
template
<
typename
T>
42
struct
result_of
<T>{
43
typedef
typename
T::result_type
type
;
44
} ;
45
46
}
47
}
48
49
#endif
50
Rcpp::traits
traits used to dispatch wrap
Definition
Date.h:27
Rcpp
Rcpp API.
Definition
algo.h:28
Rcpp::traits::result_of< T >::type
T::result_type type
Definition
result_of.h:43
Rcpp::traits::result_of
Definition
result_of.h:31
Rcpp::traits::type::type
::std::result_of< Function(typenameArgs::stored_type...)>::type type
Definition
result_of.h:34
inst
include
Rcpp
traits
result_of.h
Generated on
for Rcpp Version 1.1.2 by
1.15.0