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
427b5340
Commit
427b5340
authored
Jun 15, 2021
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add no_value state to value
parent
e421d527
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
include/fmt/core.h
include/fmt/core.h
+6
-2
No files found.
include/fmt/core.h
View file @
427b5340
...
@@ -328,7 +328,9 @@ using remove_cvref_t = typename std::remove_cv<remove_reference_t<T>>::type;
...
@@ -328,7 +328,9 @@ using remove_cvref_t = typename std::remove_cv<remove_reference_t<T>>::type;
template
<
typename
T
>
struct
type_identity
{
using
type
=
T
;
};
template
<
typename
T
>
struct
type_identity
{
using
type
=
T
;
};
template
<
typename
T
>
using
type_identity_t
=
typename
type_identity
<
T
>::
type
;
template
<
typename
T
>
using
type_identity_t
=
typename
type_identity
<
T
>::
type
;
struct
monostate
{};
struct
monostate
{
constexpr
monostate
()
{}
};
// An enable_if helper to be used in template parameters which results in much
// An enable_if helper to be used in template parameters which results in much
// shorter symbols: https://godbolt.org/z/sWw4vP. Extra parentheses are needed
// shorter symbols: https://godbolt.org/z/sWw4vP. Extra parentheses are needed
...
@@ -1131,6 +1133,7 @@ template <typename Context> class value {
...
@@ -1131,6 +1133,7 @@ template <typename Context> class value {
using
char_type
=
typename
Context
::
char_type
;
using
char_type
=
typename
Context
::
char_type
;
union
{
union
{
monostate
no_value
;
int
int_value
;
int
int_value
;
unsigned
uint_value
;
unsigned
uint_value
;
long
long
long_long_value
;
long
long
long_long_value
;
...
@@ -1148,7 +1151,8 @@ template <typename Context> class value {
...
@@ -1148,7 +1151,8 @@ template <typename Context> class value {
named_arg_value
<
char_type
>
named_args
;
named_arg_value
<
char_type
>
named_args
;
};
};
constexpr
FMT_INLINE
value
(
int
val
=
0
)
:
int_value
(
val
)
{}
constexpr
FMT_INLINE
value
()
:
no_value
()
{}
constexpr
FMT_INLINE
value
(
int
val
)
:
int_value
(
val
)
{}
constexpr
FMT_INLINE
value
(
unsigned
val
)
:
uint_value
(
val
)
{}
constexpr
FMT_INLINE
value
(
unsigned
val
)
:
uint_value
(
val
)
{}
constexpr
FMT_INLINE
value
(
long
long
val
)
:
long_long_value
(
val
)
{}
constexpr
FMT_INLINE
value
(
long
long
val
)
:
long_long_value
(
val
)
{}
constexpr
FMT_INLINE
value
(
unsigned
long
long
val
)
:
ulong_long_value
(
val
)
{}
constexpr
FMT_INLINE
value
(
unsigned
long
long
val
)
:
ulong_long_value
(
val
)
{}
...
...
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