Code: Select all
#include
template
void f(std::optional);
int main() {
f(1); // (1)
f({}); // (2)
}
(2) wird jedoch kompiliert und das Standardvorlagenargument wird verwendet. Warum?
Code: Select all
#include
template
void f(std::optional);
int main() {
f(1); // (1)
f({}); // (2)
}