にゃははー

はへらー

CRTP...?

端的に言うと

struct S {};

struct E
{
	template < typename D >
	struct impl
	{ typedef typename D::template rebind< S >::type type; };
};

template < typename T >
struct C : T::template impl< C< T > >
{
	template < typename U >
	struct rebind
	{ typedef C< U > type; };
};

C< E > c;

が通らない。
https://ideone.com/HhcTQ

CRTPってDerived typeのmember type取れないとか意味わからん制限あったっけ...?
とりあえずなにかwa考えないと...

== 10/1追記
iorateさんが教えてくれました。

もしやと思ったけどやはりそうか。