PR libstdc++/89102 fix common_type<> and common_type<T> specializations
authorJonathan Wakely <jwakely@redhat.com>
Wed, 6 Feb 2019 17:25:26 +0000 (17:25 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 6 Feb 2019 17:25:26 +0000 (17:25 +0000)
commit373c726ec641e33ca640a51d6f4200318101f49d
treecdb60d48320834f95dda954fada89379850803ec
parent12f82acc9e55a16334d303ae2b88609bdcbf13e5
PR libstdc++/89102 fix common_type<> and common_type<T> specializations

This is a partial implementation of the revised std::common_type rules
from P0435R1.

PR libstdc++/89102 (partial)
* include/std/type_traits (common_type<>): Define.
(common_type<T>): Derive from common_type<T, T>.
* testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
Test zero-length template argument list.
* testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
Test additional single argument cases.
* testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
Adjust expected error.

From-SVN: r268586
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/common_type/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc
libstdc++-v3/testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc