https://bugs.llvm.org/show_bug.cgi?id=44047

            Bug ID: 44047
           Summary: [C++20] lambda expression in unevaluated context
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Keywords: compile-fail, missing-feature
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: unassignedclangb...@nondot.org
          Reporter: tras...@gmail.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

https://godbolt.org/z/u4EaXs

#include <memory>
#include <stdio.h>

void test(const char* file)
{
    auto f = std::unique_ptr<FILE, decltype([](FILE* f){ return fclose(f);
})>(fopen(file, "r"));
}


$ clang -Wall -W -std=c++2a -Os
error: lambda expression in an unevaluated operand

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to