userver: userver/formats/common/transfer_tag.hpp Source File
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
transfer_tag.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/formats/common/transfer_tag.hpp
4/// @brief @copybrief formats::common::TransferTag
5
6USERVER_NAMESPACE_BEGIN
7
8namespace formats::common {
9
10/// @brief This tag class is used to move a `ValueBuilder` object without
11/// copying
12///
13/// Unlike the move-constructor, if the object points to a subtree, only the
14/// pointer is copied. Note that storing the resulting `ValueBuilder` in a
15/// container for a long period of time will cause a "memory leak": the child
16/// `ValueBuilder` will hold the entire original tree, starting from the root.
17class TransferTag final {};
18
19} // namespace formats::common
20
21USERVER_NAMESPACE_END