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

Implements type erasure for copy construction. More...

#include <kblib/poly_obj.h>

Public Member Functions

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

Detailed Description

template<typename Obj, bool copyable>
struct kblib::default_copy< Obj, copyable >

Implements type erasure for copy construction.

Definition at line 257 of file poly_obj.h.

Constructor & Destructor Documentation

◆ default_copy() [1/2]

template<typename Obj , bool copyable>
kblib::default_copy< Obj, copyable >::default_copy ( )
defaultnoexcept

Constructs an object which does nothing.

◆ default_copy() [2/2]

template<typename Obj , bool copyable>
template<typename T >
kblib::default_copy< Obj, copyable >::default_copy ( T *  )
inlineexplicitnoexcept

Constructs an object which can copy a T.

Definition at line 271 of file poly_obj.h.

Member Function Documentation

◆ copy()

template<typename Obj , bool copyable>
auto kblib::default_copy< Obj, copyable >::copy ( void *  dest,
const Obj *  from 
) -> Obj*
inline

Copies an object of previously-established type.

Definition at line 275 of file poly_obj.h.


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