Closed
Description
Title: Empty template argument list is ill-formed.
Description:
Despite the grammar allowing it:
//G template-id:
//G identifier '<' template-argument-list? '>'
Minimal reproducer (https://cpp2.godbolt.org/z/TvMhbhcTq):
main: () = { std::plus<>(); }
Commands:
cppfront -clean-cpp1 main.cpp2
clang++17 -std=c++2b -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -I . main.cpp
Expected result:
A well-formed program.
Actual result and error:
Output.
main.cpp2...
main.cpp2(1,12): error: ill-formed initializer (at '{')
main.cpp2(1,1): error: unexpected text at end of Cpp2 code section (at 'main')
main.cpp2(1,0): error: parse failed for section starting here