summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/config/test/boost_no_cxx11_addressof.ipp
blob: 4f0a5e3cdcbcf98f012a1f22622f9d11f527a905 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//  (C) Copyright John Maddock 2012
//  (C) Copyright Peter Dimov 2014

//  Use, modification and distribution are subject to the
//  Boost Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

//  See http://www.boost.org/libs/config for more information.

//  MACRO:         BOOST_NO_CXX11_ADDRESSOF
//  TITLE:         C++11 <memory> doesn't have a working std::addressof
//  DESCRIPTION:   The compiler does not support the function std::addressof added to <memory>

#include <memory>

namespace boost_no_cxx11_addressof {

void x3()
{
}

int test()
{
   int x1, x2[3];
   return std::addressof(x1) != &x1 || std::addressof(x2) != &x2 || std::addressof(x3) != &x3;
}

}