This will be about as bad as it gets:
struct badParam { template <typename T> badParam(T t) { } }; namespace last_resort { void foo(badParam, int dummy = 0, ...) { std::cout << "last_resort::foo" << std::endl; } }
You have a custom transform, a default option, and an unused ellipse.
[edit]
An insignificant option to save T
I moved the user transformation to a dummy file parameter:
struct badParam { badParam() { } operator int() { return 42; } }; namespace last_resort { template <typename T> void foo(T t, int dummy = badParam(), ...) { std::cout << "last_resort::foo" << std::endl; } }
source share