userver: userver/components/scope.hpp File Reference
Loading...
Searching...
No Matches
scope.hpp File Reference

Detailed Description

Constructs an object of type ScopePtr from a registration callback. The callback must return an object that undoes the registration in its destructor.

Definition in file scope.hpp.

Go to the source code of this file.

#include <functional>
#include <memory>
#include <optional>
#include <userver/utils/assert.hpp>

Namespaces

namespace  components
 Contains functions and types to start a userver based service/tool.
 

Functions

template<typename AfterConstructionCallback>
ScopePtr components::MakeScope (AfterConstructionCallback after_construction)
 Constructs an object of type ScopePtr from a registration callback. The callback must return an object that undoes the registration in its destructor.