| Issue |
182708
|
| Summary |
type aware allocators don't match allocation functions with default template parameters
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
ojhunt
|
While messing around with source_location defaults I found that the type aware allocation function resolution does not correctly handle default parameters:
```cpp
using size_t = __SIZE_TYPE__;
namespace std {
template <class T> struct type_identity{};
enum class align_val_t: size_t;
}
struct S {
template <class T, T = {}> void *operator new(std::type_identity<T>, size_t, std::align_val_t, T) {
static char buffer[20];
return buffer;
};
template <class T, T = {}> void operator delete(std::type_identity<T>, void*, size_t, std::align_val_t, T) {
};
};
int main(int, const char**) {
new S;
return 0;
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs