Skip to content

[concept] Swappable bug & concepts::valid_expr #29

@jamboree

Description

@jamboree

This code fails to compile: (tested clang 3.5 & g++ 4.9.1)

#include <range/v3/utility/concepts.hpp>

int main(int argc, char** argv) {
    static_assert(ranges::v3::Swappable<int&>(), "");  
    return 0;
}

In the implementation, concepts::valid_expr is used, but swap returns void, which cannot be an arg.
Why is concepts::valid_expr needed at the first place?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions