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
e895da2e
Commit
e895da2e
authored
Jun 10, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up value
parent
e1a67b52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
include/fmt/core.h
include/fmt/core.h
+11
-9
No files found.
include/fmt/core.h
View file @
e895da2e
...
...
@@ -670,7 +670,7 @@ FMT_CONSTEXPR bool is_arithmetic(type t) {
}
template
<
typename
Char
>
struct
string_value
{
const
Char
*
value
;
const
Char
*
data
;
std
::
size_t
size
;
};
...
...
@@ -690,6 +690,8 @@ template <typename Context> class value {
unsigned
uint_value
;
long
long
long_long_value
;
unsigned
long
long
ulong_long_value
;
bool
bool_value
;
char_type
char_value
;
double
double_value
;
long
double
long_double_value
;
const
void
*
pointer
;
...
...
@@ -704,11 +706,11 @@ template <typename Context> class value {
value
(
unsigned
long
long
val
)
:
ulong_long_value
(
val
)
{}
value
(
double
val
)
:
double_value
(
val
)
{}
value
(
long
double
val
)
:
long_double_value
(
val
)
{}
value
(
bool
val
)
:
int
_value
(
val
)
{}
value
(
char_type
val
)
:
int
_value
(
val
)
{}
value
(
const
char_type
*
val
)
{
string
.
value
=
val
;
}
value
(
bool
val
)
:
bool
_value
(
val
)
{}
value
(
char_type
val
)
:
char
_value
(
val
)
{}
value
(
const
char_type
*
val
)
{
string
.
data
=
val
;
}
value
(
basic_string_view
<
char_type
>
val
)
{
string
.
value
=
val
.
data
();
string
.
data
=
val
.
data
();
string
.
size
=
val
.
size
();
}
value
(
const
void
*
val
)
:
pointer
(
val
)
{}
...
...
@@ -914,17 +916,17 @@ FMT_CONSTEXPR internal::invoke_result_t<Visitor, int> visit_format_arg(
case
internal
:
:
ulong_long_type
:
return
vis
(
arg
.
value_
.
ulong_long_value
);
case
internal
:
:
bool_type
:
return
vis
(
arg
.
value_
.
int_value
!=
0
);
return
vis
(
arg
.
value_
.
bool_value
);
case
internal
:
:
char_type
:
return
vis
(
static_cast
<
char_type
>
(
arg
.
value_
.
int_value
)
);
return
vis
(
arg
.
value_
.
char_value
);
case
internal
:
:
double_type
:
return
vis
(
arg
.
value_
.
double_value
);
case
internal
:
:
long_double_type
:
return
vis
(
arg
.
value_
.
long_double_value
);
case
internal
:
:
cstring_type
:
return
vis
(
arg
.
value_
.
string
.
value
);
return
vis
(
arg
.
value_
.
string
.
data
);
case
internal
:
:
string_type
:
return
vis
(
basic_string_view
<
char_type
>
(
arg
.
value_
.
string
.
value
,
return
vis
(
basic_string_view
<
char_type
>
(
arg
.
value_
.
string
.
data
,
arg
.
value_
.
string
.
size
));
case
internal
:
:
pointer_type
:
return
vis
(
arg
.
value_
.
pointer
);
...
...
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