libstdc++/72745 add static assertion for invalid tuple access
authorJonathan Wakely <jwakely@redhat.com>
Sun, 31 Jul 2016 17:08:52 +0000 (18:08 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Sun, 31 Jul 2016 17:08:52 +0000 (18:08 +0100)
commit3c040fa4a29b52220f308ca0b14d6e721f31ba82
treecd212317232614b40be7551e82f1bddfa39cf65a
parentf245e3a0ee9bc8a32a2adcc656fa5bd5236b8aca
libstdc++/72745 add static assertion for invalid tuple access

PR libstdc++/72745
* include/std/array (get): Use positive message for static assertions.
* include/std/functional (_Safe_tuple_element_t): Fix indentation.
* include/std/tuple (tuple_element<I, tuple<>>): Add partial
specialization for invalid indices, with static assertion.
* testsuite/20_util/tuple/element_access/get_neg.cc: New test.

From-SVN: r238924
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/array
libstdc++-v3/include/std/functional
libstdc++-v3/include/std/tuple
libstdc++-v3/testsuite/20_util/tuple/element_access/get_neg.cc [new file with mode: 0644]