File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
namespace cross_module_exception_odr {
6
6
7
+ #if defined(_MSC_VER)
8
+ # pragma warning(push)
9
+ # pragma warning(disable : 4275)
10
+ #endif
11
+
7
12
class PYBIND11_EXPORT_EXCEPTION evolving : public std::runtime_error {
8
13
public:
9
14
explicit evolving (const std::string &msg) : std::runtime_error(" v1:" + msg) {}
10
15
};
11
16
17
+ #if defined(_MSC_VER)
18
+ # pragma warning(pop)
19
+ #endif
20
+
12
21
} // namespace cross_module_exception_odr
13
22
14
23
PYBIND11_MODULE (cross_module_exception_odr_1, m) {
Original file line number Diff line number Diff line change 4
4
5
5
namespace cross_module_exception_odr {
6
6
7
+ #if defined(_MSC_VER)
8
+ # pragma warning(push)
9
+ # pragma warning(disable : 4275)
10
+ #endif
11
+
7
12
class PYBIND11_EXPORT_EXCEPTION evolving : public std::exception {
8
13
public:
9
14
const char *what () const noexcept override { return " v2" ; }
10
15
};
11
16
17
+ #if defined(_MSC_VER)
18
+ # pragma warning(pop)
19
+ #endif
20
+
12
21
void raise_evolving_from_module_2 () { throw evolving (); }
13
22
14
23
} // namespace cross_module_exception_odr
You can’t perform that action at this time.
0 commit comments