vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

boost 1.74 operators infinite recursion

Open niclar opened this issue 4 years ago • 6 comments

https://github.com/boostorg/utility/issues/65

Known error in boost operators that manifests itself as an infinite recursion in gcc,clang (c++2a) and now visual studo 2019 Version 16.9.0 Preview 3.0 (/std:c++latest).

I'll open a PR for the windows part with something like;

template <class T, class U, class B = operators_detail::empty_base<T> >
struct equality_comparable2 : B
{
//https://github.com/boostorg/utility/issues/65
#if __cplusplus < 201705L
     friend BOOST_OPERATORS_CONSTEXPR bool operator==(const U& y, const T& x) { return x == y; }
#endif
     friend BOOST_OPERATORS_CONSTEXPR bool operator!=(const U& y, const T& x) { return !static_cast<bool>(x == y); }
     friend BOOST_OPERATORS_CONSTEXPR bool operator!=(const T& y, const U& x) { return !static_cast<bool>(y == x); }
};

niclar avatar Jan 22 '21 07:01 niclar

@PhoebeHui Boost was updated.

yurybura avatar Oct 27 '21 10:10 yurybura

@yurybura this issue very much remains though (not changed in boost 1.77).

(I'll file the PR as soon as I get some time over.)

niclar avatar Oct 27 '21 10:10 niclar

@niclar Is there any progress on the issue? Does the problem still exist in the latest version?

FrankXie05 avatar Jan 28 '22 07:01 FrankXie05

@FrankXie05 still there. I'll get a PR out there in a bit. Just use the code above

niclar avatar Feb 03 '22 15:02 niclar

@niclar Thanks for your reply, I will continue to follow up on this issue.

FrankXie05 avatar Feb 07 '22 02:02 FrankXie05

@niclar Upstream attempts to fix this, Can you go and verify it? see: https://github.com/boostorg/utility/commit/f3963f5375799f3e3577edfafd2579e4b6481258

FrankXie05 avatar Feb 16 '22 07:02 FrankXie05

We need the upstream to confirm https://github.com/boostorg/utility/issues/65 is fixed.

JackBoosY avatar Aug 19 '22 08:08 JackBoosY

@Lastique, the latest boost version 1.8.4 have been fixed this issue?

JonLiu1993 avatar Jan 09 '24 07:01 JonLiu1993

Not to my knowledge.

Lastique avatar Jan 09 '24 10:01 Lastique