Zach Laine
df9e186bd6
Add a new v3 namespace, containing a new iterator_interface based on deducing
...
this instead of CRTP.
2023-06-05 00:12:54 -05:00
Zach Laine
c022029c27
In C++20 and later, return void from operator++(int), for input_iterators.
...
This matches the requirements of the std::input_iterator concept. This is not
done in earlier C++ versions, because it completely breaks use of input
iterators with the standard algorithms.
2023-05-02 20:31:02 -05:00
Zach Laine
21e03e7013
Use the given iterator_concept, but only define iterator_category when
...
appropriate to do so. Appropriateness follows the algorithm for zip_view's
iterator. See https://eel.is/c++draft/range.zip.transform.iterator#1 .
Requested by LEWG reviewers of iterator_interface.
2023-05-02 20:31:02 -05:00
Zach Laine
965b1119cb
Disable iterator_interface::operator-> when pointer is void or reference is
...
not a language reference.
2023-03-26 14:14:11 -05:00
Zach Laine
53448edcdc
Add full v2 namespace (C++20) implementation. When building in C++20 mode,
...
including with __cpp_lib_concepts defined, the v2 namespace is inlined.
Otherwise, the v1 namespace is inlined. This allows switching to
concept-constrained templates without changing any user code.
2020-08-02 00:11:55 -05:00
Zach Laine
6486db0a55
Remove const from value_type in iterator_interface.
...
Fixes #43 .
2020-06-23 18:17:26 -05:00
Glen Fernandes
e161785105
Switch to Boost.Core's lightweight_test
2020-05-01 21:50:02 -05:00
Zach Laine
9111d81885
Remove the v2 namespace, including the C++20 standard lib- and cmcstl2-based
...
implementations.
Fixes #27 .
2020-01-03 15:24:30 -06:00
Zach Laine
f735c78fb8
GTest -> Boost.Test
...
Fixes #24 .
2020-01-01 18:23:06 -06:00
Zach Laine
e55bb9ffdb
Make element_type an enum class; bool Contiguous -> element_type Contiguity in {view,container}_interface.
...
Fixes #14 .
2020-01-01 13:32:31 -06:00
Zach Laine
0086bdf8ef
Address all of the remaining v2::iterator_interface-related TODOs.
2019-08-20 00:05:55 -05:00
Zach Laine
67f5ea9072
Add v2_random_access test; fix errors.
2019-08-20 00:05:55 -05:00
Zach Laine
6c4e127ccc
Add v2 tests for input, output, and bidirecitonal; all tests pass again.
2019-08-20 00:05:55 -05:00
Zach Laine
27cd6092fc
Add numerous illformedness-verifying static_asserts on operations that one of the interface templates should not provide for a given instantiation.
2019-08-16 20:17:02 -05:00
Zach Laine
cd3caec37d
Add more robust view_interface tests.
2019-08-14 19:51:07 -05:00
Zach Laine
97ca350172
Rename the library stl_interfaces; iterator_facade.hpp ->
...
iterator_interface.hpp.
2019-08-12 18:09:37 -05:00
Zach Laine
a259a08cea
prev() and next() -> operator++() and operator()-- in user operations
2019-08-12 18:09:31 -05:00
Zach Laine
52fbe123de
Add postincrement testing to input and output tests.
2019-08-12 18:09:02 -05:00
Zach Laine
8af27e0ce4
Reimplement all of iterator_facade, rename it iterator_interface.
2019-08-12 00:35:20 -05:00
Zach Laine
c0e571d034
Add static_assert macros, use them in the tests and examples, and add docs for
...
them.
2019-08-10 18:34:21 -05:00
Zach Laine
ac033389b9
Turns out default constructibility is required for all iterator concepts.
2019-08-10 10:30:10 -05:00
Zach Laine
41d3c619e8
Add copyright headers to sources.
2019-08-04 15:55:41 -05:00
Zach Laine
bc0bd3704f
Add detail::arrow, its use in the input iterator facade, and the
...
proxy_iterator_facade template alias.
2019-08-04 10:08:30 -05:00
Zach Laine
7685546ddf
Add a forward iterator test.
2019-08-03 19:35:38 -05:00
Zach Laine
442f122e79
- In hidden friend function params, iterator_facade const & -> Derived.
...
- Add noexcept specs to all hidden friends.
- Extend input iterator tests a bit.
2019-08-03 19:35:38 -05:00
Zach Laine
0f792a9c4d
Implement input_iterator facade specialization.
2019-08-03 19:35:38 -05:00
Zach Laine
4ef8e73495
Add first test, to be fleshed out alongside iterator_facade.hpp.
2019-07-08 09:16:19 -05:00