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
bb47109a
Commit
bb47109a
authored
Mar 04, 2018
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
f1ede638
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
include/fmt/core.h
include/fmt/core.h
+3
-8
include/fmt/format.cc
include/fmt/format.cc
+1
-1
include/fmt/format.h
include/fmt/format.h
+5
-0
No files found.
include/fmt/core.h
View file @
bb47109a
...
@@ -397,11 +397,6 @@ class container_buffer : public basic_buffer<typename Container::value_type> {
...
@@ -397,11 +397,6 @@ class container_buffer : public basic_buffer<typename Container::value_type> {
container_
(
c
)
{}
container_
(
c
)
{}
};
};
// A helper function to suppress bogus "conditional expression is constant"
// warnings.
template
<
typename
T
>
inline
T
const_check
(
T
value
)
{
return
value
;
}
struct
error_handler
{
struct
error_handler
{
FMT_CONSTEXPR
error_handler
()
{}
FMT_CONSTEXPR
error_handler
()
{}
FMT_CONSTEXPR
error_handler
(
const
error_handler
&
)
{}
FMT_CONSTEXPR
error_handler
(
const
error_handler
&
)
{}
...
@@ -1136,9 +1131,9 @@ inline internal::named_arg<T, wchar_t> arg(wstring_view name, const T &arg) {
...
@@ -1136,9 +1131,9 @@ inline internal::named_arg<T, wchar_t> arg(wstring_view name, const T &arg) {
template
<
typename
S
,
typename
T
,
typename
Char
>
template
<
typename
S
,
typename
T
,
typename
Char
>
void
arg
(
S
,
internal
::
named_arg
<
T
,
Char
>
)
FMT_DELETED
;
void
arg
(
S
,
internal
::
named_arg
<
T
,
Char
>
)
FMT_DELETED
;
enum
C
olor
{
BLACK
,
RED
,
GREEN
,
YELLOW
,
BLUE
,
MAGENTA
,
CYAN
,
WHITE
};
enum
c
olor
{
BLACK
,
RED
,
GREEN
,
YELLOW
,
BLUE
,
MAGENTA
,
CYAN
,
WHITE
};
FMT_API
void
vprint_colored
(
C
olor
c
,
string_view
format
,
format_args
args
);
FMT_API
void
vprint_colored
(
c
olor
c
,
string_view
format
,
format_args
args
);
/**
/**
Formats a string and prints it to stdout using ANSI escape sequences to
Formats a string and prints it to stdout using ANSI escape sequences to
...
@@ -1147,7 +1142,7 @@ FMT_API void vprint_colored(Color c, string_view format, format_args args);
...
@@ -1147,7 +1142,7 @@ FMT_API void vprint_colored(Color c, string_view format, format_args args);
fmt::print_colored(fmt::RED, "Elapsed time: {0:.2f} seconds", 1.23);
fmt::print_colored(fmt::RED, "Elapsed time: {0:.2f} seconds", 1.23);
*/
*/
template
<
typename
...
Args
>
template
<
typename
...
Args
>
inline
void
print_colored
(
C
olor
c
,
string_view
format_str
,
inline
void
print_colored
(
c
olor
c
,
string_view
format_str
,
const
Args
&
...
args
)
{
const
Args
&
...
args
)
{
vprint_colored
(
c
,
format_str
,
make_args
(
args
...));
vprint_colored
(
c
,
format_str
,
make_args
(
args
...));
}
}
...
...
include/fmt/format.cc
View file @
bb47109a
...
@@ -414,7 +414,7 @@ FMT_FUNC void vprint(string_view format_str, format_args args) {
...
@@ -414,7 +414,7 @@ FMT_FUNC void vprint(string_view format_str, format_args args) {
vprint
(
stdout
,
format_str
,
args
);
vprint
(
stdout
,
format_str
,
args
);
}
}
FMT_FUNC
void
vprint_colored
(
C
olor
c
,
string_view
format
,
format_args
args
)
{
FMT_FUNC
void
vprint_colored
(
c
olor
c
,
string_view
format
,
format_args
args
)
{
char
escape
[]
=
"
\x1b
[30m"
;
char
escape
[]
=
"
\x1b
[30m"
;
escape
[
3
]
=
static_cast
<
char
>
(
'0'
+
c
);
escape
[
3
]
=
static_cast
<
char
>
(
'0'
+
c
);
std
::
fputs
(
escape
,
stdout
);
std
::
fputs
(
escape
,
stdout
);
...
...
include/fmt/format.h
View file @
bb47109a
...
@@ -262,6 +262,11 @@ typename Allocator::value_type *allocate(Allocator& alloc, std::size_t n) {
...
@@ -262,6 +262,11 @@ typename Allocator::value_type *allocate(Allocator& alloc, std::size_t n) {
return
alloc
.
allocate
(
n
);
return
alloc
.
allocate
(
n
);
#endif
#endif
}
}
// A helper function to suppress bogus "conditional expression is constant"
// warnings.
template
<
typename
T
>
inline
T
const_check
(
T
value
)
{
return
value
;
}
}
// namespace internal
}
// namespace internal
}
// namespace fmt
}
// namespace fmt
...
...
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