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
27fdb4ea
Commit
27fdb4ea
authored
Oct 20, 2020
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unshadow floaty
parent
297e0bad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
include/fmt/format.h
include/fmt/format.h
+4
-4
No files found.
include/fmt/format.h
View file @
27fdb4ea
...
@@ -1946,8 +1946,8 @@ template <typename Char, typename OutputIt, typename T,
...
@@ -1946,8 +1946,8 @@ template <typename Char, typename OutputIt, typename T,
OutputIt
write
(
OutputIt
out
,
T
value
)
{
OutputIt
write
(
OutputIt
out
,
T
value
)
{
if
(
const_check
(
!
is_supported_floating_point
(
value
)))
return
out
;
if
(
const_check
(
!
is_supported_floating_point
(
value
)))
return
out
;
using
type
=
conditional_t
<
std
::
is_same
<
T
,
long
double
>::
value
,
double
,
T
>
;
using
floaty
=
conditional_t
<
std
::
is_same
<
T
,
long
double
>::
value
,
double
,
T
>
;
using
uint
=
typename
dragonbox
::
float_info
<
type
>::
carrier_uint
;
using
uint
=
typename
dragonbox
::
float_info
<
floaty
>::
carrier_uint
;
auto
bits
=
bit_cast
<
uint
>
(
value
);
auto
bits
=
bit_cast
<
uint
>
(
value
);
auto
fspecs
=
float_specs
();
auto
fspecs
=
float_specs
();
...
@@ -1958,11 +1958,11 @@ OutputIt write(OutputIt out, T value) {
...
@@ -1958,11 +1958,11 @@ OutputIt write(OutputIt out, T value) {
}
}
static
const
auto
specs
=
basic_format_specs
<
Char
>
();
static
const
auto
specs
=
basic_format_specs
<
Char
>
();
uint
mask
=
exponent_mask
<
type
>
();
uint
mask
=
exponent_mask
<
floaty
>
();
if
((
bits
&
mask
)
==
mask
)
if
((
bits
&
mask
)
==
mask
)
return
write_nonfinite
(
out
,
std
::
isinf
(
value
),
specs
,
fspecs
);
return
write_nonfinite
(
out
,
std
::
isinf
(
value
),
specs
,
fspecs
);
auto
dec
=
dragonbox
::
to_decimal
(
static_cast
<
type
>
(
value
));
auto
dec
=
dragonbox
::
to_decimal
(
static_cast
<
floaty
>
(
value
));
return
write_float
(
out
,
dec
,
specs
,
fspecs
,
static_cast
<
Char
>
(
'.'
));
return
write_float
(
out
,
dec
,
specs
,
fspecs
,
static_cast
<
Char
>
(
'.'
));
}
}
...
...
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