Skip to content

Commit

Permalink
fix: Remove static_assert
Browse files Browse the repository at this point in the history
It requires c++ 20
  • Loading branch information
RichieSams committed Oct 30, 2023
1 parent b2906da commit bf6f8a8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions include/ftl/parallel_for.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ using ParallelForTaskFunction = void(TaskScheduler *taskScheduler, T *value);

template <typename ItrType, typename Callable>
void ParallelFor(TaskScheduler *taskScheduler, ItrType begin, ItrType end, size_t batchSize, Callable &&func, TaskPriority priority) {
#if defined(FTL_CPP_17)
static_assert(std::is_invocable<Callable, TaskScheduler *, decltype(&(*begin))>::value);
using ItrCategory = std::iterator_traits<ItrType>::iterator_category;
static_assert(std::is_same_v<ItrCategory, std::forward_iterator_tag> || std::is_same_v<ItrCategory, std::bidirectional_iterator_tag> || std::is_same_v<ItrCategory, std::random_access_iterator_tag>);
#endif

struct ParallelForArg {
ItrType Start = ItrType();
size_t Count = 0;
Expand Down

0 comments on commit bf6f8a8

Please sign in to comment.