Subject: Re: [boost] Failures for GCC 4.4.1 with gnu++0x
From: Eric Niebler (eric_at_[hidden])
Date: 2009-09-05 20:36:04
Christopher Jefferson wrote:
> On 5 Sep 2009, at 13:25, Beman Dawes wrote:
>> I missed iostreams. The problem seems to be a bug in gcc. This program:
>> #include <utility>
>> int main()
>> std::pair<int, int*> x(0,0);
>> return 0;
>> compiles without -std=gnu++0x, but with -std=gnu++0x gets an error:
>> In constr
>> uctor 'std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = int, _U2 =
>> int, _T1 = int, _T2 = int*]':
>> cvt-0-to-ptr.cpp:5: instantiated from here
>> invalid conversion from 'int' to 'int*'
> This is technically a bug in the C++0x draft standard, but one which I
> hope will be fixed somehow before it is finalised, as it will break
> existing valid code, like this.
I agree. This is terrible. Has anyone filed an issue with the C++
committee about this? Beman? If not, I will. We now have field
experience -- this is breaking real code.
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk