Zach Laine
7776ae4191
Use BOOST_GCC, defined in config.hpp only for real (non-Clang-emulated) GCC
...
builds, in place of relevant uses of the __GNUC__ macro.
2025-02-21 00:01:05 -06:00
Dirk Stolle
ea68455268
Fix two typos
2025-02-16 12:48:36 -06:00
Zach Laine
cefbd3014a
When defining BOOST_STL_INTERFACES_USE_DEDUCED_THIS=1, require C++23 mode for
...
the cases where __cpp_explicit_this_parameter is not defined, but the compiler
is known to support it. Obviously, even if those compiler support it, it's
not available in older C++ versions.
Fixes #72 .
Related to https://github.com/boostorg/stl_interfaces/pull/68
2024-11-10 12:43:48 -06:00
Edward Nolan
f89646cddf
Enable BOOST_STL_INTERFACES_USE_DEDUCED_THIS on Clang 19 and MSVC 19.41
...
Clang 19 and MSVC 19.41 both have support for deducing this that is
complete enough to allow the v3 version of this library to work but
not complete enough for the compilers to define
__cpp_explicit_this_parameter. This commit enables the v3 version of
this library on compilers with that version or newer. We make use of
BOOST_CLANG_VERSION here because on AppleClang it should provide the
version of upstream Clang that was used for that release.
2024-10-24 17:47:40 -05:00
Zach Laine
2d001de901
Add [[no_unique_address]] to the data members of the adaptors in
...
view_adaptor.hpp.
Fixes #65 .
2024-10-23 20:44:43 -05:00
Zach Laine
0f422d58cb
Fix typo in adaptor::op() (f/f_ confusion).
2024-01-22 01:34:07 -06:00
Zach Laine
1c050d2df5
Add an rvalue-qualified overload of closure::operator(). This makes
...
forwarding work properly in cases such as r | foo(std::string("foo")), where
foo is an adaptor. Without this, the std::string temporary dangles.
2024-01-21 15:26:41 -06:00
Zach Laine
510eb431fb
Fixes #63 .
2023-09-05 21:02:51 -05:00
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
6ee9557df9
Fix errors on MSVC.
2023-06-04 19:05:28 -05:00
Zach Laine
d61867d8be
GCC 13 reports as ill-formed code that evaluates a concept C more than once
...
with the same template parameters, when the value of C changes between the
evaluations. This is correct, but no other implementation checks this. Move
all the hidden friends out of the v2::iterator_interface to fix these kinds of
errors.
2023-05-29 15:21:37 -05:00
Zach Laine
cb96522275
detail::sub -> detail::iter_sub; make iter_sub a bit more robust.
2023-05-03 20:06:56 -05:00
Zach Laine
46c82966a6
Fix sign confusion in iterator_interface::op<=>.
2023-05-03 20:06:17 -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
86aeeb1bb5
Add support for operator<=> comparisons of iterator_interfaces.
2023-03-29 18:55:25 -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
51c212234e
Use iterator_category_base with the C++20 version of iterator_interface.
2023-03-25 21:33:34 -05:00
Zach Laine
558548fa8a
Add detail::iterator_category_base.
2023-03-25 18:01:42 -05:00
Zach Laine
7dd2b97589
Cruft removal.
2022-11-19 22:26:03 -06:00
Zach Laine
1dc2923434
Add non-const overloads of op* and op-> to v1 iterator_interface. This
...
matches more closely what v2 does.
Fixes #59 .
2022-11-18 19:54:40 -06:00
Zach Laine
544c7448b4
Add a discussion of why it is sometimes necessary to use bind_back() directly.
2022-06-04 17:17:41 -05:00
Zach Laine
14c3741aaf
Expand the view_adaptor test; fix errors.
2022-06-03 23:00:19 -05:00
Zach Laine
6a080f84cb
Add very simple initial test of view_adaptor; fix errors.
2022-06-03 21:27:20 -05:00
Zach Laine
410e865acd
Add view_adaptor.hpp and its associated detail/ headers.
2022-06-03 17:47:19 -05:00
Zach Laine
f84cb723e1
Cruft removal.
2022-05-18 03:51:36 -05:00
Zach Laine
f108c2dd4e
Require __cpp_lib_concepts and __cpp_lib_ranges in order to enable
...
BOOST_STL_INTERFACES_USE_CONCEPTS.
2022-05-17 22:33:46 -05:00
Zach Laine
537f62e9b2
Don't use derived() in concept constraints. This fixes VS2022 in
...
C++20 mode.
2022-05-17 18:09:59 -05:00
Zach Laine
6514451f06
Fix doc typo.
2022-05-08 12:10:28 -05:00
Zach Laine
ea719c8bf8
Add missing typename.
...
Fixes #53 .
2021-12-08 19:13:58 -06:00
Jan Bouwer
ccecfa5652
Return derived() from operator--() in iterator_interface.
...
Previously, this returned the underlying adapted iterator.
Fixes #50 .
2021-12-08 19:03:30 -06:00
Zach Laine
cd1fd465f3
Don't use a member function on the trailing return type of operator+=() and
...
operator++() in iterator_interface; use the equivalent hand-written code
instead. Addresses #50 on older Clang.
2021-06-06 13:43:08 -05:00
Zach Laine
7c1f2c02bd
Return derived() from operator+=() and operator++() in iterator_interface.
...
Previously, those each returned the underlying adapted iterator.
Fixes #50 .
2021-06-05 18:37:59 -05:00
Zach Laine
907759ada3
Fix broken BOOST_STL_INTERFACES_STATIC_ASSERT_CONCEPT macro; it now properly
...
static_asserts in C++20 builds.
2021-06-05 17:52:50 -05:00
Zach Laine
e98536344d
Pass an rvalue to emplace_back() in unevaluated contexts that are testing its
...
existence. This is important for containers derived from sequence_container
that constrain emplace_back() itself, and have a move-only value_type.
Fixes #48 .
2021-06-05 17:34:56 -05:00
Zach Laine
fd9bfb11bb
Add a macro for disabling the C++20 v2 namespace. Add documentation
...
of the inlining v1/v2 behavior.
2020-08-15 22:17:51 -05:00
Zach Laine
56ffa7c6ad
Correct relops in v2 sequence_container_interface.
2020-08-03 12:15:45 -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
6d31433af0
Add a metafunciton iter_concept, which matches the behavior of C++20's
...
ITER_CONCEPT, and use it to fix errors when compiling in C++20 mode.
2020-07-09 16:54:05 -05:00
Zach Laine
6486db0a55
Remove const from value_type in iterator_interface.
...
Fixes #43 .
2020-06-23 18:17:26 -05:00
Zach Laine
cf4e247d43
Make the noexcept specifiers on
...
iterator_interface::{operator+,operator-=,operator-}() unconditional to work
around broken return type deduction logic in older compilers.
2020-04-09 19:17:36 -05:00
Zach Laine
3648e7497e
More SFINAE friendliness work for range-v3 compatibility.
...
Fixes #38 .
2020-04-09 02:12:01 -05:00
Zach Laine
ad2ea1a657
Fix SFINAE unfriendliness in iterator_interface, for range-v3 compatibility.
...
Fixes #38 .
2020-04-08 17:36:18 -05:00
Furkan Usta
b3fc91f62c
Fix trailing return type for iterator_interface comparison operators
2020-04-05 15:12:41 -05:00
Zach Laine
32a6f27abd
Address some missed sequence_container_interface renames.
2020-01-08 12:57:13 -06: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
170ecc0236
Remove ill-formed uses of "!requires ..." from concepts-using implementations.
...
Fixes #13 .
2020-01-03 15:24:02 -06:00
Zach Laine
9121eea229
Remove resize() from sequence_container_interface.
2020-01-03 15:22:20 -06:00
Zach Laine
1f53bd0998
- Pull definitions of v2_dtl::{container_size_t,three_way} to before the C++20
...
implementations.
- Fix a place where __cpp_lib_three_way_comparison was compared against a
value rather than checked for definition.
Fixes #22 .
2020-01-01 13:32:31 -06:00
Zach Laine
cb76994bd6
Fix unmatched close paren in C++20 sketch of sequence_container_interface.
...
Fixes #20 .
2020-01-01 13:32:31 -06:00