Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
MoveOnly Struct Reference

Move-only type for testing move semantics. More...

Public Member Functions

 MoveOnly (int v)
 
 MoveOnly (const MoveOnly &)=delete
 
MoveOnlyoperator= (const MoveOnly &)=delete
 
 MoveOnly (MoveOnly &&other) noexcept
 
MoveOnlyoperator= (MoveOnly &&other) noexcept
 
bool operator== (const MoveOnly &other) const
 

Public Attributes

int value
 
bool moved_from = false
 

Detailed Description

Move-only type for testing move semantics.

Definition at line 110 of file dynliststack_test.cc.

Constructor & Destructor Documentation

◆ MoveOnly() [1/3]

MoveOnly::MoveOnly ( int  v)
inlineexplicit

Definition at line 115 of file dynliststack_test.cc.

◆ MoveOnly() [2/3]

MoveOnly::MoveOnly ( const MoveOnly )
delete

◆ MoveOnly() [3/3]

MoveOnly::MoveOnly ( MoveOnly &&  other)
inlinenoexcept

Definition at line 118 of file dynliststack_test.cc.

References Aleph::maps().

Member Function Documentation

◆ operator=() [1/2]

MoveOnly & MoveOnly::operator= ( const MoveOnly )
delete

◆ operator=() [2/2]

MoveOnly & MoveOnly::operator= ( MoveOnly &&  other)
inlinenoexcept

Definition at line 122 of file dynliststack_test.cc.

References Aleph::maps(), and value.

◆ operator==()

bool MoveOnly::operator== ( const MoveOnly other) const
inline

Definition at line 129 of file dynliststack_test.cc.

References Aleph::maps(), and value.

Member Data Documentation

◆ moved_from

bool MoveOnly::moved_from = false

Definition at line 113 of file dynliststack_test.cc.

◆ value

int MoveOnly::value

Definition at line 112 of file dynliststack_test.cc.

Referenced by operator=(), and operator==().


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