$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Boost review of the Convert library is ongoing
From: alex (alexhighviz_at_[hidden])
Date: 2014-05-20 12:02:33
>template<TypeIn, TypeOut>
>void boost::large_vector_converter operator() (const TypeIn& in, boost::
>optional <TypeOut>& out)
>{
> try {
> out = large_vector< TypeIn >(in);
> } catch() {
> out = boost::none;
> }
>}
>}
>
This would be more correct:
struct large_vector_converter
{
template<typename T>
void operator()(const T& in, boost::optional<large_vector<T> >& out) const
{
try {
out = boost::in_place(in);
}
catch (...)
{}
}
};