multiprecision/test/git_issue_608.cpp
jzmaddock 2e81e42a0a
Type which are convertible to a number should not participate in arit… (#609)
* Type which are convertible to a number should not participate in arithmetic operator overloads.
Fixes https://github.com/boostorg/multiprecision/issues/608
2024-03-07 17:23:49 +00:00

16 lines
604 B
C++

///////////////////////////////////////////////////////////////////////////////
// Copyright 2024 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <functional>
#include <boost/multiprecision/cpp_bin_float.hpp>
using big_float_type = boost::multiprecision::cpp_bin_float_100;
int main()
{
static_assert(boost::multiprecision::is_compatible_arithmetic_type<std::reference_wrapper<big_float_type>, big_float_type>::value == 0, "This should not be a compatible type");
}