We’re rewarding the question askers & reputations are being recalculated! Read more.
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 507

For many programming languages, namespace is a context for their identifiers. Use this tag to indicate concerns about appropriate usage of namespaces.

3
votes
SO your issue is that this is not as readable: for(std::vector<std::string>::size_type i = 0; i < svec.size(); i++) std::cout << svec[i] + " " << svec[i].size() << "\n"; Well I disagree with t …
answered Mar 8 '17 by Martin York
25
votes
I would use some template logic to achieve the affect in a more scalable way: #include <iostream> #include <sstream> #include <string> #include <algorithm> // This is the type that will hold all the …
answered Aug 4 '12 by Martin York
3
votes
I don't see the point in trying to use using (even in this protected situation). // 26 letters using std::runtime_error; // later (saved 5 characters (so you need to use it 6 times to save typing)). …
answered Nov 7 '15 by Martin York
3
votes
LinkedList Header Don't use identifiers with a leading underscore: #ifndef _NEW_LL_H #define _NEW_LL_H These two are not valid (reserved for the implementation). Header inclusion order: #include …
answered Feb 13 '17 by Martin York
15
votes
I don't think there is anything inherently wrong with nested namespaces. I also disagree that it is rare. It is just not exposed directly. std::tr1 CompanyName::ProductName CompanyName::ProductName …
answered Aug 16 '11 by Martin York
8
votes
Overall Not sure I agree with the use of std::unique_ptr inside of Node. BUT I can't really argue against it. So I am not going to push the point. You need to concentrate on your const correctness. …
answered Mar 21 by Martin York
0
votes
A good start. But you need to templatize your functions and the type_map by the enum to make the design extensible. That is a simple change so I will not focus on that. About the only other thing is …
answered Aug 4 '12 by Martin York