Boost logo

Boost :

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 (...)
    {}
  }
};


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk