Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
7e63b600
Commit
7e63b600
authored
May 29, 2022
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make to_string work with __float128
parent
b2ea212c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
include/fmt/format-inl.h
include/fmt/format-inl.h
+0
-6
include/fmt/format.h
include/fmt/format.h
+6
-0
test/format-test.cc
test/format-test.cc
+4
-0
No files found.
include/fmt/format-inl.h
View file @
7e63b600
...
@@ -128,12 +128,6 @@ FMT_FUNC std::system_error vsystem_error(int error_code, string_view format_str,
...
@@ -128,12 +128,6 @@ FMT_FUNC std::system_error vsystem_error(int error_code, string_view format_str,
namespace
detail
{
namespace
detail
{
#if __cplusplus < 201703L
template
<
typename
T
>
constexpr
uint64_t
basic_data
<
T
>::
pow10_significands
[];
template
<
typename
T
>
constexpr
int16_t
basic_data
<
T
>::
pow10_exponents
[];
template
<
typename
T
>
constexpr
uint64_t
basic_data
<
T
>::
power_of_10_64
[];
#endif
template
<
typename
F
>
inline
bool
operator
==
(
basic_fp
<
F
>
x
,
basic_fp
<
F
>
y
)
{
template
<
typename
F
>
inline
bool
operator
==
(
basic_fp
<
F
>
x
,
basic_fp
<
F
>
y
)
{
return
x
.
f
==
y
.
f
&&
x
.
e
==
y
.
e
;
return
x
.
f
==
y
.
f
&&
x
.
e
==
y
.
e
;
}
}
...
...
include/fmt/format.h
View file @
7e63b600
...
@@ -1511,6 +1511,12 @@ template <typename T = void> struct basic_data {
...
@@ -1511,6 +1511,12 @@ template <typename T = void> struct basic_data {
10000000000000000000ULL
};
10000000000000000000ULL
};
};
};
#if __cplusplus < 201703L
template
<
typename
T
>
constexpr
uint64_t
basic_data
<
T
>::
pow10_significands
[];
template
<
typename
T
>
constexpr
int16_t
basic_data
<
T
>::
pow10_exponents
[];
template
<
typename
T
>
constexpr
uint64_t
basic_data
<
T
>::
power_of_10_64
[];
#endif
// This is a struct rather than an alias to avoid shadowing warnings in gcc.
// This is a struct rather than an alias to avoid shadowing warnings in gcc.
struct
data
:
basic_data
<>
{};
struct
data
:
basic_data
<>
{};
...
...
test/format-test.cc
View file @
7e63b600
...
@@ -1982,6 +1982,10 @@ TEST(format_test, to_string) {
...
@@ -1982,6 +1982,10 @@ TEST(format_test, to_string) {
enum
foo
:
unsigned
char
{
zero
};
enum
foo
:
unsigned
char
{
zero
};
EXPECT_EQ
(
fmt
::
to_string
(
zero
),
"0"
);
EXPECT_EQ
(
fmt
::
to_string
(
zero
),
"0"
);
#if FMT_USE_FLOAT128
EXPECT_EQ
(
fmt
::
to_string
(
__float128
(
0.42
)),
"0.42"
);
#endif
}
}
TEST
(
format_test
,
output_iterators
)
{
TEST
(
format_test
,
output_iterators
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment