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
ec665108
Commit
ec665108
authored
Jun 02, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove old is_constructible workarounds and replace typedefs with using
parent
4d4b8c23
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
86 deletions
+57
-86
include/fmt/core.h
include/fmt/core.h
+45
-69
include/fmt/printf.h
include/fmt/printf.h
+3
-6
test/core-test.cc
test/core-test.cc
+9
-11
No files found.
include/fmt/core.h
View file @
ec665108
This diff is collapsed.
Click to expand it.
include/fmt/printf.h
View file @
ec665108
...
@@ -329,12 +329,9 @@ template <typename T> struct printf_formatter {
...
@@ -329,12 +329,9 @@ template <typename T> struct printf_formatter {
template
<
typename
OutputIt
,
typename
Char
>
class
basic_printf_context
{
template
<
typename
OutputIt
,
typename
Char
>
class
basic_printf_context
{
public:
public:
/** The character type for the output. */
/** The character type for the output. */
typedef
Char
char_type
;
using
char_type
=
Char
;
typedef
basic_format_arg
<
basic_printf_context
>
format_arg
;
using
format_arg
=
basic_format_arg
<
basic_printf_context
>
;
template
<
typename
T
>
using
formatter_type
=
printf_formatter
<
T
>
;
template
<
typename
T
>
struct
formatter_type
{
typedef
printf_formatter
<
T
>
type
;
};
private:
private:
typedef
basic_format_specs
<
char_type
>
format_specs
;
typedef
basic_format_specs
<
char_type
>
format_specs
;
...
...
test/core-test.cc
View file @
ec665108
...
@@ -209,17 +209,15 @@ struct custom_context {
...
@@ -209,17 +209,15 @@ struct custom_context {
typedef
char
char_type
;
typedef
char
char_type
;
template
<
typename
T
>
struct
formatter_type
{
template
<
typename
T
>
struct
formatter_type
{
struct
type
{
template
<
typename
ParseContext
>
template
<
typename
ParseContext
>
auto
parse
(
ParseContext
&
ctx
)
->
decltype
(
ctx
.
begin
())
{
auto
parse
(
ParseContext
&
ctx
)
->
decltype
(
ctx
.
begin
())
{
return
ctx
.
begin
();
return
ctx
.
begin
();
}
}
const
char
*
format
(
const
T
&
,
custom_context
&
ctx
)
{
const
char
*
format
(
const
T
&
,
custom_context
&
ctx
)
{
ctx
.
called
=
true
;
ctx
.
called
=
true
;
return
nullptr
;
return
nullptr
;
}
}
};
};
};
bool
called
;
bool
called
;
...
...
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