Boost logo

Boost :

From: Daniel James (daniel_at_[hidden])
Date: 2005-01-21 11:09:10


Joaquín Mª López Muñoz wrote:
> The following simple snippet ICEs in MSVC 6.5:
>
> #include <boost/mpl/vector_c.hpp>
> #include <boost/mpl/assert.hpp>
>
> template<int N>
> struct foo:boost::mpl::vector_c<int,N>
> {
> };
>
> Yet, this version (where assert.hpp is included
> first) compiles fine:
>
> #include <boost/mpl/assert.hpp>
> #include <boost/mpl/vector_c.hpp>
>
> template<int N>
> struct foo:boost::mpl::vector_c<int,N>
> {
> };
>

I might know what this is, but I haven't got access to Visual C++ at the
moment, so I'm not sure. Anyway, try this:

#include <boost/mpl/vector_c.hpp>
#include <boost/mpl/assert.hpp>

class dummy { void func(); };

template<int N>
struct foo:boost::mpl::vector_c<int,N>
{
};

Here's a simple example of code which triggers this bug:

namespace y1
{
     struct y2 {};
}

struct x1
{
     void x2(y1::y2);
};

// This line prevents the Internal Compiler Error:
// class dummy { void func(); };

template <int N> struct z {};

Daniel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk