overriding operator new[] - (VC 4.2) 
Author Message
 overriding operator new[] - (VC 4.2)

I am exporting classes from a DLL and must restrict consumers of the DLL to
free store allocation within the DLL. I want the memory management to be
transparent, so I have overridden operator new for each class.

My problem is that the compiler is {*filter*} on the following operator new[]
declaration:

class EXPORTING_STUFF  ClassName
{
        ...
        void* operator new[](size_t nSize);
        ...

Quote:
};

The normal operator new overrides without any problem. It's the array
version that chokes.

Does version 4.2 of the compiler not allow operator new[] to be overriden
within a class? For various reasons I am not able to use the Standard C++
Library, so allocators are out.

Thanks in advance for any help.



Sun, 23 Jan 2000 03:00:00 GMT  
 overriding operator new[] - (VC 4.2)

I see now that version 4.x does not support overriding of operator new[]
according to PRB: C2092 of the MSDN knowledge base.



Quote:
> I am exporting classes from a DLL and must restrict consumers of the DLL

to...


Mon, 24 Jan 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Global operator new (::new) overriding

2. How To Override The New / delete Operator ?

3. ? How to override new operator in VC6.0-help

4. overriding operators new and delete

5. Overriding the "new" operator

6. Overriding the new operator in debug mode...

7. overriding the new operator gives syntax errors?

8. How To Override The New / delete Operator ?

9. overriding the global new and delete operators

10. std::string and globally overridden operator new

11. Problems debugging MFC under VC 4.2 with separate VC 5.0 installation present

12. VC 4.2 link error linking static libraries from VC 6.0

 

 
Powered by phpBB® Forum Software