|
Boost : |
From: John Maddock (John_Maddock_at_[hidden])
Date: 2002-01-14 07:19:10
>There were very few compiler fixes after Beta2, so it's probably not
>fixed. If you send me a testcase, I'll look for a fix (and I'll make
>sure newer compilers don't ICE.)
The test case is quite small:
#include <boost/type_traits.hpp>
namespace boost{
template<int N, typename Tuple>
struct element
{
};
template<int N, typename Tuple>
struct element_ref
{
private:
typedef element<N, Tuple> e_type;
typedef typename e_type::RET elt_type;
typedef add_reference<elt_type> ar_t;
public:
typedef typename ar_t::type RET;
typedef RET type;
};
}
int main(){ return 0; }
Interestingly the following program also fails, note that now we only
forward declare boost::add_reference, the code should still compile, but
fails to do so, with a complaint about add_reference being incomplete. It
looks to me that the compiler is trying to semi-instantiate a template that
should never in fact be instantiated.
namespace boost{
template <class T>
struct add_reference;
template<int N, typename Tuple>
struct element;
template<int N, typename Tuple>
struct element_ref
{
private:
typedef element<N, Tuple> e_type;
typedef typename e_type::RET elt_type;
typedef add_reference<elt_type> ar_t;
public:
typedef typename ar_t::type RET;
typedef RET type;
};
}
int main(){ return 0; }
- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk