Skip to content

Commit

Permalink
Drop noexcept from an aligned new operator
Browse files Browse the repository at this point in the history
operator new is declared without noexcept in the standard library, and
used to be redeclared with noexcept in //base. That is inconsistent and
ill-formed in C++17.

This drops the problematic noexcept.

Change-Id: I7016b8fb935ba592f37fc0db97f040c717b8932c
Reviewed-on: https://chromium-review.googlesource.com/c/1414215
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623165}
  • Loading branch information
tzik authored and Commit Bot committed Jan 16, 2019
1 parent 2822f40 commit 2ca7fe1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions base/allocator/allocator_shim_override_cpp_symbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ ALIGN_DEL_NOTHROW(void* p, ALIGN_VAL_T, const std::nothrow_t&) __THROW {
ShimCppDelete(p);
}

SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW_ARR(
std::size_t size,
ALIGN_VAL_T alignment) __THROW {
SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW_ARR(std::size_t size,
ALIGN_VAL_T alignment) {
return ShimCppAlignedNew(size, static_cast<size_t>(alignment));
}

Expand Down

0 comments on commit 2ca7fe1

Please sign in to comment.