1// Copyright 2017, 2021, 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/result.hpp>
6
7using namespace boost::system;
8
9int main()
10{
11 int x = 1;
12 result<int const&>( x ) | 2;
13}
14

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