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
b77c8190
Commit
b77c8190
authored
Dec 30, 2016
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FPUtil -> fputil
parent
8428621d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
fmt/format.h
fmt/format.h
+13
-13
No files found.
fmt/format.h
View file @
b77c8190
...
...
@@ -195,7 +195,7 @@ typedef __int64 intmax_t;
#if FMT_USE_DELETED_FUNCTIONS || FMT_HAS_FEATURE(cxx_deleted_functions) || \
(FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1800
# define FMT_DELETED_OR_UNDEFINED
= delete
# define FMT_DELETED_OR_UNDEFINED = delete
# define FMT_DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&) = delete; \
TypeName& operator=(const TypeName&) = delete
...
...
@@ -283,20 +283,20 @@ inline uint32_t clzll(uint64_t x) {
namespace
fmt
{
namespace
internal
{
struct
DummyI
nt
{
struct
dummy_i
nt
{
int
data
[
2
];
operator
int
()
const
{
return
0
;
}
};
typedef
std
::
numeric_limits
<
fmt
::
internal
::
DummyInt
>
FPU
til
;
typedef
std
::
numeric_limits
<
fmt
::
internal
::
dummy_int
>
fpu
til
;
// Dummy implementations of system functions such as signbit and ecvt called
// if the latter are not available.
inline
DummyInt
signbit
(...)
{
return
DummyI
nt
();
}
inline
DummyInt
_ecvt_s
(...)
{
return
DummyI
nt
();
}
inline
DummyInt
isinf
(...)
{
return
DummyI
nt
();
}
inline
DummyInt
_finite
(...)
{
return
DummyI
nt
();
}
inline
DummyInt
isnan
(...)
{
return
DummyI
nt
();
}
inline
DummyInt
_isnan
(...)
{
return
DummyI
nt
();
}
inline
dummy_int
signbit
(...)
{
return
dummy_i
nt
();
}
inline
dummy_int
_ecvt_s
(...)
{
return
dummy_i
nt
();
}
inline
dummy_int
isinf
(...)
{
return
dummy_i
nt
();
}
inline
dummy_int
_finite
(...)
{
return
dummy_i
nt
();
}
inline
dummy_int
isnan
(...)
{
return
dummy_i
nt
();
}
inline
dummy_int
_isnan
(...)
{
return
dummy_i
nt
();
}
// A helper function to suppress bogus "conditional expression is constant"
// warnings.
...
...
@@ -311,7 +311,7 @@ namespace std {
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48891
// and the same for isnan and signbit.
template
<
>
class
numeric_limits
<
fmt
::
internal
::
DummyI
nt
>
:
class
numeric_limits
<
fmt
::
internal
::
dummy_i
nt
>
:
public
std
::
numeric_limits
<
int
>
{
public:
// Portable version of isinf.
...
...
@@ -2760,14 +2760,14 @@ void basic_writer<Char>::write_double(T value, const FormatSpec &spec) {
char
sign
=
0
;
// Use isnegative instead of value < 0 because the latter is always
// false for NaN.
if
(
internal
::
FPU
til
::
isnegative
(
static_cast
<
double
>
(
value
)))
{
if
(
internal
::
fpu
til
::
isnegative
(
static_cast
<
double
>
(
value
)))
{
sign
=
'-'
;
value
=
-
value
;
}
else
if
(
spec
.
flag
(
SIGN_FLAG
))
{
sign
=
spec
.
flag
(
PLUS_FLAG
)
?
'+'
:
' '
;
}
if
(
internal
::
FPU
til
::
isnotanumber
(
value
))
{
if
(
internal
::
fpu
til
::
isnotanumber
(
value
))
{
// Format NaN ourselves because sprintf's output is not consistent
// across platforms.
std
::
size_t
nan_size
=
4
;
...
...
@@ -2782,7 +2782,7 @@ void basic_writer<Char>::write_double(T value, const FormatSpec &spec) {
return
;
}
if
(
internal
::
FPU
til
::
isinfinity
(
value
))
{
if
(
internal
::
fpu
til
::
isinfinity
(
value
))
{
// Format infinity ourselves because sprintf's output is not consistent
// across platforms.
std
::
size_t
inf_size
=
4
;
...
...
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