Skip to content

Commit 86add13

Browse files
derekmaurocopybara-github
authored andcommitted
Disable warning C4251 around refactored code
PiperOrigin-RevId: 455452553 Change-Id: I1dc3772ae61daf6d2d39484a0b1aad7eb0134525
1 parent 191ca1f commit 86add13

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

googletest/include/gtest/gtest-assertion-result.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
#include "gtest/gtest-message.h"
4747
#include "gtest/internal/gtest-port.h"
4848

49+
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
50+
/* class A needs to have dll-interface to be used by clients of class B */)
51+
4952
namespace testing {
5053

5154
// A class for indicating whether an assertion was successful. When
@@ -229,4 +232,6 @@ GTEST_API_ AssertionResult AssertionFailure(const Message& msg);
229232

230233
} // namespace testing
231234

235+
GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251
236+
232237
#endif // GOOGLETEST_INCLUDE_GTEST_GTEST_ASSERTION_RESULT_H_

googletest/include/gtest/internal/gtest-port.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,9 @@ class GTEST_API_ AutoHandle {
12001200
// Nothing to do here.
12011201

12021202
#else
1203+
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
1204+
/* class A needs to have dll-interface to be used by clients of class B */)
1205+
12031206
// Allows a controller thread to pause execution of newly created
12041207
// threads until notified. Instances of this class must be created
12051208
// and destroyed in the controller thread.
@@ -1233,6 +1236,7 @@ class GTEST_API_ Notification {
12331236
std::condition_variable cv_;
12341237
bool notified_;
12351238
};
1239+
GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251
12361240
#endif // GTEST_HAS_NOTIFICATION_
12371241

12381242
// On MinGW, we can have both GTEST_OS_WINDOWS and GTEST_HAS_PTHREAD

0 commit comments

Comments
 (0)