Skip to content

Commit

Permalink
Fix an issue in a concept for iterators, it did not take into account…
Browse files Browse the repository at this point in the history
… pointers as iterators. Also, fix the catch version such that catchorg/Catch2#2421 does not happen anymore for newer glibc.

Signed-off-by: bac-home\bac <bacusters@gmail.com>
  • Loading branch information
bacusters committed Feb 22, 2023
1 parent b1810f9 commit 731924e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/ResolveThirdPartyDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if(MOVETK_DOWNLOAD_THIRDPARTY)
FetchContent_Declare(
Catch2
GIT_REPOSITORY "https://github.com/catchorg/Catch2.git"
GIT_TAG v2.13.1
GIT_TAG v2.13.5
)
# Check if population has already been performed
FetchContent_GetProperties(Catch2)
Expand Down
7 changes: 4 additions & 3 deletions src/include/movetk/utils/Requirements.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include <concepts>
#include <cstdlib>
#include <iterator>
#include <type_traits>

#include "movetk/utils/TypeChecks.h"
Expand Down Expand Up @@ -81,11 +82,11 @@ template <typename T>
using single_type_pair = std::pair<T, T>;

template <typename T, typename VALUE>
concept RandomAccessIterator = std::random_access_iterator<T> && std::is_convertible_v<typename T::value_type, VALUE>;
concept RandomAccessIterator = std::random_access_iterator<T> && std::is_convertible_v<std::iter_value_t<T>, VALUE>;

template <typename T, typename KERNEL>
concept RandomAccessPointIterator =
std::random_access_iterator<T> && std::is_convertible_v<typename T::value_type, typename KERNEL::MovetkPoint>;
concept RandomAccessPointIterator = std::random_access_iterator<T> && std::is_convertible_v < std::iter_value_t<T>,
typename KERNEL::MovetkPoint > ;

template <typename T, typename VALUE>
concept OutputIterator = std::output_iterator<T, VALUE>;
Expand Down

0 comments on commit 731924e

Please sign in to comment.