Skip to main content

Timeline for Use `using` in C++ or avoid it?

Current License: CC BY-SA 4.0

13 events
when toggle format what by license comment
Mar 14, 2019 at 9:48 history edited BЈовић CC BY-SA 4.0
edited body
Mar 14, 2019 at 9:42 comment added Artur Wasn't "using C::B::s;" supposed to be "using B::C::s;" ?
May 22, 2013 at 21:20 history edited BЈовић CC BY-SA 3.0
added 1 characters in body
Aug 3, 2012 at 18:00 comment added Colen If you're a college student in your first day of "my first C++ class", it's yet another thing that can cause syntax errors that you don't understand. It's easy for us to figure out because we're experienced programmers, but when you're trying to learn the language, it's yet another thing to have to worry about that you don't need.
Aug 3, 2012 at 11:43 comment added Benjamin Bannier @Colen: These poor souls can use using std::cout and friends, but it's not like cout is already a horribly long name.
Jun 18, 2012 at 5:38 comment added Giorgio That's why I was suggesting it.
Jun 18, 2012 at 5:37 comment added BЈовић @Giorgio Yes, but that is something else. With typedef, you do not get type name clash.
Jun 17, 2012 at 9:16 comment added Giorgio Would something like typedef std::string sstring; be an alternative?
Mar 25, 2012 at 0:18 vote accept user541686
Mar 25, 2012 at 0:18 vote accept user541686
Mar 25, 2012 at 0:18
Mar 24, 2012 at 20:34 comment added Colen People want to get on with using iostreams, strings, and so on. They don't want to have to type std:: every single time they want to use a thing, or have to remember yet another piece of boilerplate to put before their code, which will cause less-than-helpful errors if they forget it. :(
Mar 24, 2012 at 13:19 comment added Jeffrey Sweeney +1 it's amazing how many tutorials and college courses just tell you to use the using keyword without a thorough explanation of why namespaces are used to begin with.
Mar 24, 2012 at 7:58 history answered BЈовић CC BY-SA 3.0