Why does this compile? The 2nd par should be a bool not a std::string. IMO the compiler should generate a warning (actually even an error) about it.
#include <string> struct TS {}; bool func(const TS& S, const bool f, const std::string s = "") { //... return f; } int main() { TS S; func(S, "X"); // <-- HERE return 0; } -- Thx Uenal _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org https://lists.gnu.org/mailman/listinfo/help-gplusplus