, boost::optional std::optional . , ? std::optional, .
.
template <class T>
bool search( T arg, T & out );
, . , T . , T , .
, .
template <class T>
const T & search( T arg );
template <class T>
const T * search( T arg );
, std::optional , boost::optional, std::optional .
.
. , . boost::optional std::optional ( , ), , .
, .
, , . , , , , . , :
template <class T>
struct DummyValue;
template <>
struct DummyValue<int>
{
static constexpr const int value = -1;
};