Mention base::NoDestructor<> as workaround for "trivially destructible"
Open
lang:cpp
- Dominant language
- HTML
- Stars
- 39.6k
- Forks
- 12.9k
- Avg merge
- 42m
- Merged PRs (30d)
- 15
Description
In the "Static and global variables" section, can we mention that a workaround for using only objects that are trivially destructible is to use base::NoDestructor<>
For example, if you want to use a map in a static global, you can wrap it in that.
https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables
Contributor guide
Assessment
This issue has not been assessed yet.