1// Copyright 2022 Peter Dimov.
2// Distributed under the Boost Software License, Version 1.0.
3// https://www.boost.org/LICENSE_1_0.txt
4
5#include <boost/system/error_code.hpp>
6#include <boost/config.hpp>
7#include <boost/config/pragma_message.hpp>
8
9#if defined(BOOST_GCC) && BOOST_GCC >= 40700 && BOOST_GCC < 40800
10
11BOOST_PRAGMA_MESSAGE("Skipping test, BOOST_GCC is 407xx")
12
13#else
14
15struct X
16{
17 boost::system::error_code ec;
18};
19
20X const& f()
21{
22#if defined(BOOST_CLANG_VERSION) && BOOST_CLANG_VERSION < 30900
23
24 BOOST_STATIC_CONSTEXPR X x = {};
25 return x;
26
27#else
28
29 BOOST_STATIC_CONSTEXPR X x;
30 return x;
31
32#endif
33}
34
35#endif
36

source code of boost/libs/system/test/constexpr_test2.cpp