ptal / expected

What did you expect?
113 stars 18 forks source link

[Monads] move have_value to monads/algorithms/have_value.hpp #3

Closed viboes closed 10 years ago

viboes commented 10 years ago
template< class M >
BOOST_CONSTEXPR bool have_value( M&& m )
{
  return has_value(std::forward<M>(m));
}
template< class M1, class ...Ms >
BOOST_CONSTEXPR bool have_value( M1&& m1, Ms&& ...ms )
{
  return has_value(std::forward<M1>(m1)) && have_value( std::forward<Ms>(ms)... );
}