1/*
2Copyright 2017 Glen Joseph Fernandes
3(glenjofe@gmail.com)
4
5Distributed under the Boost Software License, Version 1.0.
6(http://www.boost.org/LICENSE_1_0.txt)
7*/
8
9#include <boost/core/addressof.hpp>
10#include <boost/static_assert.hpp>
11
12#if !defined(BOOST_CORE_NO_CONSTEXPR_ADDRESSOF)
13struct Type { };
14
15static int v1 = 0;
16static Type v2 = { };
17
18BOOST_STATIC_ASSERT(boost::addressof(v1) == &v1);
19BOOST_STATIC_ASSERT(boost::addressof(v2) == &v2);
20#endif
21

source code of boost/libs/core/test/addressof_constexpr_test.cpp