[Bug c++/60258] New: Member initialization for atomic fail.

2014-02-18 Thread ja.gcc.bugzilla at aptsketch dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60258

Bug ID: 60258
   Summary: Member initialization for atomic fail.
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ja.gcc.bugzilla at aptsketch dot com

The following code is unable to compile:

template 
class base
{
public:
std::atomic_size_t _magic{10};
};

class derived
: public base
{
public:
auto print_magic_num() const noexcept -> void
{
}
};

auto my_func() -> void
{
derived a;
}

Removing the member initialization for the atomic will allow it to compile.


[Bug c++/60258] Member initialization for atomic fail.

2014-02-18 Thread ja.gcc.bugzilla at aptsketch dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60258

--- Comment #2 from ja.gcc.bugzilla at aptsketch dot com ---
auto foo() -> void
vs
void foo()

is more of just a stylistic issue. There is nothing wrong with both. To me both
are good.

The bug is about std::atomic member initialization. Where if there is member
initialization std::atomic_size_t x{10} the compiler chokes on it.