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++/60258] Member initialization for atomic fail.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60258

--- Comment #5 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> ---
(In reply to Daniel KrÃgler from comment #4)
> Reduced example:

More reduced by eliminating library dependencies:

//------------------
struct atomic_bool
{
  atomic_bool(const atomic_bool&) = delete;
  constexpr atomic_bool(bool) noexcept { }
};

#define USE_TEMPLATE

#ifdef USE_TEMPLATE
template <class>
#endif
struct base
{
  atomic_bool magic{false};
};

int main()
{
#ifdef USE_TEMPLATE
  base<void> b;
#else
  base b;
#endif
}
//------------------

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