This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/83345] c++1z produces an infinite recursion (c++1y works fine).


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83345

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think that's the expected behaviour in C++17. The return statement in the
conversion operator no longer constructs an object in C++17, it calls the
conversion operator again.

This will fix it:

        operator ref_proxy_t( void )
        {
            return ref_proxy_t( static_cast<ICondition&>(*this) );
        }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]