diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-13 22:40:46 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-13 22:40:46 +0000 |
commit | 690bda8807a97827d72abf6ac2b350cf44de135e (patch) | |
tree | 3f33051a5cf5f9db7047b7addc70329f8fa1b635 /base/bind_helpers.h | |
parent | 388e4d376be45063c5ba65b4d089f245665b7917 (diff) | |
download | chromium_src-690bda8807a97827d72abf6ac2b350cf44de135e.zip chromium_src-690bda8807a97827d72abf6ac2b350cf44de135e.tar.gz chromium_src-690bda8807a97827d72abf6ac2b350cf44de135e.tar.bz2 |
MSVC warns when you try to use Base if T has a private destructor,
The common pattern for refcounted types. It does this even though
no attempt to instantiate Base is made. We disable the warning for
this portion of code.
BUG=none
TEST=try bots.
Review URL: http://codereview.chromium.org/6833006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/bind_helpers.h')
-rw-r--r-- | base/bind_helpers.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/base/bind_helpers.h b/base/bind_helpers.h index 92194e7..3293dbb 100644 --- a/base/bind_helpers.h +++ b/base/bind_helpers.h @@ -133,8 +133,17 @@ class SupportsAddRefAndRelease { void Release(); }; +// MSVC warns when you try to use Base if T has a private destructor, the +// common pattern for refcounted types. It does this even though no attempt to +// instantiate Base is made. We disable the warning for this definition. +#if defined(OS_WIN) +#pragma warning(disable:4624) +#endif struct Base : public T, public BaseMixin { }; +#if defined(OS_WIN) +#pragma warning(default:4624) +#endif template <void(BaseMixin::*)(void)> struct Helper {}; |