Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable constexpr vector internal tests #1690

Merged
merged 1 commit into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions stl/inc/vector
Original file line number Diff line number Diff line change
Expand Up @@ -1776,8 +1776,9 @@ private:
const auto _Temp = *_Pnext; // TRANSITION, VSO-1269037
_Pnext = &_Temp->_Mynextiter;
} else { // orphan the iterator
(*_Pnext)->_Myproxy = nullptr;
*_Pnext = (*_Pnext)->_Mynextiter;
const auto _Temp = *_Pnext; // TRANSITION, VSO-1269037
_Temp->_Myproxy = nullptr;
*_Pnext = _Temp->_Mynextiter;
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions tests/std/tests/P1004R2_constexpr_vector/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

using namespace std;

#if defined(__EDG__) \
|| _ITERATOR_DEBUG_LEVEL != 2 // || defined(MSVC_INTERNAL_TESTING) // TRANSITION, VSO-1270433, VSO-1275530
#if defined(__EDG__) || _ITERATOR_DEBUG_LEVEL != 2 \
|| defined(MSVC_INTERNAL_TESTING) // TRANSITION, VSO-1270433, VSO-1275530
static constexpr int input[] = {0, 1, 2, 3, 4, 5};
#endif // defined(__EDG__) || _ITERATOR_DEBUG_LEVEL != 2 || defined(MSVC_INTERNAL_TESTING)

Expand Down Expand Up @@ -64,8 +64,8 @@ struct soccc_allocator {
using vec = vector<int, soccc_allocator<int>>;

_CONSTEXPR20_CONTAINER bool test_interface() {
#if defined(__EDG__) \
|| _ITERATOR_DEBUG_LEVEL != 2 // || defined(MSVC_INTERNAL_TESTING) // TRANSITION, VSO-1270433, VSO-1275530
#if defined(__EDG__) || _ITERATOR_DEBUG_LEVEL != 2 \
|| defined(MSVC_INTERNAL_TESTING) // TRANSITION, VSO-1270433, VSO-1275530
{ // constructors

// Non allocator constructors
Expand Down Expand Up @@ -513,8 +513,8 @@ _CONSTEXPR20_CONTAINER bool test_interface() {
}

_CONSTEXPR20_CONTAINER bool test_iterators() {
#if defined(__EDG__) \
|| _ITERATOR_DEBUG_LEVEL != 2 // || defined(MSVC_INTERNAL_TESTING) // TRANSITION, VSO-1270433, VSO-1275530
#if defined(__EDG__) || _ITERATOR_DEBUG_LEVEL != 2 \
|| defined(MSVC_INTERNAL_TESTING) // TRANSITION, VSO-1270433, VSO-1275530
vec range_constructed(begin(input), end(input));

#if !defined(__EDG__) || _ITERATOR_DEBUG_LEVEL != 2 // TRANSITION, VSO-1273381
Expand Down Expand Up @@ -614,8 +614,8 @@ _CONSTEXPR20_CONTAINER bool test_iterators() {
}

_CONSTEXPR20_CONTAINER bool test_growth() {
#if defined(__EDG__) \
|| _ITERATOR_DEBUG_LEVEL != 2 // || defined(MSVC_INTERNAL_TESTING) // TRANSITION, VSO-1270433, VSO-1275530
#if defined(__EDG__) || _ITERATOR_DEBUG_LEVEL != 2 \
|| defined(MSVC_INTERNAL_TESTING) // TRANSITION, VSO-1270433, VSO-1275530
{
vector<int> v(1000, 1729);

Expand Down