Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 68cc668162.
PrevUpHomeNext

pilfered

Tag wrapper to specify pilfer-construction.

Synopsis

Defined in header <boost/json/pilfer.hpp>

template<
    class T>
class pilfered
Member Functions

Name

Description

get

Return a reference to the pilferable object.

operator->

Return a pointer to the pilferable object.

pilfered [constructor]

Constructor.

Description

This wrapper is used to specify a pilfer constructor overload.

Example

A pilfer constructor accepts a single argument of type pilfered and throws nothing:

struct T
{
    T( pilfered<T> ) noexcept ;
};
Remarks

The constructor should not be marked explicit.

See Also

pilfer, is_pilfer_constructible, Valueless Variants Considered Harmful

Convenience header <boost/json.hpp>


PrevUpHomeNext