Fix compilation with MSVC 14.3 in C++20 mode.

This commit is contained in:
Andrey Semashev
2023-07-14 02:22:09 +03:00
parent b32d95a887
commit eb721609af

View File

@@ -1,6 +1,6 @@
// boost::compressed_pair test program // boost::compressed_pair test program
// (C) Copyright John Maddock 2000. // (C) Copyright John Maddock 2000.
// Use, modification and distribution are subject to the Boost Software License, // Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt). // http://www.boost.org/LICENSE_1_0.txt).
@@ -45,7 +45,7 @@ struct contained
// stored value: // stored value:
value_type v_; value_type v_;
// constructors: // constructors:
contained() {} contained() {}
contained(param_type p) : v_(p){} contained(param_type p) : v_(p){}
@@ -197,11 +197,11 @@ struct comparible_UDT
comparible_UDT() : i_(2){} comparible_UDT() : i_(2){}
comparible_UDT(const comparible_UDT& other) : i_(other.i_){} comparible_UDT(const comparible_UDT& other) : i_(other.i_){}
comparible_UDT& operator=(const comparible_UDT& other) comparible_UDT& operator=(const comparible_UDT& other)
{ {
i_ = other.i_; i_ = other.i_;
return *this; return *this;
} }
bool operator == (const comparible_UDT& v){ return v.i_ == i_; } bool operator == (const comparible_UDT& v) const { return v.i_ == i_; }
}; };
int main() int main()
@@ -339,7 +339,7 @@ void call_traits_test<T, isarray>::assert_construct(typename call_traits_test<T,
param_type p2(v); param_type p2(v);
param_type p3(r); param_type p3(r);
param_type p4(p); param_type p4(p);
unused_variable(v2); unused_variable(v2);
unused_variable(v3); unused_variable(v3);
unused_variable(v4); unused_variable(v4);
@@ -388,7 +388,7 @@ void call_traits_test<T, true>::assert_construct(typename boost::call_traits<T>:
param_type p2(v); param_type p2(v);
param_type p3(r); param_type p3(r);
param_type p4(p); param_type p4(p);
unused_variable(v2); unused_variable(v2);
unused_variable(v3); unused_variable(v3);
unused_variable(v4); unused_variable(v4);