kblib 0.2.3
General utilities library for modern C++
kblib::default_move< Obj, movable, nothrow, copyable > Struct Template Reference

Implements type erasure for move construction. More...

#include <kblib/poly_obj.h>

Public Member Functions

 default_move () noexcept=default
 Constructs an object which does nothing. More...
 
template<typename T >
 default_move (T *) noexcept
 Constructs an object which can move a T. More...
 
auto move (void *dest, Obj *from) noexcept(nothrow) -> Obj *
 Moves an object of previously-established type. More...
 

Detailed Description

template<typename Obj, bool movable, bool nothrow, bool copyable>
struct kblib::default_move< Obj, movable, nothrow, copyable >

Implements type erasure for move construction.

Definition at line 305 of file poly_obj.h.

Constructor & Destructor Documentation

◆ default_move() [1/2]

template<typename Obj , bool movable, bool nothrow, bool copyable>
kblib::default_move< Obj, movable, nothrow, copyable >::default_move ( )
defaultnoexcept

Constructs an object which does nothing.

◆ default_move() [2/2]

template<typename Obj , bool movable, bool nothrow, bool copyable>
template<typename T >
kblib::default_move< Obj, movable, nothrow, copyable >::default_move ( T *  )
inlineexplicitnoexcept

Constructs an object which can move a T.

Definition at line 320 of file poly_obj.h.

Member Function Documentation

◆ move()

template<typename Obj , bool movable, bool nothrow, bool copyable>
auto kblib::default_move< Obj, movable, nothrow, copyable >::move ( void *  dest,
Obj *  from 
) -> Obj*
inlinenoexcept

Moves an object of previously-established type.

Definition at line 324 of file poly_obj.h.


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