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
2a3f4de3
Commit
2a3f4de3
authored
Oct 20, 2020
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove iterator_category
parent
27fdb4ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
17 deletions
+1
-17
include/fmt/core.h
include/fmt/core.h
+1
-17
No files found.
include/fmt/core.h
View file @
2a3f4de3
...
...
@@ -1352,32 +1352,16 @@ namespace detail {
// A workaround for gcc 4.8 to make void_t work in a SFINAE context.
template
<
typename
...
Ts
>
struct
void_t_impl
{
using
type
=
void
;
};
template
<
typename
...
Ts
>
using
void_t
=
typename
detail
::
void_t_impl
<
Ts
...
>::
type
;
// Detect the iterator category of *any* given type in a SFINAE-friendly way.
// Unfortunately, older implementations of std::iterator_traits are not safe
// for use in a SFINAE-context.
template
<
typename
It
,
typename
Enable
=
void
>
struct
iterator_category
:
std
::
false_type
{};
template
<
typename
T
>
struct
iterator_category
<
T
*>
{
using
type
=
std
::
random_access_iterator_tag
;
};
template
<
typename
It
>
struct
iterator_category
<
It
,
void_t
<
typename
It
::
iterator_category
>>
{
using
type
=
typename
It
::
iterator_category
;
};
template
<
typename
It
,
typename
T
,
typename
Enable
=
void
>
struct
is_output_iterator
:
std
::
false_type
{};
template
<
typename
It
,
typename
T
>
struct
is_output_iterator
<
It
,
T
,
void_t
<
typename
iterator_category
<
It
>::
type
,
void_t
<
typename
std
::
iterator_traits
<
It
>::
iterator_category
,
decltype
(
*
std
::
declval
<
It
>
()
=
std
::
declval
<
T
>
())
>>
:
std
::
true_type
{};
...
...
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