userver: userver/formats/common/transfer_tag.hpp Source File
Loading...
Searching...
No Matches
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