C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Make class template parameters available externally
From: language.lawyer_at_[hidden]
Date: 2019-10-31 02:57:40


I think your vector example is a bit unfortunate.
STDlib implementers would still have to use reserved identifiers as template parameter names.

On 30/10/2019 23:48, Dmitry via Std-Proposals wrote:
> Hi,
> Here is a link
> <https://docs.google.com/document/d/1dx9zuklyI1l4wU2buGaDuZGik1nAdd1YAJZ4mjwS9FU/edit?usp=sharing>
> to an initial draft of my proposal about making class template parameters
> visible outside the scope of a class by default (without manual and
> explicit declaration them inside the class via using/typedef).
> Quick example:
>
> Before
>
> After
>
> template <class _Tp,
>
> class _Allocator>
>
> struct vector {
>
> typedef _Tp value_type;
>
> typedef _Allocator allocator_type;
>
> };
>
> vector<int>::value_type a = 0;
>
> template <class value_type,
>
> class allocator_type>
>
> struct vector {
>
> };
>
> vector<int>::value_type a = 0;
>
>
> Your feedback is appreciated.
>
>


STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups