Код: Выделить всё
template
auto foo (int line=std::source_location::current().line())
{
std::println ("Line {} line {}", Line, line);
}
Код: Выделить всё
auto main() -> int { foo(); }
Почему это не так?
Демо>
Подробнее здесь: https://stackoverflow.com/questions/798 ... f-a-functi
Мобильная версия