Open bluetarpmedia opened 4 months ago
Describe the bug CTAD does not appear to work with cpp2::in when using a parameter in a statement scope.
cpp2::in
To Reproduce Run cppfront on this code (which is similar to #1002):
main: () -> int = { m : std::mutex = (); (_: std::unique_lock = (m)) { } _ = m.native_handle(); // Workaround for bug #968 return 0; }
After compiling with clang it results in an error:
main.cpp2:5:32: error: use of class template 'std::unique_lock' requires template arguments 5 | [[maybe_unused]] cpp2::in<std::unique_lock> unnamed_param_1{m}; | ^
Repro on Godbolt
Describe the bug CTAD does not appear to work with
cpp2::in
when using a parameter in a statement scope.To Reproduce Run cppfront on this code (which is similar to #1002):
After compiling with clang it results in an error:
Repro on Godbolt