Boost logo

Boost Users :

From: Joel de Guzman (joel_at_[hidden])
Date: 2008-08-20 04:34:51


John Maddock wrote:
> Markus Werle wrote:
>>> [ignore this line: it makes gmane stop complaining about top-posting]
>>
>> Hi!
>>
>> Trying to migrate existing code from boost::xxx to std::tr1::xxx using
>> the boost::tr1 implementation for Visual Studio 2005 SP1
>> In the presence of some exotic autoconversion utility the
>> the std::tr1::tuple version of my code fails on vc8.
>> The error messages indicate that the conversion operator
>> is not considered by the compiler.
>>
>> Below is code that fails to compile on vc8 if USE_TR1 is defined
>> Do you have an idea how to fix this?
>
> I confess to being stumped at present: the code compiles with VC9, GCC
> and Intel 10.1, but fails with VC7.1 and VC8 :-(
>
> Not sure if any fusion experts would have any ideas?

Fixed. I admit it's a bug. The thing is, fusion tuple adopted the
TR1 interface in essence plus some more extensions to take advantage
of the features fusion provides beyond TR1 (e.g. iterators, algorithms,
sequence compatibility, etc.). The side effect is that corner cases
like this becomes problematic on some compilers.

Solution: conform to TR1 to the letter. No extras. No more, no less.
The downside is that some features (e.g. copy/assign from a fusion
list or view) are *now disabled*. Anyway, if you want a more feature
rich implementation, go for the fusion vector.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net

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