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
ddbd50de
Commit
ddbd50de
authored
Jun 28, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build.
parent
4d5b1e8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
13 deletions
+18
-13
format.cc
format.cc
+5
-5
format.h
format.h
+13
-8
No files found.
format.cc
View file @
ddbd50de
...
...
@@ -179,11 +179,11 @@ const uint64_t fmt::internal::POWERS_OF_10_64[] = {
void
fmt
::
internal
::
ReportUnknownType
(
char
code
,
const
char
*
type
)
{
if
(
std
::
isprint
(
static_cast
<
unsigned
char
>
(
code
)))
{
throw
fmt
::
FormatError
(
fmt
::
str
(
fmt
::
Format
(
"unknown format code '{}' for {}"
)
<<
code
<<
type
));
fmt
::
format
(
"unknown format code '{}' for {}"
,
code
,
type
)
));
}
throw
fmt
::
FormatError
(
fmt
::
str
(
fmt
::
Format
(
"unknown format code '
\\
x{:02x}' for {}"
)
<<
static_cast
<
unsigned
>
(
code
)
<<
type
));
fmt
::
str
(
fmt
::
format
(
"unknown format code '
\\
x{:02x}' for {}"
,
static_cast
<
unsigned
>
(
code
),
type
)
));
}
#ifdef _WIN32
...
...
@@ -569,11 +569,11 @@ void fmt::BasicWriter<Char>::FormatParser::CheckSign(
char
sign
=
static_cast
<
char
>
(
*
s
);
if
(
arg
.
type
>
Arg
::
LAST_NUMERIC_TYPE
)
{
report_error_
(
s
,
fmt
::
Format
(
"format specifier '{}' requires numeric argument"
)
<<
sign
);
fmt
::
c_str
(
fmt
::
format
(
"format specifier '{}' requires numeric argument"
,
sign
))
);
}
if
(
arg
.
type
==
Arg
::
UINT
||
arg
.
type
==
Arg
::
ULONG_LONG
)
{
report_error_
(
s
,
fmt
::
Format
(
"format specifier '{}' requires signed argument"
)
<<
sign
);
fmt
::
c_str
(
fmt
::
format
(
"format specifier '{}' requires signed argument"
,
sign
))
);
}
++
s
;
}
...
...
format.h
View file @
ddbd50de
...
...
@@ -859,7 +859,9 @@ inline StrFormatSpec<wchar_t> pad(
return
StrFormatSpec
<
wchar_t
>
(
str
,
width
,
fill
);
}
// An argument list.
/**
An argument list.
*/
class
ArgList
{
private:
const
internal
::
ArgInfo
*
args_
;
...
...
@@ -1398,17 +1400,21 @@ class BasicWriter {
// This function is deprecated, use write instead.
FMT_DEPRECATED
(
void
Write
(
const
std
::
basic_string
<
Char
>
&
s
,
const
FormatSpec
&
spec
));
void
Write
(
const
std
::
basic_string
<
Char
>
&
s
,
const
FormatSpec
&
spec
)
{
write
(
s
,
spec
);
}
void
clear
()
{
buffer_
.
clear
();
}
// This function is deprecated, use clear instead.
FMT_DEPRECATED
(
void
Clear
());
void
Clear
()
{
clear
();
}
};
template
<
typename
Char
>
inline
void
BasicWriter
<
Char
>::
Write
(
const
std
::
basic_string
<
Char
>
&
s
,
const
FormatSpec
&
spec
)
{
write
(
s
,
spec
);
}
template
<
typename
Char
>
inline
void
BasicWriter
<
Char
>::
Clear
()
{
clear
();
}
template
<
typename
Char
>
template
<
typename
StringChar
>
typename
BasicWriter
<
Char
>::
CharPtr
BasicWriter
<
Char
>::
FormatString
(
...
...
@@ -1595,7 +1601,7 @@ namespace internal {
// Formats an argument of a custom type, such as a user-defined class.
template
<
typename
Char
,
typename
T
>
void
FormatCustomArg
(
void
*
writer
,
const
void
*
arg
,
const
FormatSpec
&
spec
)
{
F
ormat
(
*
static_cast
<
BasicWriter
<
Char
>*>
(
writer
),
f
ormat
(
*
static_cast
<
BasicWriter
<
Char
>*>
(
writer
),
spec
,
*
static_cast
<
const
T
*>
(
arg
));
}
}
...
...
@@ -1823,9 +1829,8 @@ inline Formatter<> Format(StringRef format) {
return
f
;
}
// This function is deprecated, use format instead.
F
MT_DEPRECATED
(
Formatter
<
NullSink
,
wchar_t
>
Format
(
WStringRef
format
));
F
ormatter
<
NullSink
,
wchar_t
>
FMT_DEPRECATED
(
Format
(
WStringRef
format
));
inline
Formatter
<
NullSink
,
wchar_t
>
Format
(
WStringRef
format
)
{
Formatter
<
NullSink
,
wchar_t
>
f
(
format
);
return
f
;
...
...
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