This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Implementation of n3793 <experimental/optional>


On 3 November 2013 09:49, Andreas Schwab wrote:
> Jonathan Wakely <jwakely.gcc@gmail.com> writes:
>
>> +  {
>> +    std::experimental::optional<long> o { std::experimental::in_place, 0x1234ABCDF1E2D3C4 };
>> +    auto copy = o;
>> +    VERIFY( copy );
>> +    VERIFY( *copy == 0x1234ABCDF1E2D3C4 );
>> +    VERIFY( o && o == 0x1234ABCDF1E2D3C4 );
>> +  }
>
> experimental/optional/cons/copy.cc:70:20: error: no match for 'operator==' (operand types are 'std::experimental::optional<long int>' and 'long long int')
>      VERIFY( o && o == 0x1234ABCDF1E2D3C4 );
>                     ^

Yes, Paolo pointed out these are failing on 32-bit targets, I've got a
patch coming.  Luc is there any reason not to just replace all those
large constants with 0x1234ABCD, which fits in a long on 32-bit
targets?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]