Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::MoveTracker Class Reference

A base-class that can be used to check whether the current instance was moved from. More...

#include <MoveTracker.hpp>

Inheritance diagram for util::MoveTracker:

Public Member Functions

 MoveTracker (MoveTracker &&other)
 Move constructor sets the moved-from state on other and resets the state on this
 
MoveTrackeroperator= (MoveTracker &&other)
 Move operator sets the moved-from state on other and resets the state on this
 
 MoveTracker (MoveTracker const &)=default
 
MoveTrackeroperator= (MoveTracker const &)=default
 

Protected Member Functions

bool wasMoved () const noexcept
 The function to be used by clients in order to check whether the instance was moved from.
 

Detailed Description

A base-class that can be used to check whether the current instance was moved from.

Constructor & Destructor Documentation

◆ MoveTracker()

util::MoveTracker::MoveTracker ( MoveTracker && other)
inline

Move constructor sets the moved-from state on other and resets the state on this

Parameters
otherThe moved-from object

Member Function Documentation

◆ operator=()

MoveTracker & util::MoveTracker::operator= ( MoveTracker && other)
inline

Move operator sets the moved-from state on other and resets the state on this

Parameters
otherThe moved-from object
Returns
Reference to self

◆ wasMoved()

bool util::MoveTracker::wasMoved ( ) const
inlinenodiscardprotectednoexcept

The function to be used by clients in order to check whether the instance was moved from.

Returns
true if moved from; false otherwise

The documentation for this class was generated from the following file: