• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//  (C) Copyright John Maddock 2012
2
3//  Use, modification and distribution are subject to the
4//  Boost Software License, Version 1.0. (See accompanying file
5//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7//  See http://www.boost.org/libs/config for more information.
8
9//  MACRO:         BOOST_NO_CXX11_HDR_FUNCTIONAL
10//  TITLE:         C++11 <functional> unavailable
11//  DESCRIPTION:   The compiler does not support the C++11 features added to <functional>
12
13#include <functional>
14
15void f(int, float){}
16
17namespace boost_no_cxx11_hdr_functional {
18
19int test()
20{
21   int i = 0;
22   std::ref(i);
23   std::cref(i);
24
25   std::bit_and<int> b1;
26   std::bit_or<int>  b2;
27   std::bit_xor<int> b3;
28
29   std::hash<short> hs;
30
31   (void)b1;
32   (void)b2;
33   (void)b3;
34   (void)hs;
35
36   std::bind(f, std::placeholders::_1, 0.0f);
37
38   std::function<void(int, float)> fun(f);
39
40   return 0;
41}
42
43}
44