
I just write a simple test of trim: #include <string> #include <boost/algorithm/string.hpp> int main(){ using namespace std; string temp = " just test "; boost::trim(temp); return 0; } but it couldn't pass the compile, error was: [C++ Error] trim.hpp(233): E2285 Could not find a match for 'detail::trim_end(undefined,undefined,detail::is_classifiedF)' [C++ Error] trim.hpp(126): E2285 Could not find a match for 'detail::trim_begin(undefined,undefined,detail::is_classifiedF)' but when I move the "using namespace std;" out of main function: #include <string> #include <boost/algorithm/string.hpp> using namespace std; int main(){ string temp = " just test "; boost::trim(temp); return 0; } I don't know why?