Skip to content

Commit 770a2ff

Browse files
committed
Refactor system_state concept in core concepts header
- Removed unnecessary iterator requirements for the system_state concept. - Added requirement for direct access to elements using the subscript operator. - Improved clarity and usability of the concept definition.
1 parent 3595d61 commit 770a2ff

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

include/core/concepts.hpp

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

76
// Time type concept - basic arithmetic types that can represent time
@@ -14,9 +13,8 @@ concept system_state = requires(T state) {
1413
typename T::value_type;
1514
requires std::is_arithmetic_v<typename T::value_type>;
1615
requires !std::same_as<T, std::string>; // Exclude string types
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-
};
16+
{ state.size() } -> std::convertible_to<std::size_t>;
17+
{ state.begin() };
18+
{ state.end() };
19+
{ state[0] } -> std::convertible_to<typename T::value_type>;
2220
};

0 commit comments

Comments
 (0)