...one of the most highly regarded and expertly designed C++ library projects in the world. — Herb Sutter and Andrei Alexandrescu, C++ Coding Standards
...one of the most highly regarded and expertly designed C++ library projects in the world.
boost::log::once_block_flag — A flag to detect if a code block has already been executed.
// In header: <boost/log/utility/once_block.hpp> struct once_block_flag { };
Эта структура должна использоваться в сочетании с макросом<BOOST_LOG_ONCE_BLOCK_FLAG>. Пример использования:
BOOST_LOG_ONCE_BLOCK_FLAG
<once_block_flagflag = BOOST_LOG_ONCE_BLOCK_INIT;>
once_block_flagflag = BOOST_LOG_ONCE_BLOCK_INIT;
<void foo() { BOOST_LOG_ONCE_BLOCK_FLAG(flag) { puts("Hello, world once!"); } }>
void foo() { BOOST_LOG_ONCE_BLOCK_FLAG(flag) { puts("Hello, world once!"); } }
Статья Struct once_block_flag раздела Chapter 1. Boost.Log v2 Utilities может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.
:: Главная :: Utilities ::
реклама