Re: synthesising instantiated template parameters and arguments

2020-10-29 Thread Jacob Carlborg via Digitalmars-d-learn
On Wednesday, 28 October 2020 at 05:51:14 UTC, Nicholas Wilson wrote: but for a templated C this is tricker as I can't use a template sequence parameter (...) unless C uses it in the same position (I'm trying to generate a mangle from it so it needs to be exact). Given class A(T,int,args...

Re: synthesising instantiated template parameters and arguments

2020-10-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 28 October 2020 at 05:51:14 UTC, Nicholas Wilson wrote: class A(T,int,args...) {} alias C = A!(int, 0, float); I need `ScopeClass!C` to be template ScopeClass(C) { class Anon(T,int,args...) // name doesn't matter { // implement members with compile time reflection

synthesising instantiated template parameters and arguments

2020-10-27 Thread Nicholas Wilson via Digitalmars-d-learn
Given template ScopeClass(C) { //... } where C is a, possibly templated, class I want the eponymous member of ScopeClass!(C) to have the same templatedness (both parameters and arguments)as C. For a non-template C this is a simple as: template ScopeClass(C) { class ScopeClass {