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
7325ebc9
Commit
7325ebc9
authored
Feb 15, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the warning about long long on older gcc.
parent
245faa74
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
format.h
format.h
+16
-8
No files found.
format.h
View file @
7325ebc9
...
...
@@ -83,6 +83,14 @@
namespace
fmt
{
// Fix the warning about long long on older versions of GCC
// that don't support the diagnostic pragma.
#ifdef __GNUC__
__extension__
typedef
long
long
LongLong
;
#else
typedef
long
long
LongLong
;
#endif
namespace
internal
{
#if _SECURE_SCL
...
...
@@ -233,7 +241,7 @@ template <>
struct
IntTraits
<
long
>
:
SignedIntTraits
<
long
,
unsigned
long
>
{};
template
<
>
struct
IntTraits
<
long
long
>
:
SignedIntTraits
<
long
l
ong
,
unsigned
long
long
>
{};
struct
IntTraits
<
LongLong
>
:
SignedIntTraits
<
LongL
ong
,
unsigned
long
long
>
{};
template
<
typename
T
>
struct
IsLongDouble
{
enum
{
VALUE
=
0
};
};
...
...
@@ -533,7 +541,7 @@ DEFINE_INT_FORMATTERS(int)
DEFINE_INT_FORMATTERS
(
long
)
DEFINE_INT_FORMATTERS
(
unsigned
)
DEFINE_INT_FORMATTERS
(
unsigned
long
)
DEFINE_INT_FORMATTERS
(
long
l
ong
)
DEFINE_INT_FORMATTERS
(
LongL
ong
)
DEFINE_INT_FORMATTERS
(
unsigned
long
long
)
/**
...
...
@@ -717,8 +725,8 @@ class BasicWriter {
BasicWriter
&
operator
<<
(
unsigned
long
value
)
{
return
*
this
<<
IntFormatSpec
<
unsigned
long
>
(
value
);
}
BasicWriter
&
operator
<<
(
long
l
ong
value
)
{
return
*
this
<<
IntFormatSpec
<
long
l
ong
>
(
value
);
BasicWriter
&
operator
<<
(
LongL
ong
value
)
{
return
*
this
<<
IntFormatSpec
<
LongL
ong
>
(
value
);
}
/**
...
...
@@ -975,7 +983,7 @@ class BasicFormatter {
double
double_value
;
long
long_value
;
unsigned
long
ulong_value
;
long
l
ong
long_long_value
;
LongL
ong
long_long_value
;
unsigned
long
long
ulong_long_value
;
long
double
long_double_value
;
const
void
*
pointer_value
;
...
...
@@ -990,7 +998,7 @@ class BasicFormatter {
Arg
(
unsigned
value
)
:
type
(
UINT
),
uint_value
(
value
),
formatter
(
0
)
{}
Arg
(
long
value
)
:
type
(
LONG
),
long_value
(
value
),
formatter
(
0
)
{}
Arg
(
unsigned
long
value
)
:
type
(
ULONG
),
ulong_value
(
value
),
formatter
(
0
)
{}
Arg
(
long
l
ong
value
)
Arg
(
LongL
ong
value
)
:
type
(
LONG_LONG
),
long_long_value
(
value
),
formatter
(
0
)
{}
Arg
(
unsigned
long
long
value
)
:
type
(
ULONG_LONG
),
ulong_long_value
(
value
),
formatter
(
0
)
{}
...
...
@@ -1311,7 +1319,7 @@ class FormatInt {
return
buffer_end
;
}
void
FormatSigned
(
long
l
ong
value
)
{
void
FormatSigned
(
LongL
ong
value
)
{
unsigned
long
long
abs_value
=
value
;
bool
negative
=
value
<
0
;
if
(
negative
)
...
...
@@ -1324,7 +1332,7 @@ class FormatInt {
public:
explicit
FormatInt
(
int
value
)
{
FormatSigned
(
value
);
}
explicit
FormatInt
(
long
value
)
{
FormatSigned
(
value
);
}
explicit
FormatInt
(
long
l
ong
value
)
{
FormatSigned
(
value
);
}
explicit
FormatInt
(
LongL
ong
value
)
{
FormatSigned
(
value
);
}
explicit
FormatInt
(
unsigned
value
)
:
str_
(
FormatDecimal
(
value
))
{}
explicit
FormatInt
(
unsigned
long
value
)
:
str_
(
FormatDecimal
(
value
))
{}
explicit
FormatInt
(
unsigned
long
long
value
)
:
str_
(
FormatDecimal
(
value
))
{}
...
...
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