[libcxx-commits] [PATCH] D137476: [libc++] Add utilites for instantiating functions with multiple types

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 4 19:09:47 PDT 2022


philnik created this revision.
philnik added reviewers: ldionne, Mordante, var-const, huixie90.
Herald added a project: All.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

We currently call a lot of functions with the same list of types. To avoid forgetting any of them and to avoid manually generating cartesian products of types, this patch adds type_lists and utilities for it. Specifically, it adds

- `type_list` - This is just a list of types
- `concatenate` - This allows concatenating type_lists, types and combinations of both
- `wrap_list` - Wrap all types of a type list with a template type of alias
- `cartesian_product` - generates the cartesian product of two type lists


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137476

Files:
  libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp
  libcxx/test/std/language.support/support.limits/limits/is_specialized.pass.cpp
  libcxx/test/std/strings/basic.string/string.access/at.pass.cpp
  libcxx/test/support/test.support/type_algorithms.pass.cpp
  libcxx/test/support/test_iterators.h
  libcxx/test/support/type_algorithms.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137476.473390.patch
Type: text/x-patch
Size: 17569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221105/4c1d1324/attachment-0001.bin>


More information about the libcxx-commits mailing list