Boost logo

Boost Users :

Subject: Re: [Boost-users] [MPL] implementing a "trait"?
From: John M. Dlugosz (ngnr63q02_at_[hidden])
Date: 2014-02-05 02:57:13


On 2/4/2014 12:52 PM, Wouter van Ooijen wrote:
> I use
>
> typedef void has_some_interface;
>
> inside the class to identify that a class implements some interface.

That's the kind I was looking for; thanks.

> In practice I write the identification type in an 'archetype'

I see that the archetype provides the typedef, but what's the point of the static
functions? You have to use the actual concrete type to call the right function, so having
them declared in the base class doesn't let you use them in the manner of a virtual function.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net