BloombergLP::bslalg::NothrowMovableUtil::wrap

Return a wrapped copy of f, or f if already wrapped.

Synopsis

Declared in <bslalg_nothrowmovableutil.h>

template<class TYPE>
static
bslalg::NothrowMovableUtil::WrappedType<TYPE>::type
wrap(TYPE& f);

Description

Return a wrapped copy of the specified f object. If f is already wrapped, return a simple copy of f without wrapping it again. Note that the overloads taking an lvalue argument prevent the overload taking an rvalue argument from treating the argument as a forwarding reference.

Return Value

wrapped copy of f, or a copy of f if already wrapped

Parameters

NameDescription
fobject to wrap