This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Implementation of n3793 <experimental/optional>
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Luc Danton <lucdanton at free dot fr>
- Date: Sun, 03 Nov 2013 10:49:22 +0100
- Subject: Re: [Patch] Implementation of n3793 <experimental/optional>
- Authentication-results: sourceware.org; auth=none
- References: <5260CFE7 dot 7000808 at free dot fr> <CAH6eHdTs43dT6yY=tfL9mfWHKAR3yZ-2j02Scs8FW4zUE=L6=w at mail dot gmail dot com> <52729DF5 dot 6020806 at free dot fr> <CAH6eHdQ9bwMD0Awh9bivCTb83na8i1od6pyqRMULmY48a2-x-A at mail dot gmail dot com>
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 );
^
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."