8000 Remove emplace hack that was introduced for OSX · arangodb/arangodb@2b0a4cd · GitHub
[go: up one dir, main page]

Skip to content

Commit 2b0a4cd

Browse files
committed
Remove emplace hack that was introduced for OSX
1 parent d329c0d commit 2b0a4cd

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

3rdParty/rocksdb/6.2/utilities/transactions/transaction_base.cc

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -121,48 +121,12 @@ Status TransactionBaseImpl::TryLock(ColumnFamilyHandle* column_family,
121121
assume_tracked);
122122
}
123123

124-
#if defined(__APPLE__) && _LIBCPP_STD_VER > 14
125-
// miserable hack to access the container member of std::stack
126-
// this is done because on older xcode stl versions
127-
// std::stack::emplace does not work correctly
128-
// this hack should not be ported to new versions
129-
// please consinder to increase the xcode version
130-
// requirements instead.
131-
132-
template<typename type>
133-
struct access {
134-
inline static type member_pointer;
135-
};
136-
137-
template<typename type, type pointer>
138-
struct create_access : access<type> {
139-
struct assign_pointer {
140-
assign_pointer() { access<type>::member_pointer = pointer; }
141-
};
142-
inline static assign_pointer by_calling_default_ctor;
143-
};
144-
145-
146-
using member_type = autovector<TransactionBaseImpl::SavePoint>;
147-
using container_type = std::stack<TransactionBaseImpl::SavePoint, autovector<TransactionBaseImpl::SavePoint>>;
148-
using private_type = member_type container_type::*;
149-
template struct create_access<private_type, &container_type::c>;
150-
#endif
151-
152124
void TransactionBaseImpl::SetSavePoint() {
153125
if (save_points_ == nullptr) {
154126
save_points_.reset(new std::stack<TransactionBaseImpl::SavePoint, autovector<TransactionBaseImpl::SavePoint>>());
155127
}
156-
157-
#if defined(__APPLE__) && _LIBCPP_STD_VER > 14
158-
((*save_points_).*access<private_type>::member_pointer).emplace_back(
159-
snapshot_, snapshot_needed_, snapshot_notifier_,
160-
num_puts_, num_deletes_, num_merges_);
161-
162-
#else
163128
save_points_->emplace(snapshot_, snapshot_needed_, snapshot_notifier_,
164129
num_puts_, num_deletes_, num_merges_);
165-
#endif
166130
write_batch_.SetSavePoint();
167131
}
168132

0 commit comments

Comments
 (0)
0