Re:Folly: An open-source C++ library developed and used at F...
by hn_go_brrrrr on Saturday January 08, 2022 @01:17AM
(#29849099)
When does std::variant allocate?
[ Parent
| on HN ]
Re:Folly: An open-source C++ library developed and used at F...
by PaulDavisThe1st on Saturday January 08, 2022 @01:23AM
(#29849134)
boost::variant will allocate to save state during construction of a new value type, in order to be able to roll back if the constructor throws an exception.
std::variant does not do this.