Hi,
consider a function taking a unsigned for example:
I know explicit decleration, which unfortunately only works for ctors using one argument.Code:void func(unsigned _u) {} int main() { func(-200); // gives garbage inside func }
Is there some else possiblitity besides configuring the compiler with something like "treat warnings as errors"?
And what is the reason explicit is not defined for ctors with more than one argument or other functions?
Thank You!