Skip to content

Commit

Permalink
Merge branch 'msvc-C5045' into 'master'
Browse files Browse the repository at this point in the history
mitigate C5045

See merge request correaa/boost-multi!1355
  • Loading branch information
correaa committed Feb 17, 2025
2 parents bbef718 + 723d27a commit 025e12c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/boost/multi/detail/layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ struct extensions_t : boost::multi::detail::tuple_prepend_t<index_extension, typ
template<class... Indices>
constexpr auto prev_canonical(index& idx, Indices&... rest) const -> bool { // NOLINT(google-runtime-references) idx is mutated
if(extensions_t<D-1>{this->base().tail()}.prev_canonical(rest...)) { --idx; }
if(idx < this->base().head().first()) {
idx = this->base().head().back();
if(idx < static_cast<index>(this->base().head().first())) {
idx = static_cast<index>(this->base().head().back());
return true;
}
return false;
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ else()
/wd4868 # compiler may not enforce left-to-right evaluation order in braced initializer list
/wd5026 # move constructor was implicitly defined as deleted
/wd5027 # move assignment operator was implicitly defined as deleted
/wd5045 # Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
>
)

Expand Down

0 comments on commit 025e12c

Please sign in to comment.