Skip to content

Commit e5cae8a

Browse files
committed
Add requirements to CollectionType concept
1 parent f14ce00 commit e5cae8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/podio/utilities/TypeHelpers.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ concept CollectionType = !std::is_abstract_v<T> && std::derived_from<T, Collecti
303303
typename T::mutable_type>;
304304
requires std::same_as<std::remove_cvref_t<decltype(ct.at(std::declval<typename T::size_type>()))>,
305305
typename T::value_type>;
306+
requires std::same_as<typename T::value_type, typename std::iterator_traits<typename T::iterator>::value_type>;
307+
requires std::same_as<typename T::value_type,
308+
typename std::iterator_traits<typename T::const_iterator>::value_type>;
306309
};
307310

308311
namespace utils {

0 commit comments

Comments
 (0)