2017-11-15 20:02:27 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2019-01-19 10:56:40 +00:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2017-11-15 20:02:27 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// <iterator>
|
|
|
|
|
|
|
|
// <iterator>
|
|
|
|
// template <class C> constexpr auto empty(const C& c) -> decltype(c.empty());
|
|
|
|
|
2020-06-01 10:38:23 -04:00
|
|
|
// UNSUPPORTED: c++03, c++11, c++14, c++17
|
2017-11-15 20:02:27 +00:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <iterator>
|
|
|
|
|
2023-03-16 12:45:41 -04:00
|
|
|
void f() {
|
2017-11-15 20:02:27 +00:00
|
|
|
std::vector<int> c;
|
2020-03-17 12:27:10 -04:00
|
|
|
std::empty(c); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
|
2017-11-15 20:02:27 +00:00
|
|
|
}
|