Movatterモバイル変換


[0]ホーム

URL:


Issue 1793 - WG21 CWG Issues
Title
thread_local in explicit specializations
Status
cd4
Section
9.2.2 [dcl.stc]
Submitter
Mike Herrick

Created on2013-10-02.00:00:00 last changed107 months ago

Messages

msg5355 (view)
Date: 2014-11-15.00:00:00

[Moved to DR at the November, 2014 meeting.]

msg4818 (view)
Date: 2014-02-15.00:00:00

Proposed resolution (February, 2014):

Change 9.2.2 [dcl.stc] paragraph 1 as follows:

...Astorage-class-specifierotherthanthread_local shall not be specified in an explicitspecialization (13.9.4 [temp.expl.spec]) or an explicit instantiation(13.9.3 [temp.explicit]) directive.
msg4646 (view)
Date: 2013-10-02.00:00:00

According to 9.2.2 [dcl.stc] paragraph 1,

...Ifthread_local appears in any declaration of a variable itshall be present in all declarations of thatentity... Astorage-class-specifier shall not be specified in anexplicit specialization (13.9.4 [temp.expl.spec]) or an explicitinstantiation (13.9.3 [temp.explicit]) directive.

These two requirements appear to be in conflict when an explicitinstantiation or explicit specialization names athread_localvariable. For example,

  template <class T> struct S {    thread_local static int tlm;  };  template <> int S<int>::tlm = 0;  template <> thread_local int S<float>::tlm = 0;

which of the two explicit specializations is correct?

History
DateUserActionArgs
2017-02-06 00:00:00adminsetstatus: drwp -> cd4
2015-05-25 00:00:00adminsetstatus: dr -> drwp
2015-04-13 00:00:00adminsetmessages: +msg5355
2014-11-24 00:00:00adminsetstatus: ready -> dr
2014-03-03 00:00:00adminsetmessages: +msg4818
2014-03-03 00:00:00adminsetstatus: open -> ready
2013-10-02 00:00:00admincreate

[8]ページ先頭

©2009-2025 Movatter.jp