Browse Source

Fixed bug introduced by experiment around concepts

tagfs
Ludovic 'Archivist' Lagouardette 3 years ago
parent
commit
1347811505
3 changed files with 9 additions and 7 deletions
  1. +2
    -4
      Makefile
  2. +4
    -0
      include/gp/iterator.hpp
  3. +3
    -3
      include/gp/range.hpp

+ 2
- 4
Makefile View File

@ -1,8 +1,6 @@
CXX= g++
CXX= clang++-10
CXXFLAGS= --std=c++20 -O0 -g -pthread -DGP_TESTS -DFUZZ_STRENGTH=500 -DNO_BENCH=0 -pedantic \
-frtti \
#-g -fprofile-instr-generate -fcoverage-mapping -Wno-unknown-attributes \
-frtti -fprofile-instr-generate -fcoverage-mapping -Wno-unknown-attributes \
-fsanitize=address -fno-omit-frame-pointer
all: tests

+ 4
- 0
include/gp/iterator.hpp View File

@ -17,6 +17,10 @@ struct pointer_iterator final
typedef std::size_t difference_type;
static constexpr iterator_type_t iterator_type = iterator_type_t::contiguous_iterator;
constexpr pointer_iterator()
: data{nullptr}
{}
constexpr pointer_iterator(const pointer_iterator& oth)
: data{oth.data}
{}

+ 3
- 3
include/gp/range.hpp View File

@ -3,13 +3,13 @@
#include "gp/algorithm/tmp_manip.hpp"
namespace gp{
k">template<typename T>
cm">/*template<typename T>
concept IsSubstractible = requires(T a, T b)
{
{a - b} -> std::integral;
};
};*/
template<typename it, bool Enable = IsSubstractible<it>>
template<typename it, bool Enable = std::is_integral_v<decltype(it{} - it{})>/* IsSubstractible<it> */>
class nameless_range;
template<typename it>

Loading…
Cancel
Save