boostorg / core

Boost Core Utilities
133 stars 83 forks source link

Move `value_initialized` from Utility #76

Open Kojoley opened 4 years ago

Kojoley commented 4 years ago

The only user of that header is MPL, but it will allow to drop MPL dependence on Utility.

pdimov commented 4 years ago

value_init.hpp uses TypeTraits and Core is not allowed to depend on TypeTraits.

pdimov commented 4 years ago

I now remember that last time at looked at that, I came up with a way to insert the zero-initialization without using aligned storage, through a base class: https://godbolt.org/z/WMNRPc

Kojoley commented 4 years ago

Nice one! BCC55 is fine with that way.

pdimov commented 4 years ago

See https://github.com/boostorg/utility/pull/66.