diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-01-02 16:30:49 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-01-02 16:30:49 +0000 |
commit | b3e2dc1ed96ff476ed880f151331237c64f9bfe7 (patch) | |
tree | 6455aa0942d23f6e057fb7bb895f20813d87f831 /gcc/fortran/parse.c | |
parent | 3f11aa6aa130b9a8e6be7f6aeea34af9a5badb8a (diff) | |
download | gcc-b3e2dc1ed96ff476ed880f151331237c64f9bfe7.zip gcc-b3e2dc1ed96ff476ed880f151331237c64f9bfe7.tar.gz gcc-b3e2dc1ed96ff476ed880f151331237c64f9bfe7.tar.bz2 |
Add more testcases for class template argument deduction of maps
This adds additional tests for std::map and std::multimap CTAD. The
tests ensure that deduction works for braced-init-list of value_type
objects, and for pairs of input iterators (with both std::pair<Key, T>
and value_type as the iterator's value_type). This ensures deduction
from value_type still works, as well as the non-value_type cases in LWG
3025.
Similar tests for unordered maps do not work, apparently because the
constructor taking an initializer_list<value_type> is not usable for
deduction, and the deduction guide taking initializer_list<pair<Key, T>>
deduces key_type to be const. I am not addressing that.
* testsuite/23_containers/map/cons/deduction.cc: Test deduction from
initializer_list<value_type> and from input iterator ranges.
* testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
From-SVN: r267518
Diffstat (limited to 'gcc/fortran/parse.c')
0 files changed, 0 insertions, 0 deletions