How about having B declare its constructors private and make T a friend so it has access? Richard Damon -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Stefan Schild Sent: Thursday, October 05, 2006 4:51 PM To: boost-users@lists.boost.org Subject: [Boost-users] Enforcing CRTP with the MPL? Hi there Having a templatized base class B template<class T> class B ..... is it possible to enforce that a class D can derive from B IF AND ONLY IF the curiously recurring template pattern is applied, that is class D1 : public B<D1> ... // ok, compile class D2 : public B<X> ... // not ok, do not compile ??? Thx Stefan _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users