<div dir="ltr">2013/5/26 Ahuzhgairl <span dir="ltr"><<a href="mailto:bulletproofchest@gmail.com" target="_blank">bulletproofchest@gmail.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Kenji,<br>
Thank you much for the '.C' alias support, Amazed to see there could be some action so quick!<br>
<br>
<br>
Could we please look at the nontype-as-primary-template?<br>
<br>
How can we deduce all of the dependent types from a non-type template parameter, if it's the only parameter of the primary template?<div class="im"><br>
<br>
<br>
<br>
struct Foo {};<br>
template <class> struct B { Foo x; }<br>
<br>
template <nontype P> struct A;<br></div>
// P is the primary-template param<div class="im"><br>
<br>
template <auto M, auto C, nontype P> struct A<M C::*P> {<br></div>
    // Given the call in main,<br>
    // M is deduced as Foo<br>
    // C is deduced as B<int><br>
    // P was passed successfully and we know the types that make it up.<br>
}<br>
<br>
int main() {<br>
    auto mp = &B<B<int>>::x<br>
    A<mp> a;<br>
}<br>
</blockquote></div><br></div><div class="gmail_extra" style>Hmm. Currently D can specify specType for alias template parameter.</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style><div class="gmail_extra">
struct X(alias int x) {}   // matches only when the symbol x has the type int</div><div class="gmail_extra">void main()</div><div class="gmail_extra">{</div><div class="gmail_extra">    int a;</div><div class="gmail_extra">
    X!a xa; // match OK</div><div class="gmail_extra">    long b;</div><div class="gmail_extra">    X!b xb; // match NG</div><div class="gmail_extra">}</div><div><br></div><div style>But, compiler does not allow parameterize of specType.</div>
<div style><br></div><div style><div>struct Foo {}</div><div>struct B(T) { static Foo x; }<br></div><div><br></div><div><div>//struct A(alias P) {}</div></div><div><div><br></div><div>struct A(alias M* P, M)    // matches only when the symbol P has the type M*</div>
</div><div><div>//struct A(alias C.M* P, M, C)</div></div><div>{</div><div>}</div><div><br></div><div><div>void main()</div><div>{</div><div>    auto mp = &B!(B!int).x;<br></div><div>    A!mp a;   // does not match...<br>
</div><div>}</div></div><div><br></div><div style>I think it should be allowed.</div><div style><br></div><div style>Kenji Hara</div></div></div></div>