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
4cf21f58
Commit
4cf21f58
authored
Sep 25, 2018
by
Daniela Engert
Committed by
Victor Zverovich
Sep 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
constrain templated format_to on proper format string type.
Signed-off-by:
Daniela Engert
<
dani@ngrt.de
>
parent
d7f17613
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
include/fmt/color.h
include/fmt/color.h
+0
-4
include/fmt/core.h
include/fmt/core.h
+3
-0
include/fmt/format.h
include/fmt/format.h
+2
-1
No files found.
include/fmt/color.h
View file @
4cf21f58
...
@@ -266,10 +266,6 @@ template <>
...
@@ -266,10 +266,6 @@ template <>
inline
void
reset_color
<
wchar_t
>
(
FILE
*
stream
)
FMT_NOEXCEPT
{
inline
void
reset_color
<
wchar_t
>
(
FILE
*
stream
)
FMT_NOEXCEPT
{
fputs
(
internal
::
data
::
WRESET_COLOR
,
stream
);
fputs
(
internal
::
data
::
WRESET_COLOR
,
stream
);
}
}
template
<
typename
S
>
struct
is_format_string
:
std
::
integral_constant
<
bool
,
std
::
is_empty
<
format_string_traits
<
S
>>::
value
>
{};
}
// namespace internal
}
// namespace internal
template
<
template
<
...
...
include/fmt/core.h
View file @
4cf21f58
...
@@ -1285,6 +1285,9 @@ struct format_string_traits<
...
@@ -1285,6 +1285,9 @@ struct format_string_traits<
basic_string_view
<
typename
S
::
char_type
>
,
S
>::
value
>::
type
>
:
basic_string_view
<
typename
S
::
char_type
>
,
S
>::
value
>::
type
>
:
format_string_traits_base
<
typename
S
::
char_type
>
{};
format_string_traits_base
<
typename
S
::
char_type
>
{};
template
<
typename
S
>
struct
is_format_string
:
std
::
is_empty
<
format_string_traits
<
S
>>
{};
template
<
typename
S
>
template
<
typename
S
>
struct
is_compile_string
:
struct
is_compile_string
:
std
::
integral_constant
<
bool
,
std
::
is_base_of
<
compile_string
,
S
>::
value
>
{};
std
::
integral_constant
<
bool
,
std
::
is_base_of
<
compile_string
,
S
>::
value
>
{};
...
...
include/fmt/format.h
View file @
4cf21f58
...
@@ -3507,7 +3507,8 @@ inline OutputIt vformat_to(
...
@@ -3507,7 +3507,8 @@ inline OutputIt vformat_to(
\endrst
\endrst
*/
*/
template
<
typename
OutputIt
,
typename
String
,
typename
...
Args
>
template
<
typename
OutputIt
,
typename
String
,
typename
...
Args
>
inline
OutputIt
format_to
(
OutputIt
out
,
const
String
&
format_str
,
inline
typename
std
::
enable_if
<
internal
::
is_format_string
<
String
>::
value
,
OutputIt
>::
type
format_to
(
OutputIt
out
,
const
String
&
format_str
,
const
Args
&
...
args
)
{
const
Args
&
...
args
)
{
internal
::
check_format_string
<
Args
...
>
(
format_str
);
internal
::
check_format_string
<
Args
...
>
(
format_str
);
typedef
typename
format_context_t
<
OutputIt
,
FMT_CHAR
(
String
)
>::
type
context_t
;
typedef
typename
format_context_t
<
OutputIt
,
FMT_CHAR
(
String
)
>::
type
context_t
;
...
...
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