This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Boost's call_traits_test.cpp


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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]