Timeline for What's the problem with "using namespace std;"?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 17, 2022 at 15:53 | comment | added | wheredidthatnamecomefrom | @convert Any library could in theory clash with std now or in the future. As mentioned in other answers std contains many common names like list and error. Boost just highlights the issue as it is affected now. Invoking using undoes what namespaces were supposed to fix. Be careful with it. | |
Feb 9, 2022 at 21:21 | comment | added | convert | I personaly would never use boost, as it´s the worst C++ API I ever seen. Which problems I could still have then if using namespace std? | |
Apr 10, 2018 at 13:45 | comment | added | Ferruccio |
I did that once and learned a lesson the hard way. Now I never use using outside of a function definition and rarely use using namespace at all.
|
|
Feb 24, 2016 at 16:40 | comment | added | einpoklum | This. Boost and std have a lot of overlap - especially since C++11. | |
Oct 11, 2015 at 10:33 | history | edited | Peter Mortensen | CC BY-SA 3.0 |
Added some context, etc.
|
Oct 28, 2010 at 17:37 | history | answered | David Thornley | CC BY-SA 2.5 |