summaryrefslogtreecommitdiff
path: root/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp
diff options
context:
space:
mode:
authorKonstantin Varlamov <varconst@apple.com>2021-10-28 00:36:19 -0700
committerKonstantin Varlamov <varconst@apple.com>2021-10-28 11:09:51 -0700
commitf9f97cae82a05f54bed85581e57762ec2e26a057 (patch)
tree0a2de39a64ea74c5e67670b82ab1cc318a77087a /libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp
parentc9174f63b64698be2b497f371294fcad576bbbc3 (diff)
[libc++] P0433R2: add the remaining deduction guides.
Add deduction guides to `valarray` and `scoped_allocator_adaptor`. This largely finishes implementation of the paper: * deduction guides for other classes mentioned in the paper were implemented previously (see the list below); * deduction guides for several classes contained in the proposal (`reference_wrapper`, `lock_guard`, `scoped_lock`, `unique_lock`, `shared_lock`) were removed by [LWG2981](https://wg21.link/LWG2981). Also add deduction guides to the synopsis for the few classes (e.g. `pair`) where they were missing. The only part of the paper that isn't fully implemented after this patch is making sure certain deduction guides don't participate in overload resolution when given incorrect template parameters. List of significant commits implementing the other parts of P0433 (omitting some minor fixes): * [pair](https://github.com/llvm/llvm-project/commit/af65856eec160d163c764faad250d93357be7c83) * [basic_string](https://github.com/llvm/llvm-project/commit/6d9f750dec29e8ae5366092e64cd343dae2c7464) * [array](https://github.com/llvm/llvm-project/commit/0ca8c0895c6034615593c295dd955f29b25bf3d4) * [deque](https://github.com/llvm/llvm-project/commit/dbb6f8a8179b0604e25707b5c1b72be6164f62d9) * [forward_list](https://github.com/llvm/llvm-project/commit/e076700b7786959206acef136ecf05d54078e4e1) * [list](https://github.com/llvm/llvm-project/commit/4a227e582b2f13880ea049b29988a37a0f7c0742) * [vector](https://github.com/llvm/llvm-project/commit/df8f75479278d5ce16eede342ceb5ba2fd71460b) * [queue/stack/priority_queue](https://github.com/llvm/llvm-project/commit/5b8b8b5dce587f1e5a4a31cc24f09b18bd53ff9a) * [basic_regex](https://github.com/llvm/llvm-project/commit/edd5e29cfe9f67ec8e7e0eda12eb05e616fdeebc) * [optional](https://github.com/llvm/llvm-project/commit/f35b4bc3954f3b01051fc0848535ff784809e9e2) * [map/multimap](https://github.com/llvm/llvm-project/commit/edfe8525de1f7278f4754f2bffd47b13ec291a17) * [set/multiset](https://github.com/llvm/llvm-project/commit/e20865c387e09ea0ebd5add15c762cd5271ff65f) * [unordered_set/unordered_multiset](https://github.com/llvm/llvm-project/commit/296a80102a9b72c3eda80558fb78a3ed8849b341) * [unordered_map/unordered_multimap](https://github.com/llvm/llvm-project/commit/dfcd4384cbcac0eeb7e5cbce350f875ba4da79d5) * [function](https://github.com/llvm/llvm-project/commit/e1eabcdfad89f67ae575b0c86aa4a72d277378b4) * [tuple](https://github.com/llvm/llvm-project/commit/1308011e1b5c5382281a63dd4191a1784f8d2295) * [shared_ptr/weak_ptr](https://github.com/llvm/llvm-project/commit/83564056d4b186c9fcf016cdbb388755009f7b5a) Additional notes: * It was revision 2 of the paper that was voted into the Standard. P0433R3 is a separate paper that is not part of the Standard. * The paper also mandates removing several `make_*_searcher` functions (e.g. `make_boyer_moore_searcher`) which are currently not implemented (except in `experimental/`). * The `__cpp_lib_deduction_guides` feature test macro from the paper was accidentally omitted from the Standard. Differential Revision: https://reviews.llvm.org/D112510
Diffstat (limited to 'libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp')
-rw-r--r--libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp
index 5f4fd060c866..4ab4189d3e4c 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp
@@ -28,7 +28,7 @@
#include "test_macros.h"
-class NotAnItertor {};
+class NotAnIterator {};
template <typename T>
struct NotAnAllocator { typedef T value_type; };
@@ -36,7 +36,7 @@ struct NotAnAllocator { typedef T value_type; };
int main(int, char**)
{
{ // Not an iterator at all
- std::basic_string s1{NotAnItertor{}, NotAnItertor{}, std::allocator<char>{}}; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_string'}}
+ std::basic_string s1{NotAnIterator{}, NotAnIterator{}, std::allocator<char>{}}; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_string'}}
}
{ // Not an input iterator
std::basic_string<char16_t> s0;