Sunshine master
Self-hosted game stream host for Moonlight.
move_by_copy_util Namespace Reference

Contains utilities for moving objects by copying them. More...

Classes

class  MoveByCopy
 

Functions

template<class T >
MoveByCopy< T > cmove (T &movable)
 Copy a move-only value by moving from the source reference.
 
template<class T >
MoveByCopy< T > const_cmove (const T &movable)
 Copy-shape wrapper for moving from a const reference.
 

Detailed Description

Contains utilities for moving objects by copying them.

Function Documentation

◆ cmove()

template<class T >
MoveByCopy< T > move_by_copy_util::cmove ( T & movable)

Copy a move-only value by moving from the source reference.

Parameters
movableMove-only object to transfer through a copy-shaped API.
Returns
Wrapper that moves the object when copied.

◆ const_cmove()

template<class T >
MoveByCopy< T > move_by_copy_util::const_cmove ( const T & movable)

Copy-shape wrapper for moving from a const reference.

Parameters
movableMove-only object to transfer through a copy-shaped API.
Returns
Wrapper that moves the object when copied.