Logical location of template instantiations

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 1 12:13:45 PDT 2016


On 7/1/16 3:02 PM, Timon Gehr wrote:
>
> The current module (that declares 'S') might not be the only module that
> uses emplace to construct 'S' instances. We want to hide the constructor
> of 'S' from other modules, but not from the current module.
> But both modules get identical template instances, so either both see
> the private constructor (through emplace), or none does. To fix this
> properly, there should hence be a way for the two modules to receive
> distinct template instances.

Emplace needs a constructor alias parameter.

-Steve


More information about the Digitalmars-d mailing list