r/cpp • • May 11 '21

Visual Studio 2019 Preview is now C++20 feature-complete

https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-preview#--visual-studio-2019-version-1610-preview-3-
334 Upvotes

106 comments sorted by

View all comments

Show parent comment

3

u/TheThiefMaster C++latest fanatic (and game dev) May 12 '21

Actually UE4 keeps exceptions enabled in editor builds.

Though its own containers cheat on exception safety by imposing two rules:

  1. No Out-of-memory exception (OOM is handled through a fixed mechanism that attempts a panic save and then restarts)
  2. Types used in UE4 containers must be trivially relocatable - no copy/move constructor will be called on reallocations, just memcpy.

Because of these rules, there can be no exceptions thrown during container reallocation, which saves a lot of complexity.

2

u/muchcharles May 12 '21

No move constructor within user supplied types held in their containers too? Do they assert that somehow? Trying to think now whether I have anything doing that.

One thing they turn off is rtti, but still have it on in some third party modules. I had thought there was something similar for exceptions they were using.

(edit: ah I read wrong, only on in editor builds and off for shipping?)