6 Basic concepts [basic]

6.7 Storage duration [basic.stc]

6.7.2 Thread storage duration [basic.stc.thread]

All variables declared with the thread_­local keyword have thread storage duration. The storage for these entities shall last for the duration of the thread in which they are created. There is a distinct object or reference per thread, and use of the declared name refers to the entity associated with the current thread.

A variable with thread storage duration shall be initialized before its first odr-use and, if constructed, shall be destroyed on thread exit.