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
cd5b5670
Commit
cd5b5670
authored
Jun 05, 2018
by
Dror Levin
Committed by
Victor Zverovich
Jun 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make is_range and is_tuple_like public API, fix #751
parent
6322b47e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
include/fmt/ranges.h
include/fmt/ranges.h
+14
-14
No files found.
include/fmt/ranges.h
View file @
cd5b5670
...
...
@@ -100,12 +100,6 @@ struct is_range_<T,typename std::conditional<
decltype
(
internal
::
declval
<
T
>
().
end
())
>
,
void
>::
type
>
:
std
::
true_type
{};
template
<
typename
T
>
struct
is_range
{
static
FMT_CONSTEXPR_DECL
const
bool
value
=
is_range_
<
T
>::
value
&&
!
is_like_std_string
<
T
>::
value
;
};
/// tuple_size and tuple_element check.
template
<
typename
T
>
class
is_tuple_like_
{
...
...
@@ -121,12 +115,6 @@ class is_tuple_like_ {
!
std
::
is_void
<
decltype
(
check
<
T
>
(
FMT_NULL
))
>::
value
;
};
template
<
typename
T
>
struct
is_tuple_like
{
static
FMT_CONSTEXPR_DECL
const
bool
value
=
is_tuple_like_
<
T
>::
value
&&
!
is_range_
<
T
>::
value
;
};
// Check for integer_sequence
#if defined(__cpp_lib_integer_sequence) || FMT_MSC_VER >= 1900
template
<
typename
T
,
T
...
N
>
...
...
@@ -176,9 +164,15 @@ void for_each(Tuple &&tup, F &&f) {
}
}
// namespace internal
template
<
typename
T
>
struct
is_tuple_like
{
static
FMT_CONSTEXPR_DECL
const
bool
value
=
internal
::
is_tuple_like_
<
T
>::
value
&&
!
internal
::
is_range_
<
T
>::
value
;
};
template
<
typename
TupleT
,
typename
Char
>
struct
formatter
<
TupleT
,
Char
,
typename
std
::
enable_if
<
internal
::
is_tuple_like
<
TupleT
>::
value
>::
type
>
{
typename
std
::
enable_if
<
fmt
::
is_tuple_like
<
TupleT
>::
value
>::
type
>
{
private:
// C++11 generic lambda for format()
template
<
typename
FormatContext
>
...
...
@@ -228,9 +222,15 @@ public:
}
};
template
<
typename
T
>
struct
is_range
{
static
FMT_CONSTEXPR_DECL
const
bool
value
=
internal
::
is_range_
<
T
>::
value
&&
!
internal
::
is_like_std_string
<
T
>::
value
;
};
template
<
typename
RangeT
,
typename
Char
>
struct
formatter
<
RangeT
,
Char
,
typename
std
::
enable_if
<
internal
::
is_range
<
RangeT
>::
value
>::
type
>
{
typename
std
::
enable_if
<
fmt
::
is_range
<
RangeT
>::
value
>::
type
>
{
formatting_range
<
Char
>
formatting
;
...
...
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