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
388bb389
Commit
388bb389
authored
Jun 05, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
integral_constant -> bool_constant
parent
7e39c7e6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
include/fmt/core.h
include/fmt/core.h
+3
-4
include/fmt/format.h
include/fmt/format.h
+5
-7
No files found.
include/fmt/core.h
View file @
388bb389
...
...
@@ -400,7 +400,7 @@ using fmt::v5::to_string_view;
// Specifies whether S is a string type convertible to fmt::basic_string_view.
// It should be a constexpr function but MSVC 2017 fails to compile it in
// enable_if.
// enable_if.
MSVC 2015 fails to compile it as an alias template.
template
<
typename
S
>
struct
is_string
:
bool_constant
<
...
...
@@ -483,8 +483,7 @@ struct formatter {
};
template
<
typename
T
,
typename
Char
,
typename
Enable
=
void
>
struct
convert_to_int
:
std
::
integral_constant
<
bool
,
!
std
::
is_arithmetic
<
T
>::
value
&&
struct
convert_to_int
:
bool_constant
<!
std
::
is_arithmetic
<
T
>::
value
&&
std
::
is_convertible
<
T
,
int
>::
value
>
{};
namespace
internal
{
...
...
include/fmt/format.h
View file @
388bb389
...
...
@@ -780,8 +780,8 @@ inline char8_t to_char8_t(char c) { return static_cast<char8_t>(c); }
template
<
typename
InputIt
,
typename
OutChar
>
struct
needs_conversion
:
std
::
integra
l_constant
<
bool
,
std
::
is_same
<
typename
std
::
iterator_traits
<
InputIt
>::
value_type
,
:
boo
l_constant
<
std
::
is_same
<
typename
std
::
iterator_traits
<
InputIt
>::
value_type
,
char
>::
value
&&
std
::
is_same
<
OutChar
,
char8_t
>::
value
>
{};
...
...
@@ -2261,9 +2261,7 @@ void check_format_string(S format_str) {
// It is not possible to use get_type in formatter specialization directly
// because of a bug in MSVC.
template
<
typename
Context
,
typename
T
>
struct
format_type
:
std
::
integral_constant
<
bool
,
get_type
<
Context
,
T
>::
value
!=
custom_type
>
{
};
using
format_type
=
bool_constant
<
get_type
<
Context
,
T
>::
value
!=
custom_type
>
;
template
<
template
<
typename
>
class
Handler
,
typename
Spec
,
typename
Context
>
void
handle_dynamic_spec
(
Spec
&
value
,
arg_ref
<
typename
Context
::
char_type
>
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