...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::log::attributes::named_scope::sentry — Sentry object class to automatically push and pop scopes.
// In header: <boost/log/attributes/named_scope.hpp> // Sentry object class to automatically push and pop scopes. struct sentry { // public member functions sentry(string_literal const &, string_literal const &, unsigned int, scope_entry::scope_name_type = scope_entry::general) noexcept; ~sentry() noexcept; sentry(sentry const &) = delete; sentry & operator=(sentry const &) = delete; };
sentry
public member functionssentry(string_literal const & sn, string_literal const & fn, unsigned int ln, scope_entry::scope_name_type t = scope_entry::general) noexcept;
Constructor. Pushes the specified scope to the end of the thread-local list of scopes.
Parameters: |
|
~sentry() noexcept;
Destructor. Removes the last pushed scope from the thread-local list of scopes.
sentry(sentry const &) = delete;
sentry & operator=(sentry const &) = delete;