c++.beta - boost 1_30_0 type_traits tests
- Richard Grant (46/46) Mar 27 2003 The samples below are extractions from 3 failed cases among some thousan...
- Walter (1/1) Mar 27 2003 Thanks, I'll add them to the bug list!
-
Alisdair Meredith
(10/12)
Mar 27 2003
Nothing to do with typetraits, just a simple boost question
- Richard Grant (2/4) Mar 27 2003 You'll have to go begging to Christof. I'm still working by hand.
- Christof Meerwald (8/12) Mar 28 2003 Have a look at http://cmeerw.org/prog/dm/boost.html - still not perfect,...
- John Fletcher (3/15) Apr 16 2003 Is this compatible with Boost 1_30_0, please?
- Christof Meerwald (10/17) Apr 16 2003 the patch for Boost 1.29.0 doesn't cleanly apply to Boost 1.30.0 (but th...
- Walter (13/26) Mar 31 2003 I fixed the first two, but the third has me concerned:
- Walter (1/1) Mar 31 2003 Never mind :-(
The samples below are extractions from 3 failed cases among some thousand or so working test cases for the type_traits lib. Note that I am concerned with compilation of the tests, and not execution of the tests. ADD_CONST This following is a sample code from one of the add_const tests. It compiles for each of the builtin types, and enums, but chokes on user defined types.. I have included add_const<int const> to show how builtin compiles fine. struct A { A(int i) { } }; template <class T> struct add_const { typedef T const type; }; int main() { add_const<int const>::type c = 0; add_const<A const>::type a = 0; //Error: illegal combination of types } ADD_VOLATILE Similiar to const above, this one handles everything but the user defined type. struct A { A(int i) { } }; template <class T> struct add_volatile { typedef T volatile type; }; int main() { add_volatile<int volatile>::type c = 0; add_volatile<A volatile>::type a = 0; //Error: illegal combination of types } IS_BASE_AND_DERIVED This is a somewhat new approach to perfoming templatized RTTI without the C++ RTTI mechanism.. It returns true if the derived class is derived from the base class and false otherwise. Virtually all of the 200 or so tests from this section work (including the "tricky" partial specialization compiler torture tests), but when supplied with two references, some problems arise.. template <class T, class U> struct A; template <class T, class U> struct A<T,U&> { }; template <class T, class U> struct A<T&,U> { }; template <class T, class U> struct A<T&,U&> { }; int main() { A<int&,int&> a; //Error: ambiguous match of class template partial specialization 'A' } Richard
Mar 27 2003
Richard Grant wrote:The samples below are extractions from 3 failed cases among some thousand or so working test cases for the type_traits lib.Nothing to do with typetraits, just a simple boost question <g> Do you have a dmc_tools.jam I can steal to build the boost libraries with bjam? Now I have got my head around the regression suite, I would quite like to add DMC to my testing. Unfortunately, I am not yet familiar enough with either DMC or xxx-tools.jam files to write my own yet. -- AlisdairM
Mar 27 2003
Do you have a dmc_tools.jam I can steal to build the boost libraries with bjam?You'll have to go begging to Christof. I'm still working by hand. Richard
Mar 27 2003
On Thu, 27 Mar 2003 22:57:15 +0000, Alisdair Meredith wrote:Have a look at http://cmeerw.org/prog/dm/boost.html - still not perfect, but mostly useable. bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?The samples below are extractions from 3 failed cases among some thousand or so working test cases for the type_traits lib.Do you have a dmc_tools.jam I can steal to build the boost libraries with bjam?
Mar 28 2003
Christof Meerwald wrote:On Thu, 27 Mar 2003 22:57:15 +0000, Alisdair Meredith wrote:Is this compatible with Boost 1_30_0, please? JohnHave a look at http://cmeerw.org/prog/dm/boost.html - still not perfect, but mostly useable. bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?The samples below are extractions from 3 failed cases among some thousand or so working test cases for the type_traits lib.Do you have a dmc_tools.jam I can steal to build the boost libraries with bjam?
Apr 16 2003
On Wed, 16 Apr 2003 12:05:14 +0100, John Fletcher wrote:Christof Meerwald wrote:the patch for Boost 1.29.0 doesn't cleanly apply to Boost 1.30.0 (but the Jam related things should be OK). BTW, I am currently working on updating my patch for Boost 1.30.0... (will hopefully have something useable in the next few days) bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?On Thu, 27 Mar 2003 22:57:15 +0000, Alisdair Meredith wrote:Is this compatible with Boost 1_30_0, please?Do you have a dmc_tools.jam I can steal to build the boost libraries with bjam?Have a look at http://cmeerw.org/prog/dm/boost.html - still not perfect, but mostly useable.
Apr 16 2003
I fixed the first two, but the third has me concerned: "Richard Grant" <fractal clark.net> wrote in message news:b5vfln$23ut$1 digitaldaemon.com...This is a somewhat new approach to perfoming templatized RTTI without theC++RTTI mechanism.. It returns true if the derived class is derived from thebaseclass and false otherwise. Virtually all of the 200 or so tests from this section work (including the "tricky" partial specialization compilertorturetests), but when supplied with two references, some problems arise.. template <class T, class U> struct A; template <class T, class U> struct A<T,U&> { }; template <class T, class U> struct A<T&,U> { }; template <class T, class U> struct A<T&,U&> { }; int main() { A<int&,int&> a; //Error: ambiguous match of class template partial specialization 'A' }I think this case *is* ambiguous. Class partial specialization matches do not go with the 'best' match like function overloading does, it goes with whichever is 'most specialized'. Most specialized is determined by if the arguments for one can be used as arguments to another, but not vice versa. In the case of references, each specialization here can be arguments to each other specialization. None is 'more specialized' than the other, hence it is ambiguous.
Mar 31 2003