Skip to content

C++23 improvements and fixes for lists

Update for new language support in gcc11 and clang13

  • Use C++20 standard concepts from <concepts>, <iterator>, and <ranges>
  • Renamed the intrusive "accessor" concept to "extractor", a name borrowed from Boost.MultiIndex, and added a documentation page for it
  • Renamed our own concepts to lower_case_snake_case to match the changes in the C++ standard
  • Added various range overloads (range constructors, range assignment operators, etc.)
  • Made compressed_invocable_ref default constructible so that list iterators are default constructible when the entry extractor is stateless
  • Almost everything was marked constexpr
  • noexcept clauses are now correct, but at great cost. Between constexpr, noexcept, and requires clauses, declarations are dramatically more cluttered and are more difficult to read now
  • Removed the entry_ref_traits idea. For the most part, the details of what is really stored in an entry_ref_union is known only to the entry_ref_codec and not visible to the list implementations. This change was originally made to make gdb type visualizers easier to write, but it also improved generated code quality
  • The relationship between "_base", "_head", and "_proxy" types was refactored so that "_head" types became standard layout. The test suite also checks that "_head" types have this property
  • Tests were refactored to use the catch2 TEMPLATE_TEST_CASE feature and are now tested for many more concrete list types. Several bugs were found and fixed as a result
  • Originally copy-and-pasted tests for bulk_erase, push_pop, and splice were made generic
  • nodisard -> nodiscard
  • Remove "csd::" namespace qualification from the examples in the documentation and add using namespace csd; to the full example
  • Add the list codegen quality tests to the build, along with specific output for -march=skylake on both gcc11 and clang13
  • Removed the old variadic list constructors, which were used to perfect-forward arguments to the entry extractor constructor (for stateful extractors). In the place of each one are two new constructors: one that is enabled when the extractor is default initailizable and one that takes a single template parameter that is able to direct-initialize the entry extractor. Also added a documentation page explaining the concepts used to enable various kinds of constructors in CSD
  • CSD_ASSERT was changed to CSG_ASSERT and is now disabled by default; its design is based on _LIBCPP_ASSERT from libc++
  • Put typename back in some places using the CSG_TYPENAME macro for now: P0634 still isn't supported even in clang13, and even gcc11 builds appear to get some of the corner cases wrong

Merge request reports

Loading