C++ Logo

std-proposals

Advanced search

Re: Make class template parameters available externally

From: Dmitry <dimanne_at_[hidden]>
Date: Wed, 30 Oct 2019 21:51:51 +0000
>
> So, basically,
>
> 1) when looking for a nested name, do normal lookup
> 2) if that didn't find anything, look into the template parameters
>
> If I then _don't_ want to expose such a template parameter name, what do I
> do?
>

Looks like you have not read my proposal :)
Here is an excerpt from it:

What if I did not want to redefine them?
First of all, it turns out that they are a crucial part of an interface and
often or always are of interest to end-users. A quick survey of STL shows
that all containers declare all their template parameters and make them
available to users.
Secondly, if there will be found a compelling enough argument for having
the possibility to disable the feature, an approach similar to “= delete”
can be adopted.
(or you can declare them in private section, as an alternative)


-- 
Dmitry
*Sent from gmail*

Received on 2019-10-30 16:54:34