- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting an error: (0): internal error: backend signals compiling following snippet of code - this is minimal isolated subset of bigger application that compiles and works fine with Visual C++ version 6.0 all the way to 2008.
The error is consistent between 32 and 64 bit version of Windows ICC compiler.
Interestingly - the problem disappears when **struct slice** is replaced by **namespace slice** so it seems something in the compiler namespace management is not quite correct.
Any ideas are welcome.
------- code begin -------------
namespace npointer
{
template struct arity
{
template struct type
{
typedef typename arity::type::lvalue_ptr_type lvalue_ptr_type;
typedef typename arity::type::ptr_type ptr_type;
typedef typename arity::type::ptr_type const_ptr_type;
};
};
template<> struct arity<1>
{
template struct type
{
typedef T* lvalue_ptr_type;
typedef T* const ptr_type;
typedef const T* const const_ptr_type;
};
};
template<> struct arity<0>
{
template struct type
{
typedef T& lvalue_ptr_type;
typedef T& ptr_type;
typedef const T& const_ptr_type;
};
};
}
struct slice
{
template
struct arity
{
template
struct type
{
typedef typename arity::type ret_type;
typename npointer::arity::type::ptr_type m_ptr;
&nb sp; type(typename npointer::arity::type::ptr_type p)
:m_ptr(p)
{}
ret_type operator[](int index) const
{
return ret_type(m_ptr[index]);
}
};
};
template<>
struct arity<1>
{
template
struct type
{
typedef typename T& ret_type;
typename npointer::arity<1>::type::ptr_type m_ptr;
type(typename npointer::arity<1>::type::ptr_type p):m_ptr(p){}
ret_type operator[](int index) const
{
return m_ptr[index];
}
};
};
};
The error is consistent between 32 and 64 bit version of Windows ICC compiler.
Interestingly - the problem disappears when **struct slice** is replaced by **namespace slice** so it seems something in the compiler namespace management is not quite correct.
Any ideas are welcome.
------- code begin -------------
namespace npointer
{
template
{
template
{
typedef typename arity
typedef typename arity
typedef typename arity
};
};
template<> struct arity<1>
{
template
{
typedef T* lvalue_ptr_type;
typedef T* const ptr_type;
typedef const T* const const_ptr_type;
};
};
template<> struct arity<0>
{
template
{
typedef T& lvalue_ptr_type;
typedef T& ptr_type;
typedef const T& const_ptr_type;
};
};
}
struct slice
{
template
struct arity
{
template
struct type
{
typedef typename arity
typename npointer::arity
&nb sp; type(typename npointer::arity
:m_ptr(p)
{}
ret_type operator[](int index) const
{
return ret_type(m_ptr[index]);
}
};
};
template<>
struct arity<1>
{
template
struct type
{
typedef typename T& ret_type;
typename npointer::arity<1>::type
type(typename npointer::arity<1>::type
ret_type operator[](int index) const
{
return m_ptr[index];
}
};
};
};
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hia bug has been reported based on this. Please wait for an update.
Thanks!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page