Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New views #1410

Merged
merged 4 commits into from
Jan 8, 2020
Merged

New views #1410

merged 4 commits into from
Jan 8, 2020

Conversation

h-2
Copy link
Member

@h-2 h-2 commented Dec 8, 2019

  • adds views::move
  • adds views::as_const
  • renames views::allviews::simplify_type

@codecov
Copy link

codecov bot commented Dec 8, 2019

Codecov Report

Merging #1410 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1410      +/-   ##
==========================================
+ Coverage   97.59%   97.59%   +<.01%     
==========================================
  Files         232      234       +2     
  Lines        8783     8789       +6     
==========================================
+ Hits         8572     8578       +6     
  Misses        211      211
Impacted Files Coverage Δ
include/seqan3/range/views/type_reduce.hpp 100% <ø> (ø)
...qan3/alignment/pairwise/alignment_configurator.hpp 100% <ø> (ø) ⬆️
include/seqan3/io/alignment_file/header.hpp 100% <ø> (ø) ⬆️
...airwise/execution/execution_handler_sequential.hpp 100% <ø> (ø) ⬆️
.../pairwise/execution/alignment_executor_two_way.hpp 100% <ø> (ø) ⬆️
...clude/seqan3/io/alignment_file/format_sam_base.hpp 98.1% <ø> (ø) ⬆️
include/seqan3/range/views/interleave.hpp 100% <100%> (ø) ⬆️
include/seqan3/range/views/as_const.hpp 100% <100%> (ø)
include/seqan3/range/decorator/gap_decorator.hpp 100% <100%> (ø) ⬆️
include/seqan3/range/views/move.hpp 100% <100%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4935cca...7800593. Read the comment docs.

Copy link
Member

@eseiler eseiler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+ renaming of the all view

include/seqan3/range/views/simplify_type.hpp Outdated Show resolved Hide resolved
test/snippet/range/views/move.cpp Show resolved Hide resolved
test/unit/range/views/view_move_test.cpp Outdated Show resolved Hide resolved
test/unit/range/views/view_move_test.cpp Show resolved Hide resolved
Copy link
Member

@eseiler eseiler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't force push during reviews, makes it very hard to see what was actually changed...

@h-2 h-2 requested a review from rrahn December 9, 2019 22:39
Copy link
Contributor

@rrahn rrahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor stuff 💅 only

* \ingroup type_traits
*/
template <typename ...invocable_ts>
struct multi_lambda : invocable_ts...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhmm, multi lambda is not such a good name. I mean it would work with any invocable not just lambdas.
So what about: multi_invocable invocable_pool invocable_union?

//!\brief Function object for seqan3::views::as_const.
struct as_const_fn
{
//!\brief Operator for returning values as values.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//!\brief Operator for returning values as values.
//!\brief Operator for returning rvalue as prvalue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link to the value categories of std as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it doesn't change the value category.

{
std::string const vec{"foobar"};
std::string_view v = vec | seqan3::views::type_reduce; // pipe notation; v is of type std::string_view
seqan3::debug_stream << v << '\n'; // "foobar"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alignment of the comments


std::vector vec2{1, 2, 3};
std::span v2 = seqan3::views::type_reduce(vec2); // functional notation; v is of type std::span
seqan3::debug_stream << v2 << '\n'; // "[1, 2, 3]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alignment of the comments

Copy link
Contributor

@rrahn rrahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only minor docu thing 💅

return std::move(arg);
}

//!\brief Operator for returns lvalue references as lvalue-to-const-references.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//!\brief Operator for returns lvalue references as lvalue-to-const-references.
//!\brief Operator that returns lvalue references as lvalue-to-const-references.

@h-2
Copy link
Member Author

h-2 commented Dec 22, 2019

Don't know what's going on with Jenkins here.

@rrahn rrahn merged commit 87bf74e into seqan:master Jan 8, 2020
@h-2 h-2 mentioned this pull request Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants