libstdc++: Fix bug in std::indirect_result_t
authorJonathan Wakely <jwakely@redhat.com>
Tue, 10 Dec 2019 16:15:49 +0000 (16:15 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 10 Dec 2019 16:15:49 +0000 (16:15 +0000)
commit990a09e486a2fb6170d82580d245e6f013a16904
treeba7f6be93faf6a510d89175f78853abfb82ef518
parentd0d0ba20f2345023e9cec2419c9fb9e6cc7098c6
libstdc++: Fix bug in std::indirect_result_t

The alias template wasn't working because it applied iter_reference_t to
the pack of iterators before and after passing the pack to the
__indeirect_result helper.

* include/bits/iterator_concepts.h (indirect_result_t): Do not apply
iter_reference_t to parameter pack.
* testsuite/24_iterators/indirect_callable/projected.cc: New test.

From-SVN: r279170
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/iterator_concepts.h
libstdc++-v3/testsuite/24_iterators/indirect_callable/projected.cc [new file with mode: 0644]