[basic.stc] Temporary object and its storage duration CWG1634 #4840
Labels
cwg
Issue must be reviewed by CWG.
not-editorial
Issue is not deemed editorial; the editorial issue is kept open for tracking.
[basic.stc.general] p2
The rule explicitly says a temporary object can have a storage duration. However, in the subsequent subclause, the [basic.stc.static], [basic.stc.thread] and [basic.stc.auto] do not state what storage duration the temporary object should have. It only applies to variables.
Since [basic.pre] p6 says
The temporary object is never introduced by a declaration but is created in order to satisfy the requirement of a language construct. Hence, a temporary object is not a variable. This issue is also discussed at https://stackoverflow.com/questions/47945299/what-is-a-temporary-object-with-static-storage-duration
The text was updated successfully, but these errors were encountered: