diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-01-14 17:20:36 -0500 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-01-14 17:21:07 -0500 |
commit | 1ca54ce0c33b691b1427e2b9f4a709835a02e25e (patch) | |
tree | d39806fdb5638e23a35401e62a970d0d27f4ff9a /src/mongo/util/intrusive_counter.h | |
parent | e5f17aafb8c2fbdcb9f7e6b478594a676fd2955b (diff) | |
download | mongo-1ca54ce0c33b691b1427e2b9f4a709835a02e25e.tar.gz |
SERVER-10142: Eliminate Compiler Warnings on Windows Builders
Diffstat (limited to 'src/mongo/util/intrusive_counter.h')
-rw-r--r-- | src/mongo/util/intrusive_counter.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/util/intrusive_counter.h b/src/mongo/util/intrusive_counter.h index 51c92061bbb..911203085d1 100644 --- a/src/mongo/util/intrusive_counter.h +++ b/src/mongo/util/intrusive_counter.h @@ -115,7 +115,15 @@ namespace mongo { StringData stringData() const { return StringData(c_str(), _size); } static intrusive_ptr<const RCString> create(StringData s); + +// MSVC: C4291: 'declaration' : no matching operator delete found; memory will not be freed if +// initialization throws an exception +// We simply rely on the default global placement delete since a local placement delete would be +// ambiguous for some compilers +#pragma warning(push) +#pragma warning(disable : 4291) void operator delete (void* ptr) { free(ptr); } +#pragma warning(pop) private: // these can only be created by calling create() |