std::lock_guard::lock_guard

(1) explicit lock_guard( mutex_type& m ); (until C++17) explicit lock_guard( MutexTypes&... m ); (since C++17) (2) lock_guard( mutex_type& m, std::adopt_lock_t t ); (until C++17) lock_guard( MutexTypes&... m, std::adopt_lock_t t ); (since C++17) lock_guard( const lock_guard& ) = delete; (3) (since C++11) Acquires ownership of the given mutex m. 1) Effectively calls m.lock(). The behavior is undefined if m is not a recursive mutex and the cur

std::lock_guard

Defined in header <mutex> template< class Mutex > class lock_guard; (since C++11) (until C++17) template< class... MutexTypes > class lock_guard; (since C++17) The class lock_guard is a mutex wrapper that provides a convenient RAII-style mechanism for owning a mutex or several mutexes (since C++17) for the duration of a scoped block. When a lock_guard object is created, it attempts to take ownership of the mutex it is given. When control leaves the scope i

std::lock

Defined in header <mutex> template< class Lockable1, class Lockable2, class... LockableN > void lock( Lockable1& lock1, Lockable2& lock2, LockableN&... lockn ); (since C++11) Locks the given Lockable objects lock1, lock2, ..., lockn using a deadlock avoidance algorithm to avoid deadlock. The objects are locked by an unspecified series of calls to lock, try_lock, unlock. If a call to lock or unlock results in an exception, unlock is called for any locked ob

std::localtime

Defined in header <ctime> std::tm* localtime( const std::time_t *time ); Converts given time since epoch as std::time_t value into calendar time, expressed in local time. Parameters time - pointer to a time_t object to convert Return value pointer to a static internal std::tm object on success, or NULL otherwise. The structure may be shared between std::gmtime, std::localtime, and std::ctime, and may be overwritten on each invocation. Notes This function ma

std::localeconv

Defined in header <clocale> std::lconv* localeconv(); The localeconv function obtains a pointer to a static object of type std::lconv, which represents numeric and monetary formatting rules of the current C locale. Parameters (none). Return value Pointer to the current std::lconv object. Notes Modifying the object references through the returned pointer is undefined behavior. std::localeconv modifies a static object, calling it from different threads without synchr

std::locale::operators (operator!=)

Defined in header <locale> bool operator==( const locale& other ) const; (1) bool operator!=( const locale& other ) const; (2) Tests two locales for equality. Named locales are considered equal if their names are equal. Unnamed locales are considered equal if they are copies of each other. Parameters other - a std::locale object to compare Return value 1) true if other is a copy of *this or has an identical name, false otherwise. 2) false if othe

std::locale::name

Defined in header <locale> std::string name() const; Returns the name of the locale, which is the name by which it is known to the operating system, such as "POSIX" or "en_US.UTF8" or "English_United States.1252". If the locale is not a copy of a system-supplied locale, the string "*" is returned. Return value The name of the locale or "*" if unnamed. Example #include <locale> #include <iostream> #include <string> int main() { std::locale loc

std::locale::locale

Defined in header <locale> locale(); (1) locale( const locale& other ); (2) explicit locale( const char* std_name ); (3) explicit locale( const std::string& std_name ); (4) locale( const locale& other, const char* std_name, category cat ); (5) locale( const locale& other, const std::string& std_name, category cat ); (6) template< class Facet > locale( const locale& other, Facet* f ); (7) locale( const locale&a

std::locale::id::id

Defined in header <locale> id(); (1) id(const id&) = delete; (2) 1) default constructor: creates an object of type std::locale::id with implementation-specific content. 2) copy constructor is deleted; std::locale::id is not copyable. Notes Because locales and facets must be available for the IO stream objects with static storage duration, such as std::cout, typical implementations let implicit default constructor zero-initialize the contents of std::locale::id

std::locale::id

Defined in header <locale> class locale::id; The class std::locale::id provides implementation-specific identification of a locale facet. Each class derived from std::locale::facet must have a public static member of type std::locale::id and each std::locale object maintains a list of facets it implements, indexed by their ids. Facets with the same id belong to the same facet category and replace each other when added to a locale object. Member functions (constructor)