C++ Logo

std-proposals

Advanced search

Re: Are constrained type barred from std:: implementations?

From: Giuseppe D'Angelo <giuseppe.dangelo_at_[hidden]>
Date: Fri, 27 Aug 2021 13:29:43 +0200
On 27/08/2021 13:09, DBJ via Std-Proposals wrote:
> Thanks, Lenard, I just find it generally peculiar nobody in this
> honorable forum seem genuinely perturbed
>
> This code <https://godbolt.org/z/84TK41c3P>
>
> is legal...? Perhaps there is something obvious escaping my cognitive
> abilities...

That code isn't legal, specifically

#define typename(T_) (#T_)

violates https://eel.is/c++draft/macro.names#2 as typename is a keyword.
https://eel.is/c++draft/tab:lex.key

HTH,
-- 
Giuseppe D'Angelo | giuseppe.dangelo_at_[hidden] | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

Received on 2021-08-27 06:29:50