C++ Logo


Advanced search

Subject: Re: 2 big problems with User Defined literals:
From: Andy Little (kwikius_at_[hidden])
Date: 2021-05-06 10:39:33

On Thursday, 6 May 2021, 15:10:01 BST, Jason McKesson via Std-Discussion <std-discussion_at_[hidden]> wrote:
> (even if the parser could do it)

Simple enough to test:

namespace test{}

int main()
  int x = test::1;

 Should get a syntax error and since there are no unknown constructs then that is a good indication the grammar is not ambiguous. Also a nice path there to replace the buiit-in types with one's own in future, thus putting UDTs'  at the same level as builtin types

using my::int ;

int main()
   int x = 1 ; // x is a my::int

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups