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
fe6eb792
Commit
fe6eb792
authored
May 29, 2022
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup check_format_string
parent
054b1d98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
15 deletions
+10
-15
doc/api.rst
doc/api.rst
+0
-2
include/fmt/core.h
include/fmt/core.h
+10
-13
No files found.
doc/api.rst
View file @
fe6eb792
...
@@ -322,8 +322,6 @@ Utilities
...
@@ -322,8 +322,6 @@ Utilities
.. doxygenfunction:: fmt::to_string(const T &value) -> std::string
.. doxygenfunction:: fmt::to_string(const T &value) -> std::string
.. doxygenfunction:: fmt::to_string_view(const Char *s) -> basic_string_view<Char>
.. doxygenfunction:: fmt::join(Range &&range, string_view sep) -> join_view<detail::iterator_t<Range>, detail::sentinel_t<Range>>
.. doxygenfunction:: fmt::join(Range &&range, string_view sep) -> join_view<detail::iterator_t<Range>, detail::sentinel_t<Range>>
.. doxygenfunction:: fmt::join(It begin, Sentinel end, string_view sep) -> join_view<It, Sentinel>
.. doxygenfunction:: fmt::join(It begin, Sentinel end, string_view sep) -> join_view<It, Sentinel>
...
...
include/fmt/core.h
View file @
fe6eb792
...
@@ -546,18 +546,6 @@ template <typename S> struct char_t_impl<S, enable_if_t<is_string<S>::value>> {
...
@@ -546,18 +546,6 @@ template <typename S> struct char_t_impl<S, enable_if_t<is_string<S>::value>> {
using
type
=
typename
result
::
value_type
;
using
type
=
typename
result
::
value_type
;
};
};
// Reports a compile-time error if S is not a valid format string.
template
<
typename
...
,
typename
S
,
FMT_ENABLE_IF
(
!
is_compile_string
<
S
>
::
value
)
>
FMT_INLINE
void
check_format_string
(
const
S
&
)
{
#ifdef FMT_ENFORCE_COMPILE_STRING
static_assert
(
is_compile_string
<
S
>::
value
,
"FMT_ENFORCE_COMPILE_STRING requires all format strings to use "
"FMT_STRING."
);
#endif
}
template
<
typename
...
,
typename
S
,
FMT_ENABLE_IF
(
is_compile_string
<
S
>
::
value
)
>
void
check_format_string
(
S
);
FMT_NORETURN
FMT_API
void
throw_format_error
(
const
char
*
message
);
FMT_NORETURN
FMT_API
void
throw_format_error
(
const
char
*
message
);
struct
error_handler
{
struct
error_handler
{
...
@@ -2921,8 +2909,17 @@ class format_string_checker {
...
@@ -2921,8 +2909,17 @@ class format_string_checker {
}
}
};
};
// Reports a compile-time error if S is not a valid format string.
template
<
typename
...
,
typename
S
,
FMT_ENABLE_IF
(
!
is_compile_string
<
S
>
::
value
)
>
FMT_INLINE
void
check_format_string
(
const
S
&
)
{
#ifdef FMT_ENFORCE_COMPILE_STRING
static_assert
(
is_compile_string
<
S
>::
value
,
"FMT_ENFORCE_COMPILE_STRING requires all format strings to use "
"FMT_STRING."
);
#endif
}
template
<
typename
...
Args
,
typename
S
,
template
<
typename
...
Args
,
typename
S
,
enable_if_t
<
(
is_compile_string
<
S
>
::
value
),
int
>
>
FMT_ENABLE_IF
(
is_compile_string
<
S
>
::
value
)
>
void
check_format_string
(
S
format_str
)
{
void
check_format_string
(
S
format_str
)
{
FMT_CONSTEXPR
auto
s
=
to_string_view
(
format_str
);
FMT_CONSTEXPR
auto
s
=
to_string_view
(
format_str
);
using
checker
=
format_string_checker
<
typename
S
::
char_type
,
error_handler
,
using
checker
=
format_string_checker
<
typename
S
::
char_type
,
error_handler
,
...
...
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