C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Make class template parameters available externally
From: Dmitry (dimanne_at_[hidden])
Date: 2019-10-31 07:15:53


>
>
> Decomposing the type to know the template parameters is not the same as
> making these parameters part of the class' public interface.

 Right, not exactly the same.

There are
> cases when template parameters are used for auxiliary purposes, e.g. for
> SFINAE or tagging and specialization. These parameters should not be
> exposed.
>

It looks like this statement is the most important thing. And I am
struggling to understand why it is so. Can you please elaborate on this
more? Why do you think it is a bad idea? (I hope you read my proposal and
know that if there is already a user-defined type with the same name, they
won't be declared).

> I'm strongly opposed to making the proposed behavior the default. IMO,
> if implemented, it must be opt-in.
>
> Another thing to consider: unnamed template parameters.

Good point, but the answer naturally follows if you imagine what you can do
with this unnamed parameters inside class - you can't declare
using/typedef, ditto here, the answer to your question - there will be no
implicitly generated typedefs.



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

Standard Proposals Archives on Google Groups