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
431d0f85
Commit
431d0f85
authored
Jul 27, 2019
by
Charles Milette
Committed by
Victor Zverovich
Aug 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use basic_string_view in non-template UDL
parent
ad71f5a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
include/fmt/format.h
include/fmt/format.h
+8
-8
No files found.
include/fmt/format.h
View file @
431d0f85
...
...
@@ -3466,7 +3466,7 @@ template <typename Char, Char... CHARS> class udl_formatter {
};
# else
template
<
typename
Char
>
struct
udl_formatter
{
const
Char
*
str
;
basic_string_view
<
Char
>
str
;
template
<
typename
...
Args
>
auto
operator
()(
Args
&&
...
args
)
const
...
...
@@ -3477,7 +3477,7 @@ template <typename Char> struct udl_formatter {
# endif // FMT_USE_UDL_TEMPLATE
template
<
typename
Char
>
struct
udl_arg
{
const
Char
*
str
;
basic_string_view
<
Char
>
str
;
template
<
typename
T
>
named_arg
<
T
,
Char
>
operator
=
(
T
&&
value
)
const
{
return
{
str
,
std
::
forward
<
T
>
(
value
)};
...
...
@@ -3508,13 +3508,13 @@ FMT_CONSTEXPR internal::udl_formatter<Char, CHARS...> operator""_format() {
std::string message = "The answer is {}"_format(42);
\endrst
*/
inline
internal
::
udl_formatter
<
char
>
operator
""
_format
(
const
char
*
s
,
std
::
size_t
)
{
return
{
s
};
FMT_CONSTEXPR
internal
::
udl_formatter
<
char
>
operator
""
_format
(
const
char
*
s
,
std
::
size_t
n
)
{
return
{
{
s
,
n
}
};
}
inline
internal
::
udl_formatter
<
wchar_t
>
operator
""
_format
(
const
wchar_t
*
s
,
std
::
size_t
)
{
return
{
s
};
FMT_CONSTEXPR
internal
::
udl_formatter
<
wchar_t
>
operator
""
_format
(
const
wchar_t
*
s
,
std
::
size_t
n
)
{
return
{
{
s
,
n
}
};
}
# endif // FMT_USE_UDL_TEMPLATE
...
...
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