Commit 726195a
committed
Make MSVC conform to standard new throwing behaviour
Add /Zc:throwingNew so the compiler won't pointlessly generate null
checks for allocations. new has been defined to throw on failure since
C++98 and MSVC has implemented that since after version 6.0, but for
backwards compatibility reasons they still insert null checks. We
don't need that, we live in the future and use at least C++17, we can
assume that new throws rather than return nullptr on error.
This makes the MSVC build behave more like clang and gcc which is
nice, the fewer differences between environments the better.1 parent 0719d9e commit 726195a
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
0 commit comments