|
Boost : |
From: John Maddock (john_at_[hidden])
Date: 2006-10-24 12:10:49
Some of my code that uses the TR1/Tuples code has stopped working. Sorry
don't know when, haven't built this particular program in a while. The test
case is:
#include <boost/tr1/tuple.hpp>
std::tr1::tuple<double, double, double, double, double, double, double>
foo(int i)
{
return std::tr1::make_tuple(i, i+1, i+2, i+3, i+4, i+5, i+6);
}
int main()
{
foo(2);
}
Which generates the errors:
$ cl -EHsc -I. -c scrap.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for
80x86
Copyright (C) Microsoft Corporation. All rights reserved.
scrap.cpp
scrap.cpp(6) : error C2664:
'boost::fusion::tuple<T0,T1,T2,T3,T4,T5,T6>::tuple(const
boost::fusion::tuple<T0,T1,T2,T3,T4,T5,T6> &)' : cannot convert parameter 1
from 'boost::fusion::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>' to 'const
boost::fusion::tuple<T0,T1,T2,T3,T4,T5,T6> &'
with
[
T0=double,
T1=double,
T2=double,
T3=double,
T4=double,
T5=double,
T6=double
]
and
[
T0=int,
T1=int,
T2=int,
T3=int,
T4=int,
T5=int,
T6=int,
T7=boost::fusion::void_,
T8=boost::fusion::void_,
T9=boost::fusion::void_
]
and
[
T0=double,
T1=double,
T2=double,
T3=double,
T4=double,
T5=double,
T6=double
]
Reason: cannot convert from
'boost::fusion::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>' to 'const
boost::fusion::tuple<T0,T1,T2,T3,T4,T5,T6>'
with
[
T0=int,
T1=int,
T2=int,
T3=int,
T4=int,
T5=int,
T6=int,
T7=boost::fusion::void_,
T8=boost::fusion::void_,
T9=boost::fusion::void_
]
and
[
T0=double,
T1=double,
T2=double,
T3=double,
T4=double,
T5=double,
T6=double
]
No user-defined-conversion operator available that can perform this
conversion, or the operator cannot be called
Looks like the definition of make_tuple is out of synch with tuple?
It works OK with the release branch BTW.
Thanks, John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk