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++/66360] thread_local variable needs copy constructor


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-06-01
     Ever confirmed|0                           |1

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
struct non_copyable
{
  non_copyable(const non_copyable &) = delete;
  non_copyable();
};

struct wrapper
{
  non_copyable value;

  template <typename ...Args>
  wrapper(Args &&... args)
    : value(args...)
  {
  }
};

struct V
{
  template <typename ...Args>
  V(Args &&... args)
  {
    wrapper v(args...);
  }
};

V v;


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