C++ Logo

std-discussion

Advanced search

Re: UDL operators and space?

From: Matthew Woehlke <mwoehlke.floss_at_[hidden]>
Date: Mon, 17 Jun 2019 15:25:08 -0400
On 17/06/2019 15.14, Daniel Krügler wrote:
> Am Mo., 17. Juni 2019 um 20:25 Uhr schrieb Matthew Woehlke:
>> I recently hunted down a "bug" in the following code, which does not
>> compile on GCC 4.8.x:
>>
>> constexpr size_t operator ""_z(unsigned long long x)
>> {
>> return static_cast<size_t>(x);
>> }
>>
>> [...] does anyone know *when* and how this restriction was lifted?
>
> The corresponding CWG issue was
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1473

Thanks! (Obviously I found the wrong defects list that I didn't spot
this myself.)

> It was fixed before C++14, but after C++11 was released, see the
> definition of a CD3 issue:
>
> "A DR/DRWP or Accepted/WP issue not resolved in C++11 but included in
> the Committee Draft advanceed for balloting at the April, 2013 WG21
> meeting."

...which, BTW, is clear as mud :-). I *think* this means that "C++11"
compilers are supposed to retroactively implement the defect resolution?
Or does it mean "yeah, we could have done that better; oh well, it's
fixed in the next standard"?

-- 
Matthew

Received on 2019-06-17 14:26:59