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
5f847391
Commit
5f847391
authored
Jul 01, 2021
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove outdated apidoc
parent
785908ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
19 deletions
+1
-19
include/fmt/core.h
include/fmt/core.h
+1
-19
No files found.
include/fmt/core.h
View file @
5f847391
...
...
@@ -532,39 +532,21 @@ using string_view = basic_string_view<char>;
template
<
typename
T
>
struct
is_char
:
std
::
false_type
{};
template
<
>
struct
is_char
<
char
>
:
std
::
true_type
{};
/**
\rst
Returns a string view of `s`. In order to add custom string type support to
{fmt} provide an overload of `to_string_view` for it in the same namespace as
the type for the argument-dependent lookup to work.
**Example**::
namespace my_ns {
inline string_view to_string_view(const my_string& s) {
return {s.data(), s.length()};
}
}
std::string message = fmt::format(my_string("The answer is {}"), 42);
\endrst
*/
// Returns a string view of `s`.
template
<
typename
Char
,
FMT_ENABLE_IF
(
is_char
<
Char
>
::
value
)
>
FMT_INLINE
auto
to_string_view
(
const
Char
*
s
)
->
basic_string_view
<
Char
>
{
return
s
;
}
template
<
typename
Char
,
typename
Traits
,
typename
Alloc
>
inline
auto
to_string_view
(
const
std
::
basic_string
<
Char
,
Traits
,
Alloc
>&
s
)
->
basic_string_view
<
Char
>
{
return
s
;
}
template
<
typename
Char
>
constexpr
auto
to_string_view
(
basic_string_view
<
Char
>
s
)
->
basic_string_view
<
Char
>
{
return
s
;
}
template
<
typename
Char
,
FMT_ENABLE_IF
(
!
std
::
is_empty
<
detail
::
std_string_view
<
Char
>
>::
value
)
>
inline
auto
to_string_view
(
detail
::
std_string_view
<
Char
>
s
)
...
...
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