r267518 - in /trunk/libstdc++-v3: ChangeLog tes...
redi@gcc.gnu.org
redi@gcc.gnu.org
Wed Jan 2 16:30:00 GMT 2019
Author: redi
Date: Wed Jan 2 16:30:49 2019
New Revision: 267518
URL: https://gcc.gnu.org/viewcvs?rev=267518&root=gcc&view=rev
Log:
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.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/23_containers/map/cons/deduction.cc
trunk/libstdc++-v3/testsuite/23_containers/multimap/cons/deduction.cc
More information about the Libstdc++-cvs
mailing list