]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add [[nodiscard]] attribute to C++17 components
authorJonathan Wakely <jwakely@redhat.com>
Thu, 23 Nov 2017 22:11:21 +0000 (22:11 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 23 Nov 2017 22:11:21 +0000 (22:11 +0000)
commitd69f1ec7d19f3770450a6215395073dd911e5d20
treeaf98d60a7a26651eb974872fce8e8a47e0647e99
parent4b9840f230d4f8f4964639f776073821672fb1a7
Add [[nodiscard]] attribute to C++17 components

* include/bits/fs_path.h (path::empty): Add nodiscard attribute.
* include/bits/range_access.h (empty): Likewise.
* include/std/string_view (basic_string_view::empty): Likewise.
* testsuite/21_strings/basic_string_view/capacity/empty_neg.cc: New
test.
* testsuite/24_iterators/range_access_cpp17_neg.cc: New test.
* testsuite/27_io/filesystem/path/query/empty_neg.cc: New test.

From-SVN: r255124
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/fs_path.h
libstdc++-v3/include/bits/node_handle.h
libstdc++-v3/include/bits/range_access.h
libstdc++-v3/include/std/string_view
libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/empty_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/range_access_cpp17_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/filesystem/path/query/empty_neg.cc [new file with mode: 0644]