]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/20_util/to_chars/requirements.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / to_chars / requirements.cc
CommitLineData
8d9254fc 1// Copyright (C) 2017-2020 Free Software Foundation, Inc.
804b7cc4
JW
2//
3// This file is part of the GNU ISO C++ Library. This library is free
4// software; you can redistribute it and/or modify it under the
5// terms of the GNU General Public License as published by the
6// Free Software Foundation; either version 3, or (at your option)
7// any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License along
15// with this library; see the file COPYING3. If not see
16// <http://www.gnu.org/licenses/>.
17
18// { dg-options "-std=gnu++17" }
19// { dg-do compile { target c++17 } }
8468bfe8 20// { dg-require-normal-namespace "" }
804b7cc4
JW
21
22#include <charconv>
23
24namespace std
25{
26 struct to_chars_result;
27
28 char* to_chars_result::*pm2 = &to_chars_result::ptr;
29 errc to_chars_result::*pm1 = &to_chars_result::ec;
30
31 to_chars_result (*f1)(char*, char*, char, int) = &to_chars;
32 to_chars_result (*f2)(char*, char*, signed char, int) = &to_chars;
33 to_chars_result (*f3)(char*, char*, unsigned char, int) = &to_chars;
34 to_chars_result (*f4)(char*, char*, signed short, int) = &to_chars;
35 to_chars_result (*f5)(char*, char*, unsigned short, int) = &to_chars;
36 to_chars_result (*f6)(char*, char*, signed int, int) = &to_chars;
37 to_chars_result (*f7)(char*, char*, unsigned int, int) = &to_chars;
38 to_chars_result (*f8)(char*, char*, signed long, int) = &to_chars;
39 to_chars_result (*f9)(char*, char*, unsigned long, int) = &to_chars;
40 to_chars_result (*f10)(char*, char*, signed long long, int) = &to_chars;
41 to_chars_result (*f11)(char*, char*, unsigned long long, int) = &to_chars;
42}
43
44void bind()
45{
46 char buf[1];
47 auto [p, e] = std::to_chars(buf, buf + 1, 1, 10);
48 char** pa = &p;
49 std::errc* ea = &e;
50}