Try to in‐place construct a new value from the specified arguments.
Synopsis
Declared in <folly/Try.h>
template<
typename T,
typename... Args>
T*
tryEmplace(
Try<T>& t,
Args&&... args) noexcept;
Description
If T's constructor throws an exception then this is caught and the Try<T> object is initialised to hold that exception.
Return Value
A pointer to the newly constructed value, or nullptr on failure.
Parameters
Name |
Description |
t |
The |
args |
The arguments passed to |
Created with MrDocs