Skip to content

Commit

Permalink
Deploying to gh-pages from @ e6799d0 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
huixie90 committed Sep 20, 2023
1 parent b014888 commit db14f8e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions impl/concat/test/issues.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

#include <catch2/catch_test_macros.hpp>

#include "concat.hpp"

#define TEST_POINT(x) TEST_CASE(x, "[issues]")

TEST_POINT("#4") {
std::ranges::concat_view cv{std::vector{1, 2}, std::vector{3, 4}};

auto it = cv.begin();
auto cit = std::as_const(cv).begin();

[[maybe_unused]] decltype(it) it_copy(it); // OK
[[maybe_unused]] decltype(cit) cit_copy(cit); // OK
// [[maybe_unused]] decltype(it) it_copy2(cit); // NOK by design
[[maybe_unused]] decltype(cit) cit_copy2(it); // NOK bug!
}

0 comments on commit db14f8e

Please sign in to comment.