Skip to content

Commit c90353d

Browse files
committed
recover system_state requirement on random_access_iterator
1 parent 0e145a1 commit c90353d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

include/core/concepts.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22
#include <concepts>
33
#include <type_traits>
4+
#include <iterator>
45
#include <string>
56

67
// Time type concept - basic arithmetic types that can represent time
@@ -13,8 +14,10 @@ concept system_state = requires(T state) {
1314
typename T::value_type;
1415
requires std::is_arithmetic_v<typename T::value_type>;
1516
requires !std::same_as<T, std::string>; // Exclude string types
16-
{ state.size() } -> std::convertible_to<std::size_t>;
17-
{ state.begin() };
18-
{ state.end() };
17+
requires requires {
18+
{ state.size() } -> std::convertible_to<std::size_t>;
19+
{ state.begin() } -> std::random_access_iterator;
20+
{ state.end() } -> std::random_access_iterator;
21+
};
1922
{ state[0] } -> std::convertible_to<typename T::value_type>;
2023
};

0 commit comments

Comments
 (0)