Boost logo

Boost Users :

Subject: [Boost-users] variant has non-trivial destructor even when all constituents have trivial destructor
From: 谢任中 (joshchia_at_[hidden])
Date: 2015-11-26 21:58:04


It seems that boost::variant has non-trivial destructor even for something
like boost::variant<int32_t, int64_t>. Thus, It cannot be used in
situations that call for a POD where calling the destructor is trivial.

Particularly, I can't have a boost::lock_free::queue<boost::variant<X, Y>>
even both X and Y are trivially destructible.

How about making boost::variant trivially-destructible when everything in
it is trivially-destructible?



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net