"http://msdn.microsoft.com/en-us/library/3tdb471s(VS.80).aspx
It might also be good to mention that you need to be very careful if you have
static data in the base class, and to see the article for more."
So just blindly adding this macro is apparently dangerous. But
requiring the macro might not have helped to raise awareness if
everybody just blindly adds it as you say.
(I don't have an opinion; just adding background.)
Nico
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
From http://codereview.chromium.org/6969077 (which added this):
"http://msdn.microsoft.com/en-us/library/3tdb471s(VS.80).aspx
It might also be good to mention that you need to be very careful if you have
static data in the base class, and to see the article for more."
So just blindly adding this macro is apparently dangerous. But
requiring the macro might not have helped to raise awareness if
everybody just blindly adds it as you say.
AFAIK, VS is the only compiler that generates this warning; if they
others can, they probably should be.
As the article Nico references points out, this macro shouldn't be
added blindly, and it's the coder's (and reviewer's) job to know when
this is safe or not. I would not recommend turning the warning off.
-- Dirk
Sorry, I should have also noted that there were many times when I was
working on component builds where I ran across this warning, and it
told me that the correct thing to do was to export the base class
(which is the alternative). So, we don't all always blindly add it :).
> -- Dirk
> -- Dirk