Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::once_block_flag Struct Reference

A flag to detect if a code block has already been executed. More...

#include <once_block.hpp>

Public Types

enum  {
  uninitialized = 0,
  being_initialized,
  initialized
}
 

Public Attributes

unsigned char status
 

Detailed Description

A flag to detect if a code block has already been executed.

This structure should be used in conjunction with the BOOST_LOG_ONCE_BLOCK_FLAG macro. Usage example:

once_block_flag flag = BOOST_LOG_ONCE_BLOCK_INIT;

void foo() { BOOST_LOG_ONCE_BLOCK_FLAG(flag) { puts("Hello, world once!"); } }

Member Enumeration Documentation

anonymous enum
Enumerator
uninitialized 
being_initialized 
initialized 

Member Data Documentation

unsigned char boost::once_block_flag::status

The documentation for this struct was generated from the following file: