1// Copyright 2019 Peter Dimov
2// Distributed under the Boost Software License, Version 1.0.
3// http://www.boost.org/LICENSE_1_0.txt
4
5#include <boost/assert/source_location.hpp>
6#include <boost/core/lightweight_test.hpp>
7
8int main()
9{
10 {
11 boost::source_location loc, loc2;
12
13 BOOST_TEST_EQ( loc, loc2 );
14
15 boost::source_location loc3 = BOOST_CURRENT_LOCATION;
16 boost::source_location loc4( loc3 );
17
18 BOOST_TEST_EQ( loc3, loc4 );
19 BOOST_TEST_NE( loc3, loc );
20 }
21
22 return boost::report_errors();
23}
24

source code of boost/libs/assert/test/source_location_test6.cpp