|
Boost : |
From: Mike Conley (conley.141_at_[hidden])
Date: 2003-04-27 10:32:49
David Abrahams <dave_at_[hidden]> wrote in
news:ubrys7jp1.fsf_at_[hidden]:
> That completely scuttles the ODR, as far as I can tell.
Naturally, you wouldn't want to use a built in is_convertible this way.
Better to pass it as a template parameter directly, rather than wrapping
it: and_<is_const<T>, is_convertible<T,int> >.
If you know that the result of is_convertible depends on context, and you
know about the ODR, then you know not to use is_convertible to as part of a
metafunction's return value without also making it part of the
metafunction's type (ie, using it as a template parameter).
-- Mike Conley
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk