]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/multiprecision/test/git_issue_30.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / multiprecision / test / git_issue_30.cpp
CommitLineData
11fdf7f2
TL
1///////////////////////////////////////////////////////////////////////////////
2// Copyright 2016 John Maddock. Distributed under the Boost
3// Software License, Version 1.0. (See accompanying file
4// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
11fdf7f2
TL
6#include <boost/multiprecision/cpp_int.hpp>
7
8struct E
9{
10 E(boost::multiprecision::cpp_rational const&)
11 {
11fdf7f2
TL
12 }
13};
14
15void g(boost::multiprecision::cpp_rational const& r)
16{
17 std::cout << r << std::endl;
18}
19
20int main()
21{
92f5a8d4 22#if !defined(BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !(defined(__APPLE_CC__) && defined(CI_SUPPRESS_KNOWN_ISSUES))
11fdf7f2
TL
23 boost::multiprecision::cpp_int r = 3;
24 g(r);
92f5a8d4 25 E x1(r); // triggers explicit conversion operator.
11fdf7f2
TL
26#endif
27 return 0;
28}