Results 1 to 5 of 5

Thread: MSVC6 compiler sucks

  1. #1

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Angry 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
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    HAHAHAHAHA
    Sorry...

    Have you ever thought about writing your own C++ compiler?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Many times 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?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Borlands compiler is far better at those things. It compiled these things without any problems:
    http://www.vbforums.com/showthread.p...hreadid=114931
    http://www.vbforums.com/showthread.p...hreadid=122023
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width