Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
pylene
Commits
6e3645fa
Commit
6e3645fa
authored
Dec 12, 2018
by
Michaël Roynard
Browse files
concept checking
parent
bda9d0d5
Pipeline
#12420
passed with stages
in 13 minutes and 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pylene/include/mln/core/rangev3/view/transform.hpp
View file @
6e3645fa
...
...
@@ -162,10 +162,23 @@ namespace mln::ranges
return
{
::
ranges
::
view
::
all
(
static_cast
<
Rng
&&>
(
rng
)),
std
::
move
(
fun
)};
}
// TODO: concept checking
template
<
typename
Rng1
,
typename
Rng2
,
typename
Fun
,
CONCEPT_REQUIRES_
(
Concept2
<
Rng1
,
Rng2
,
Fun
>())
>
transform2_view
<::
ranges
::
view
::
all_t
<
Rng1
>
,
::
ranges
::
view
::
all_t
<
Rng2
>
,
Fun
>
operator
()(
Rng1
&&
rng1
,
Rng2
&&
rng2
,
Fun
fun
)
const
#ifdef PYLENE_CONCEPT_TS_ENABLED
// clang-format off
requires
mln
::
concepts
::
stl
::
InputRange
<
Rng1
>
&&
mln
::
concepts
::
stl
::
InputRange
<
Rng2
>
&&
mln
::
concepts
::
stl
::
CopyConstructible
<
Fun
>
&&
mln
::
concepts
::
stl
::
Invocable
<
Fun
&
,
::
ranges
::
range_reference_t
<
Rng1
>
,
::
ranges
::
range_reference_t
<
Rng2
>>
&&
not
mln
::
concepts
::
stl
::
Same
<
void
,
std
::
invoke_result_t
<
Fun
&
,
::
ranges
::
range_reference_t
<
Rng1
>
,
::
ranges
::
range_reference_t
<
Rng2
>>>
#endif // PYLENE_CONCEPT_TS_ENABLED
transform2_view
<::
ranges
::
view
::
all_t
<
Rng1
>
,
::
ranges
::
view
::
all_t
<
Rng2
>
,
Fun
>
operator
()(
Rng1
&&
rng1
,
Rng2
&&
rng2
,
Fun
fun
)
const
// clang-format on
{
return
{
::
ranges
::
view
::
all
(
static_cast
<
Rng1
&&>
(
rng1
)),
::
ranges
::
view
::
all
(
static_cast
<
Rng2
&&>
(
rng2
)),
std
::
move
(
fun
)};
...
...
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