159cdf90aSEric Fiselier //===----------------------------------------------------------------------===// 259cdf90aSEric Fiselier // 357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 659cdf90aSEric Fiselier // 759cdf90aSEric Fiselier //===----------------------------------------------------------------------===// 859cdf90aSEric Fiselier 959cdf90aSEric Fiselier // <array> 1059cdf90aSEric Fiselier 1159cdf90aSEric Fiselier // void fill(const T& u); 1259cdf90aSEric Fiselier 1359cdf90aSEric Fiselier #include <array> 1459cdf90aSEric Fiselier #include <cassert> 1559cdf90aSEric Fiselier main(int,char **)162df59c50SJF Bastienint main(int, char**) { 1759cdf90aSEric Fiselier { 1859cdf90aSEric Fiselier typedef double T; 1959cdf90aSEric Fiselier typedef std::array<const T, 0> C; 2059cdf90aSEric Fiselier C c = {}; 21*76476efdSMuhammad Usman Shahid // expected-error-re@array:* {{{{(static_assert|static assertion)}} failed{{.*}}cannot fill zero-sized array of type 'const T'}} 2259cdf90aSEric Fiselier c.fill(5.5); // expected-note {{requested here}} 2359cdf90aSEric Fiselier } 242df59c50SJF Bastien 252df59c50SJF Bastien return 0; 2659cdf90aSEric Fiselier } 27