User: Password:
|
|
Subscribe / Log in / New account

C11 atomic variables and the kernel

C11 atomic variables and the kernel

Posted Feb 20, 2014 6:12 UTC (Thu) by wahern (subscriber, #37304)
In reply to: C11 atomic variables and the kernel by jwakely
Parent article: C11 atomic variables and the kernel

Ah, the syntax was I was thinking of is called something like "list-initialized temporaries", which was added to C++11 to allow classes to accept initialization lists in the manner of plain aggregate types. The syntax is similar, just without the parentheses--type{ initialization-list}, or just { initialization-list } if the type can be inferred.

GCC decided to give compound literals in C++ the same treatment as it does initializer lists. The temporary objects in the initializer lists are scoped to the expression. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53220


(Log in to post comments)


Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds