4 ms·
I don't like it, clarity is better in C++. Things are complicated enough as it is.
by riskneutral 5y ago
I don't like it, clarity is better in C++. Things are complicated enough as it is.
- kragen 5y agoHow about `using std::find_if`?
- dataflow 5y agoUnqualified calls change the behavior. You end up doing ADL instead of a normal lookup and could potentially end up calling a different function than the one you intended entirely. Sometimes that's intentional (as with swap), but often it's a bug.
- sillysaurusx 5y agoI've been a C++ dev for longer than I care to admit. The idea that you could call the wrong function after putting "using std::string" at the top of your .cpp file doesn't reflect my experience. You might have a point if people are putting that in header files. But even in header files, "using std::string" is often a standard thing to do in e.g. game engines. It's far easier to change out your string implementation if you're writing "string" instead of "std::string".
- dataflow 5y ago> using std::string The question was about find_if, which is a function, not string.