-
MSVC6 compiler sucks
After having another painfull night tweaking around various internal compiler errors, the compiler came up with this very funny excuse:
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xmemory(59) : error C2143: syntax error : missing ';' before '<end Parse>'
F:\C++\test_asm\Project.cpp(238) : see reference to function template instantiation 'const class v2 __cdecl v2::BORKID(struct eval_sum)' being compiled
and it pointed me to the line bolded here:
Code:
// TEMPLATE CLASS allocator
template<class _Ty>
class allocator {
public:
typedef _SIZT size_type;
typedef _PDFT difference_type;
typedef _Ty _FARQ *pointer;
typedef const _Ty _FARQ *const_pointer;
typedef _Ty _FARQ& reference;
typedef const _Ty _FARQ& const_reference;
typedef _Ty value_type;
pointer address(reference _X) const
{return (&_X); }
const_pointer address(const_reference _X) const
{return (&_X); }
pointer allocate(size_type _N, const void *)
{return (_Allocate((difference_type)_N, (pointer)0)); }
char _FARQ *_Charalloc(size_type _N)
{return (_Allocate((difference_type)_N,
(char _FARQ *)0)); }
void deallocate(void _FARQ *_P, size_type)
{operator delete(_P); }
void construct(pointer _P, const _Ty& _V)
{_Construct(_P, _V); }
void destroy(pointer _P)
{_Destroy(_P); }
_SIZT max_size() const
{_SIZT _N = (_SIZT)(-1) / sizeof (_Ty);
return (0 < _N ? _N : 1); }
};
Isn't that just wonderful :mad:
-
HAHAHAHAHA :D:D:D
Sorry...
Have you ever thought about writing your own C++ compiler?
-
Many times :D Might do that someday ;)
Anyways things started working again, funny how the compiler can go totally nuts just because you forget to use a reference in the templatized constructor (the copy contructor needs that one)
While we're at it, do you know how to do a specification on the contructors?
-
-
cool :cool:
what about templates as template parameters?
template <class A>class a{};
template <class A,class B>class b{A<B> c;};
b<a> d;
can borland do this too?