C++ Logo

STD-PROPOSALS

Advanced search

Subject: [std-proposals] Make class template parameters available externally
From: Dmitry (dimanne_at_[hidden])
Date: 2019-10-30 15:48:59


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.

-- 
Dmitry
*Sent from gmail*


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

Standard Proposals Archives on Google Groups