Skip to content

Glossary: Software Design Patterns in C++

Function-local static

Also written: function-local static variable

A `static` variable inside a function, built once the first time the function runs (thread-safe since C++11). It is the usual C++ form of a singleton.

Where the book teaches it

Related terms

Singletonthread-safe