This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Boost's call_traits_test.cpp
- To: pcarlini at unitus dot it
- Subject: Re: Boost's call_traits_test.cpp
- From: Paolo Carlini <pcarlini at unitus dot it>
- Date: Wed, 25 Apr 2001 20:17:34 +0200
- CC: gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, bkoz at redhat dot com, gdr at codesourcery dot com
- Organization: Universita' della Tuscia
- References: <3AE6FB21.51F64EA@unitus.it>
- Reply-To: pcarlini at unitus dot it
Hi again,
I'm replying to myself since in the meanwhile I learned that the problem is
*far more* subtle than I thought (help!)...
There are *two* distinct issues, one at compilation time, another at run
time:
1- At compilation time, there is something strange going on with the
typedefs. Using the couple of typedefs:
typedef int& r_type;
typedef const r_type cr_type;
and then:
type_test(int&, boost::call_traits<cr_type>::value_type)
is *not* equivalent for Gcc (but it is for a couple of well respected
compilers ;) to esplicitly writing:
type_test(int&, boost::call_traits<const int&>::value_type)
In the second case the compilation errors disappears and apperently the
correct template is instantiated.
Perhaps this has to do with the intrinsic not-correctness of "const &"
ouside templates, *I don't know*!
2- At run time, 3 out 4 of those tests fail... This is a different issue,
perhaps only vaguely connected to the former...
Toughts???
P.
P.S. I have just noticed a message by Peter Schmid pointing at PR2362. I
will look into it!