Repository navigation
error when parsing valid C++23 code that uses class template argument deduction (CTAD) for std::function from a lambda expression. #293
zaides-blackduck
started this conversation in
Issue Triage - Compilation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue Summary
when parsing valid C++23 code that uses class template argument deduction (CTAD) for std::function from a lambda expression. Issue reproducible on EDG-7.0 with GNU
Reproducing Source Code
`#include
#include
#include
struct Bar
{
std::string value;
};
struct Foo
{
Bar pickName() const { return Bar{"x"}; }
};
template
Bar invokeViaFunction(const std::shared_ptr& item)
{
constexpr auto exampleFn = [](const std::shared_ptr& ptr) -> Bar
{
return ptr->pickName();
};
}
int main()
{
auto item = std::make_shared();
Bar result = invokeViaFunction(item);
return static_cast(result.value.size());
}`
Command-line Options
edgcpfe --g++ --gnu_version 150100 --c++23
Type of Issue
[Front End] This code SHOULD compile with these options.
Additional Details
No response
Reproducing (Standard) Configuration(s)
No response
Reproducing (Non-standard) Configuration
No response
I acknowledge that:
LICENSE.txtfile in my.zipor.tar.gzupload. If I included aLICENSE.txtfile, any tests created using the reproducing source code will be governed by the terms of the license I provided instead.All reactions