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
563cbb6c
Commit
563cbb6c
authored
Oct 31, 2020
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a macro to workaround clang/gcc ABI incompatibility on ARM
parent
425778aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
include/fmt/core.h
include/fmt/core.h
+14
-7
No files found.
include/fmt/core.h
View file @
563cbb6c
...
...
@@ -1929,7 +1929,14 @@ template <typename Context> class basic_format_args {
}
};
/** An alias to ``basic_format_args<context>``. */
#ifdef FMT_ARM_ABI_COMPATIBILITY
/** An alias to ``basic_format_args<format_context>``. */
// Separate types would result in shorter symbols but break ABI compatibility
// between clang and gcc on ARM (#1919).
using
format_args
=
basic_format_args
<
format_context
>
;
using
wformat_args
=
basic_format_args
<
wformat_context
>
;
#else
// DEPRECATED! These are kept for ABI compatibility.
// It is a separate type rather than an alias to make symbols readable.
struct
format_args
:
basic_format_args
<
format_context
>
{
template
<
typename
...
Args
>
...
...
@@ -1938,6 +1945,7 @@ struct format_args : basic_format_args<format_context> {
struct
wformat_args
:
basic_format_args
<
wformat_context
>
{
using
basic_format_args
::
basic_format_args
;
};
#endif
namespace
detail
{
...
...
@@ -1969,10 +1977,9 @@ inline void vprint_mojibake(std::FILE*, string_view, format_args) {}
// vformat_to<ArgFormatter>(...) overload, so SFINAE on iterator type instead.
template
<
typename
OutputIt
,
typename
S
,
typename
Char
=
char_t
<
S
>,
bool
enable
=
detail
::
is_output_iterator
<
OutputIt
,
Char
>::
value
>
auto
vformat_to
(
OutputIt
out
,
const
S
&
format_str
,
basic_format_args
<
buffer_context
<
type_identity_t
<
Char
>>>
args
)
->
typename
std
::
enable_if
<
enable
,
OutputIt
>::
type
{
auto
vformat_to
(
OutputIt
out
,
const
S
&
format_str
,
basic_format_args
<
buffer_context
<
type_identity_t
<
Char
>>>
args
)
->
typename
std
::
enable_if
<
enable
,
OutputIt
>::
type
{
decltype
(
detail
::
get_buffer
<
Char
>
(
out
))
buf
(
detail
::
get_buffer_init
(
out
));
detail
::
vformat_to
(
buf
,
to_string_view
(
format_str
),
args
);
return
detail
::
get_iterator
(
buf
);
...
...
@@ -2025,8 +2032,8 @@ inline format_to_n_result<OutputIt> vformat_to_n(
*/
template
<
typename
OutputIt
,
typename
S
,
typename
...
Args
,
bool
enable
=
detail
::
is_output_iterator
<
OutputIt
,
char_t
<
S
>
>::
value
>
inline
auto
format_to_n
(
OutputIt
out
,
size_t
n
,
const
S
&
format_str
,
const
Args
&
...
args
)
->
inline
auto
format_to_n
(
OutputIt
out
,
size_t
n
,
const
S
&
format_str
,
const
Args
&
...
args
)
->
typename
std
::
enable_if
<
enable
,
format_to_n_result
<
OutputIt
>>::
type
{
const
auto
&
vargs
=
fmt
::
make_args_checked
<
Args
...
>
(
format_str
,
args
...);
return
vformat_to_n
(
out
,
n
,
to_string_view
(
format_str
),
vargs
);
...
...
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