#4977 added several scope guard types to our implementation of vector, while one of them doesn't have constexpr destructor yet.
|
~_Vaporization_guard() noexcept {
|
|
if (_Target != nullptr) {
|
|
auto& _Al = _Target->_Getal();
|
|
auto& _Mylast = _Target->_Mypair._Myval2._Mylast;
|
|
|
|
_Target->_Orphan_range(_Vaporized_first, _Vaporized_last);
|
|
_STD _Destroy_range(_Destroyed_first, _Mylast, _Al);
|
|
_Mylast = _Vaporized_first;
|
|
}
|
Lack of constexpr was deliberate - since _Vaporization_guard objects are only created and destroyed during exception handling, which can't happen during exception at this moment.
However, WG21-P3068R6 (tracked by #5136) makes exception handling compatible with constant evaluation, and the paper is recently adopted for C++26. So we need to add _CONSTEXPR26 once P3068 gets implemented (which means that this issue is blocked until that moment).
#4977 added several scope guard types to our implementation of
vector, while one of them doesn't haveconstexprdestructor yet.STL/stl/inc/vector
Lines 637 to 645 in 5e0ddad
Lack of
constexprwas deliberate - since_Vaporization_guardobjects are only created and destroyed during exception handling, which can't happen during exception at this moment.However, WG21-P3068R6 (tracked by #5136) makes exception handling compatible with constant evaluation, and the paper is recently adopted for C++26. So we need to add
_CONSTEXPR26once P3068 gets implemented (which means that this issue is blocked until that moment).