]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/config/test/boost_no_cxx11_addressof.ipp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / config / test / boost_no_cxx11_addressof.ipp
1 // (C) Copyright John Maddock 2012
2 // (C) Copyright Peter Dimov 2014
3
4 // Use, modification and distribution are subject to the
5 // Boost Software License, Version 1.0. (See accompanying file
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
8 // See http://www.boost.org/libs/config for more information.
9
10 // MACRO: BOOST_NO_CXX11_ADDRESSOF
11 // TITLE: C++11 <memory> doesn't have a working std::addressof
12 // DESCRIPTION: The compiler does not support the function std::addressof added to <memory>
13
14 #include <memory>
15
16 namespace boost_no_cxx11_addressof {
17
18 void x3()
19 {
20 }
21
22 int test()
23 {
24 int x1, x2[3];
25 return std::addressof(x1) != &x1 || std::addressof(x2) != &x2 || std::addressof(x3) != &x3;
26 }
27
28 }