
14 Nov
2008
14 Nov
'08
10:24 p.m.
I was in the middle of typing up a proposal for what Bruno suggests, but had a different solution to knowing whether a specialization exists. My solution was simply to register the conceptual type of the object with a meta function, which indicates both that the corresponding traits should also be defined as well as an easy way to tell what conceptual type that object most closely models.
<snip>
Indeed it's another right approach I think, don't know either which one would be the best one. Unless I missed something, you can use the Boost.TypeTraits's is_same in conjunction with enable_if instead of your SFINAE_is_same_type. Bruno