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

More modern way of setting the biggest size_t in PBC #1146

Merged
merged 1 commit into from
Oct 23, 2024
Merged
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
3 changes: 2 additions & 1 deletion src/tools/Pbc.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "small_vector/small_vector.h"
#include <vector>
#include <cstddef>
#include <limits>

namespace PLMD {

Expand All @@ -43,7 +44,7 @@ class MemoryView {
};

namespace helpers {
inline constexpr std::size_t dynamic_extent = -1;
inline constexpr std::size_t dynamic_extent = std::numeric_limits<std::size_t>::max();
}
//this more or less mocks c++23 mdspan without the fancy multi-indexed operator[]
//the idea is to take an address that you know to be strided in a certain way and
Expand Down