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
3e7a29cc
Commit
3e7a29cc
authored
Jul 02, 2021
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround clang/gcc incompatibility
parent
00a57a9f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
include/fmt/color.h
include/fmt/color.h
+1
-1
include/fmt/core.h
include/fmt/core.h
+4
-4
include/fmt/format.h
include/fmt/format.h
+4
-7
include/fmt/xchar.h
include/fmt/xchar.h
+1
-1
src/format.cc
src/format.cc
+3
-0
No files found.
include/fmt/color.h
View file @
3e7a29cc
...
@@ -507,7 +507,7 @@ void vformat_to(buffer<Char>& buf, const text_style& ts,
...
@@ -507,7 +507,7 @@ void vformat_to(buffer<Char>& buf, const text_style& ts,
auto
background
=
detail
::
make_background_color
<
Char
>
(
ts
.
get_background
());
auto
background
=
detail
::
make_background_color
<
Char
>
(
ts
.
get_background
());
buf
.
append
(
background
.
begin
(),
background
.
end
());
buf
.
append
(
background
.
begin
(),
background
.
end
());
}
}
detail
::
vformat_to
(
buf
,
format_str
,
args
);
detail
::
vformat_to
(
buf
,
format_str
,
args
,
{}
);
if
(
has_style
)
detail
::
reset_color
<
Char
>
(
buf
);
if
(
has_style
)
detail
::
reset_color
<
Char
>
(
buf
);
}
}
...
...
include/fmt/core.h
View file @
3e7a29cc
...
@@ -2734,7 +2734,7 @@ template <typename Char>
...
@@ -2734,7 +2734,7 @@ template <typename Char>
void
vformat_to
(
void
vformat_to
(
buffer
<
Char
>&
buf
,
basic_string_view
<
Char
>
fmt
,
buffer
<
Char
>&
buf
,
basic_string_view
<
Char
>
fmt
,
basic_format_args
<
FMT_BUFFER_CONTEXT
(
type_identity_t
<
Char
>
)
>
args
,
basic_format_args
<
FMT_BUFFER_CONTEXT
(
type_identity_t
<
Char
>
)
>
args
,
detail
::
locale_ref
loc
=
{});
locale_ref
loc
=
{});
FMT_API
void
vprint_mojibake
(
std
::
FILE
*
,
string_view
,
format_args
);
FMT_API
void
vprint_mojibake
(
std
::
FILE
*
,
string_view
,
format_args
);
#ifndef _WIN32
#ifndef _WIN32
...
@@ -2892,7 +2892,7 @@ template <typename OutputIt,
...
@@ -2892,7 +2892,7 @@ template <typename OutputIt,
auto
vformat_to
(
OutputIt
out
,
string_view
fmt
,
format_args
args
)
->
OutputIt
{
auto
vformat_to
(
OutputIt
out
,
string_view
fmt
,
format_args
args
)
->
OutputIt
{
using
detail
::
get_buffer
;
using
detail
::
get_buffer
;
auto
&&
buf
=
get_buffer
<
char
>
(
out
);
auto
&&
buf
=
get_buffer
<
char
>
(
out
);
detail
::
vformat_to
(
buf
,
string_view
(
fmt
),
args
);
detail
::
vformat_to
(
buf
,
string_view
(
fmt
),
args
,
{}
);
return
detail
::
get_iterator
(
buf
);
return
detail
::
get_iterator
(
buf
);
}
}
...
@@ -2929,7 +2929,7 @@ auto vformat_to_n(OutputIt out, size_t n, string_view fmt, format_args args)
...
@@ -2929,7 +2929,7 @@ auto vformat_to_n(OutputIt out, size_t n, string_view fmt, format_args args)
using
buffer
=
using
buffer
=
detail
::
iterator_buffer
<
OutputIt
,
char
,
detail
::
fixed_buffer_traits
>
;
detail
::
iterator_buffer
<
OutputIt
,
char
,
detail
::
fixed_buffer_traits
>
;
auto
buf
=
buffer
(
out
,
n
);
auto
buf
=
buffer
(
out
,
n
);
detail
::
vformat_to
(
buf
,
fmt
,
args
);
detail
::
vformat_to
(
buf
,
fmt
,
args
,
{}
);
return
{
buf
.
out
(),
buf
.
count
()};
return
{
buf
.
out
(),
buf
.
count
()};
}
}
...
@@ -2951,7 +2951,7 @@ FMT_INLINE auto format_to_n(OutputIt out, size_t n, format_string<T...> fmt,
...
@@ -2951,7 +2951,7 @@ FMT_INLINE auto format_to_n(OutputIt out, size_t n, format_string<T...> fmt,
template
<
typename
...
T
>
template
<
typename
...
T
>
FMT_INLINE
auto
formatted_size
(
format_string
<
T
...
>
fmt
,
T
&&
...
args
)
->
size_t
{
FMT_INLINE
auto
formatted_size
(
format_string
<
T
...
>
fmt
,
T
&&
...
args
)
->
size_t
{
auto
buf
=
detail
::
counting_buffer
<>
();
auto
buf
=
detail
::
counting_buffer
<>
();
detail
::
vformat_to
(
buf
,
string_view
(
fmt
),
fmt
::
make_format_args
(
args
...));
detail
::
vformat_to
(
buf
,
string_view
(
fmt
),
fmt
::
make_format_args
(
args
...)
,
{}
);
return
buf
.
count
();
return
buf
.
count
();
}
}
...
...
include/fmt/format.h
View file @
3e7a29cc
...
@@ -2624,8 +2624,9 @@ auto to_string(const basic_memory_buffer<Char, SIZE>& buf)
...
@@ -2624,8 +2624,9 @@ auto to_string(const basic_memory_buffer<Char, SIZE>& buf)
FMT_BEGIN_DETAIL_NAMESPACE
FMT_BEGIN_DETAIL_NAMESPACE
template
<
typename
Char
>
template
<
typename
Char
>
void
vformat_to
(
buffer
<
Char
>&
buf
,
basic_string_view
<
Char
>
fmt
,
void
vformat_to
(
basic_format_args
<
buffer_context
<
type_identity_t
<
Char
>>>
args
,
buffer
<
Char
>&
buf
,
basic_string_view
<
Char
>
fmt
,
basic_format_args
<
FMT_BUFFER_CONTEXT
(
type_identity_t
<
Char
>
)
>
args
,
locale_ref
loc
)
{
locale_ref
loc
)
{
// workaround for msvc bug regarding name-lookup in module
// workaround for msvc bug regarding name-lookup in module
// link names into function scope
// link names into function scope
...
@@ -2706,10 +2707,6 @@ void vformat_to(buffer<Char>& buf, basic_string_view<Char> fmt,
...
@@ -2706,10 +2707,6 @@ void vformat_to(buffer<Char>& buf, basic_string_view<Char> fmt,
}
}
#ifndef FMT_HEADER_ONLY
#ifndef FMT_HEADER_ONLY
extern
template
void
vformat_to
(
detail
::
buffer
<
char
>&
,
string_view
,
basic_format_args
<
format_context
>
,
detail
::
locale_ref
);
extern
template
FMT_API
auto
thousands_sep_impl
<
char
>(
locale_ref
)
extern
template
FMT_API
auto
thousands_sep_impl
<
char
>(
locale_ref
)
->
thousands_sep_result
<
char
>
;
->
thousands_sep_result
<
char
>
;
extern
template
FMT_API
auto
thousands_sep_impl
<
wchar_t
>(
locale_ref
)
extern
template
FMT_API
auto
thousands_sep_impl
<
wchar_t
>(
locale_ref
)
...
...
include/fmt/xchar.h
View file @
3e7a29cc
...
@@ -142,7 +142,7 @@ FMT_DEPRECATED auto format_to(basic_memory_buffer<Char, SIZE, Allocator>& buf,
...
@@ -142,7 +142,7 @@ FMT_DEPRECATED auto format_to(basic_memory_buffer<Char, SIZE, Allocator>& buf,
const
S
&
format_str
,
Args
&&
...
args
)
->
const
S
&
format_str
,
Args
&&
...
args
)
->
typename
buffer_context
<
Char
>::
iterator
{
typename
buffer_context
<
Char
>::
iterator
{
const
auto
&
vargs
=
fmt
::
make_args_checked
<
Args
...
>
(
format_str
,
args
...);
const
auto
&
vargs
=
fmt
::
make_args_checked
<
Args
...
>
(
format_str
,
args
...);
detail
::
vformat_to
(
buf
,
to_string_view
(
format_str
),
vargs
);
detail
::
vformat_to
(
buf
,
to_string_view
(
format_str
),
vargs
,
{}
);
return
detail
::
buffer_appender
<
Char
>
(
buf
);
return
detail
::
buffer_appender
<
Char
>
(
buf
);
}
}
...
...
src/format.cc
View file @
3e7a29cc
...
@@ -47,6 +47,9 @@ template FMT_API char detail::decimal_point_impl(locale_ref);
...
@@ -47,6 +47,9 @@ template FMT_API char detail::decimal_point_impl(locale_ref);
template
FMT_API
void
detail
::
buffer
<
char
>
::
append
(
const
char
*
,
const
char
*
);
template
FMT_API
void
detail
::
buffer
<
char
>
::
append
(
const
char
*
,
const
char
*
);
// DEPRECATED!
// There is no correspondent extern template in format.h because of
// incompatibility between clang and gcc (#2377).
template
FMT_API
void
detail
::
vformat_to
(
template
FMT_API
void
detail
::
vformat_to
(
detail
::
buffer
<
char
>
&
,
string_view
,
detail
::
buffer
<
char
>
&
,
string_view
,
basic_format_args
<
FMT_BUFFER_CONTEXT
(
char
)>,
detail
::
locale_ref
);
basic_format_args
<
FMT_BUFFER_CONTEXT
(
char
)>,
detail
::
locale_ref
);
...
...
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