|
Boost Users : |
From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2005-12-06 14:52:16
gast128 wrote:
> Dear all,
>
> I am too tired to investigate it deeply, so does anyone know why this does not
> compile (on VS 2003):
>
> typedef boost::function<int (const int& , const int&)> BinOperand;
> typedef std::vector<BinOperand> BinOperandVector;
>
> BinOperandVector operands = boost::assign::list_of(std::plus<int>())
> (std::minus<int>())
> (std::multiplies<int>())
> (std::divides<int>());
>
Please post complete examples to make it easier to investigate suh things.
Anyway, if you don't tell list_of() what type to store in the list, it
will use the first argument to deduce the type. So you're creating a
list of std::plus<int> !
do
boost::assign::list_of<BinOperand>( .... )
instead
HTH
Thorsten
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