On 14 April 2016 at 14:43, Frank Winter <fwin...@jlab.org> wrote: > Hi all! > > Suppose you'd want to implement a simple EDSL (Embedded Domain Specific > Language) with Boost.proto with the following requirements: > > Custom class 'Vector' as terminal > Classes derived from 'Vector' are working terminals too, e.g. Vector10 > > [...]
template<typename T> > struct IsVector > : mpl::false_ > {}; > > > template<> > struct IsVector< Vector > > : mpl::true_ > {}; > > Surely this should be true for all types derived from Vector. template<typename T, typename Enable = void> struct IsVector : mpl::false_ {}; template<typename T> struct IsVector<T, typanem enable_if< is_base_of<Vector, T> >::type> : mpl::true_ {};
_______________________________________________ proto mailing list proto@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/proto