1*4bdff4beSrobert //===----------------------------------------------------------------------===//
2*4bdff4beSrobert //
3*4bdff4beSrobert // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*4bdff4beSrobert // See https://llvm.org/LICENSE.txt for license information.
5*4bdff4beSrobert // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*4bdff4beSrobert //
7*4bdff4beSrobert //===----------------------------------------------------------------------===//
8*4bdff4beSrobert 
9*4bdff4beSrobert // Copyright (c) Microsoft Corporation.
10*4bdff4beSrobert // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
11*4bdff4beSrobert 
12*4bdff4beSrobert // Copyright 2018 Ulf Adams
13*4bdff4beSrobert // Copyright (c) Microsoft Corporation. All rights reserved.
14*4bdff4beSrobert 
15*4bdff4beSrobert // Boost Software License - Version 1.0 - August 17th, 2003
16*4bdff4beSrobert 
17*4bdff4beSrobert // Permission is hereby granted, free of charge, to any person or organization
18*4bdff4beSrobert // obtaining a copy of the software and accompanying documentation covered by
19*4bdff4beSrobert // this license (the "Software") to use, reproduce, display, distribute,
20*4bdff4beSrobert // execute, and transmit the Software, and to prepare derivative works of the
21*4bdff4beSrobert // Software, and to permit third-parties to whom the Software is furnished to
22*4bdff4beSrobert // do so, all subject to the following:
23*4bdff4beSrobert 
24*4bdff4beSrobert // The copyright notices in the Software and this entire statement, including
25*4bdff4beSrobert // the above license grant, this restriction and the following disclaimer,
26*4bdff4beSrobert // must be included in all copies of the Software, in whole or in part, and
27*4bdff4beSrobert // all derivative works of the Software, unless such copies or derivative
28*4bdff4beSrobert // works are solely in the form of machine-executable object code generated by
29*4bdff4beSrobert // a source language processor.
30*4bdff4beSrobert 
31*4bdff4beSrobert // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32*4bdff4beSrobert // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33*4bdff4beSrobert // FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
34*4bdff4beSrobert // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
35*4bdff4beSrobert // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
36*4bdff4beSrobert // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
37*4bdff4beSrobert // DEALINGS IN THE SOFTWARE.
38*4bdff4beSrobert 
39*4bdff4beSrobert #ifndef _LIBCPP_SRC_INCLUDE_RYU_DIGIT_TABLE_H
40*4bdff4beSrobert #define _LIBCPP_SRC_INCLUDE_RYU_DIGIT_TABLE_H
41*4bdff4beSrobert 
42*4bdff4beSrobert #include <__charconv/tables.h>
43*4bdff4beSrobert #include <__config>
44*4bdff4beSrobert 
45*4bdff4beSrobert _LIBCPP_BEGIN_NAMESPACE_STD
46*4bdff4beSrobert 
47*4bdff4beSrobert // A table of all two-digit numbers. This is used to speed up decimal digit
48*4bdff4beSrobert // generation by copying pairs of digits into the final output.
49*4bdff4beSrobert //
50*4bdff4beSrobert // In order to minimize the diff in the Ryu code between MSVC STL and libc++
51*4bdff4beSrobert // the code uses the name __DIGIT_TABLE. In order to avoid code duplication it
52*4bdff4beSrobert // reuses the table already available in libc++.
53*4bdff4beSrobert inline constexpr auto& __DIGIT_TABLE = __itoa::__digits_base_10;
54*4bdff4beSrobert 
55*4bdff4beSrobert _LIBCPP_END_NAMESPACE_STD
56*4bdff4beSrobert 
57*4bdff4beSrobert #endif // _LIBCPP_SRC_INCLUDE_RYU_DIGIT_TABLE_H
58