Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Placement new" conflicts with MemoryLeakDetectorNewMacros.h #1114

Closed
leventesen opened this issue Aug 6, 2017 · 1 comment
Closed

"Placement new" conflicts with MemoryLeakDetectorNewMacros.h #1114

leventesen opened this issue Aug 6, 2017 · 1 comment

Comments

@leventesen
Copy link

There is a sample code at http://www.sourcetricks.com/2008/05/c-placement-new.html
It conflicts with MemoryLeakDetectorNewMacros.h
Error is in line: #define new new(FILE, LINE)

@Andne
Copy link
Contributor

Andne commented Aug 7, 2017

The documentation located here can help with this: http://cpputest.github.io/manual.html#memory_leak_detection

Look at the sections about conflicts with STL or your own macros, similar action needs to be taken in order to correct this for placement new. In my code I tend to just #undef new at the top of any file containing placement new (I don't use it a lot but sometimes need to), but better solutions may exist as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants