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 libstdc++/81950] _GLIBCXX17_INLINE macro not used consistently


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

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler@googlemail.
                   |                            |com

--- Comment #3 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to Judy Ward from comment #1)
> In the comment above I meant to say the line should be changed to:
> 
>     _GLIBCXX17_INLINE constexpr in_place_t in_place{};

TC's guess is correct. The omission is intentionally, because the macro is
designed to be used in contexts which are unaware of the actual C++ version and
in_place_t was introduced with C++17, see
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0504r0.html and some
papers related to std::optional in-place construction. The surrounding #ifdef
block of the variable definition you are complaining about is only available
since C++17.

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