diff options
author | Dino Radakovic <dinor@google.com> | 2024-02-07 07:26:02 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-02-07 07:27:17 -0800 |
commit | e22f9c1fdd00f2ad3cfdd1dd7a67145eadc3b21c (patch) | |
tree | 698b11b97dffb06cbaada007a0606f0d356875a4 /absl/container/flat_hash_map.h | |
parent | 563c86a80c06ffbbfaa2ea792a9c255a5c258cf0 (diff) |
`demangle`: Implement parsing for simplest constrained template arguments
C++20 introduced constraints, where concepts such as `std::integral` can be used to restrict template parameters:
```
template <std::integral T>
int foo(T t); // Only accepts integral types.
```
Clang mangles these starting with a prefix `Tk`, followed by the concept name, which mangles as a type.
For example, compare `foo` and `bar` here: https://godbolt.org/z/Kzbrrchde
Note that this implementation doesn't cover the more complex case where the concept is templated too. See [llvm's implementation](https://github.com/llvm/llvm-project/commit/4b163e343cfa54c8d55c9da73c70d58f55ea9df2) and its tests for a thorough version.
PiperOrigin-RevId: 604976260
Change-Id: Ic116c5f6f27c3f7714638bdee8de11dce871f0be
Diffstat (limited to 'absl/container/flat_hash_map.h')
0 files changed, 0 insertions, 0 deletions