]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/config/test/boost_no_cxx17_std_invoke.ipp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / config / test / boost_no_cxx17_std_invoke.ipp
CommitLineData
7c673cae
FG
1// (C) Copyright Oliver Kowalke 2016.
2// Use, modification and distribution are subject to the
3// Boost Software License, Version 1.0. (See accompanying file
4// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6// See http://www.boost.org/libs/config for most recent version.
7
8// MACRO: BOOST_NO_CXX17_STD_INVOKE
9// TITLE: invoke
10// DESCRIPTION: The compiler supports the std::invoke() function.
11
12#include <functional>
13
14namespace boost_no_cxx17_std_invoke {
15
16int foo( int i, int j) {
17 return i + j;
18}
19
20int test() {
21 int i = 1, j = 2;
92f5a8d4 22 typename std::invoke_result<int(&)(int,int), int, int>::type t = std::invoke( foo, i, j);
7c673cae
FG
23 return 0;
24}
25
26}
27