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
068d20bc
Commit
068d20bc
authored
Dec 14, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid shadowing warnings in FMT_STRING
parent
a99fbe67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
include/fmt/format.h
include/fmt/format.h
+4
-6
No files found.
include/fmt/format.h
View file @
068d20bc
...
@@ -3511,18 +3511,16 @@ FMT_END_NAMESPACE
...
@@ -3511,18 +3511,16 @@ FMT_END_NAMESPACE
#define FMT_STRING_IMPL(s, ...) \
#define FMT_STRING_IMPL(s, ...) \
[] { \
[] { \
struct str : fmt::compile_string { \
/* Use a macro-like name to avoid shadowing warnings. */
\
struct FMT_STRING : fmt::compile_string { \
using char_type = typename std::remove_cv<std::remove_pointer< \
using char_type = typename std::remove_cv<std::remove_pointer< \
typename std::decay<decltype(s)>::type>::type>::type; \
typename std::decay<decltype(s)>::type>::type>::type; \
__VA_ARGS__ FMT_CONSTEXPR \
__VA_ARGS__ FMT_CONSTEXPR \
operator fmt::basic_string_view<char_type>() const { \
operator fmt::basic_string_view<char_type>() const { \
return {s, sizeof(s) / sizeof(char_type) - 1}; \
return {s, sizeof(s) / sizeof(char_type) - 1}; \
} \
} \
} result; \
}; \
/* Suppress Qt Creator warning about unused operator. */
\
return FMT_STRING(); \
(void)static_cast<fmt::basic_string_view<typename str::char_type>>( \
result); \
return result; \
}()
}()
/**
/**
...
...
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