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

Compilation error when applying std::views::transform to std::array #48855

Closed
Craffael mannequin opened this issue Mar 10, 2021 · 2 comments
Closed

Compilation error when applying std::views::transform to std::array #48855

Craffael mannequin opened this issue Mar 10, 2021 · 2 comments
Labels
bugzilla Issues migrated from bugzilla c++20 concepts C++20 concepts duplicate Resolved as duplicate

Comments

@Craffael
Copy link
Mannequin

Craffael mannequin commented Mar 10, 2021

Bugzilla Link 49511
Version trunk
OS Linux
CC @craffael,@zygoloid

Extended Description

Unfortunately the following code fails to compile (using the STL of g++-10.2):

==== begin test program ====
#include
#include

std::array<int,2> points_;

auto foo() {
auto v = std::views::transform([](int p) {return p;});
return points_ | v;
}

int main() {
auto z = foo();
}
==== end test program ====

The same code compiles without problems using g++-10.2 so I think it should be valid code...

See also https://godbolt.org/z/e1ncvW

@Craffael
Copy link
Mannequin Author

Craffael mannequin commented Mar 10, 2021

Related: #46853

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@ldionne ldionne added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Dec 14, 2021
@ldionne
Copy link
Member

ldionne commented Dec 14, 2021

Clang on Godbolt uses libstdc++ by default, you need to pass -stdlib=libc++: https://godbolt.org/z/PMeebseeE.

Also note that our ranges implementation is currently incomplete, so you will find missing parts. If you find something that we do implement but we have a bug in it, please report it. If we are missing something, please be patient -- we are tracking the missing parts and will eventually get to it.

@ldionne ldionne closed this as completed Dec 14, 2021
@Quuxplusone Quuxplusone added concepts C++20 concepts duplicate Resolved as duplicate and removed libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. labels Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++20 concepts C++20 concepts duplicate Resolved as duplicate
Projects
Status: No status
Development

No branches or pull requests

2 participants