A helper class to 'tag' objects as rvalues to help DCMTK's move emulation employed on pre C++11 compilers.
More...
template<typename T>
struct OFrvalue< T >
A helper class to 'tag' objects as rvalues to help DCMTK's move emulation employed on pre C++11 compilers.
- Template Parameters
-
T | the base type an rvalue should be create of. |
OFrvalue wraps the type T inside a zero-overhead object employing T's move constructor when possible.
- Note
- When C++11 support is available, OFrvalue<T> will simply be a type alias for T, since a C++11 compiler handles rvalue reference conversions natively.
Example
This example describes how to move an object of type OFunique_ptr out of a function by using OFrvalue.
{
}
. . .
a class handling the DICOM dataset format (files without meta header)
Definition: dcdatset.h:42
OFunique_ptr is a smart pointer that retains sole ownership of an object through a pointer and destro...
Definition: ofmem.h:289
A helper class to 'tag' objects as rvalues to help DCMTK's move emulation employed on pre C++11 compi...
Definition: ofutil.h:157
- Warning
- Some compilers might require you to use the following code instead, as older versions of the C++ standard allowed the compiler to use the copy constructor for binding an rvalue to an lvalue reference. Use this code template instead to achieve maximum portability:
{
}
OFconstexpr xvalue OFmove(T< unspecified > t)
Obtains an rvalue reference to its argument and converts it to an xvalue.
The documentation for this struct was generated from the following file: