|
Boost : |
From: Thomas Witt (witt_at_[hidden])
Date: 2002-05-10 06:19:35
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 10 May 2002 12:37, John Maddock wrote:
> Yes, is_convertible only detects whether a type is *declared* as being
> convertible from one type to another: and in this case it is isn't it? It
> does not consider whether the implementation of the conversion contains
> legal code. Consider what would happen if template class A were declared
> as exported - in this case is_convertible would only have access to the
> declaration of the template and not the implementation in any case.
> Alternatively those compilers that instantiate templates at link time would
> also necessarily ignore the conversion implementation, and look only at the
> declaration. IMO is_convertible is doing the right thing.
I was not argueing whether it does the right thing. Yes technically it does
the right thing. What makes me feel uncomfortable is that it does not play
nice with a common idiom, templated forwarding functions, in this case
templated conversion operators.
Thomas
- --
Dipl.-Ing. Thomas Witt
Institut fuer Verkehrswesen, Eisenbahnbau und -betrieb, Universitaet Hannover
voice: +49(0) 511 762 - 4273, fax: +49(0) 511 762-3001
http://www.ive.uni-hannover.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE826zL0ds/gS3XsBoRAjISAJ9eFSIruyWuPc7yTtZBGn9Vq+ms2wCcCppX
2Qk1Eu5GlShHvpTQKLFBD2o=
=kpO7
-----END PGP SIGNATURE-----
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk