Boost logo

Boost Users :

From: Marc Viala (mviala_at_[hidden])
Date: 2006-08-17 10:45:14


Hello,
 
I am using the Boost.Test framework, but I not able to use std::valarray<> with BOOST_CHECK or BOOST_CHECK_EQUAL macro.
 
For example:
<\code>
static void print_valarray(std::ostream& os, std::valarray<double> const& v)
{
  // TODO
}
 
namespace std {
std::ostream&
operator<< (std::ostream& os, std::valarray<double> const& v)
{
  print_valarray(os, v) ;
  return os ;
}
} ;
 
std::valarray<double> v(10) ;
BOOST_CHECK_EQUAL(v, v);
<\code>
 
Failed with the following compilation error:
c:\Dev\MViala\ADV\Library\boost-1_33_1\boost\test\predicate_result.hpp(51): error C2664: 'boost::test_tools::predicate_result::readonly_property57::readonly_property57(const boost::test_tools::predicate_result::readonly_property57::write_param_t)' : impossible de convertir le paramètre 1 de 'std::_Boolarray' en 'const boost::test_tools::predicate_result::readonly_property57::write_param_t'
 
Configuration:
Platform: Win32
Compiler: Microsoft Visual C++ version 7.1
STL : Dinkumware standard library version 313
Boost : 1.33.1
 
Any help will be appreciated...
 
Marc Viala
 



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net