Every C++11 code is also a C++ code. Should I always use c++ tag when I'm using c++11? How are they intended to be used?
3 Answers
Yes. You should add both tags. Why??
- Your question is primarily on C++. So, I would add C++ tag first.
- Next, I would ask myself, what more information can I give about my question. Bang! I am using C++ 11. Add that as well.
- If you are using specific features and constructs, please add them too. The more information you give, the better answer you will get.
I ran into a similar kind of question the other day. A particular feature of Java was deprecated in Java-6. The OP was actually using Java 7. If the OP hadn't mentioned which version of Java he was using, it would have been a problem to answer his question properly (many would have answered it in Java 5/6 or Java-8).
-
54One thing that would make our lives easier is tag inheritance. For example: If you add java-6 to your question, automatically this would fit to java as well.– wm1srCommented Oct 21, 2014 at 9:33
-
@wm1sr what if the question is exclusive only to java-6? Wouldn't adding java to everything make it useless then? Commented Oct 21, 2014 at 9:50
-
10@AndyRefuerzo It would make the question visible to users following only
java
tag– ErburethCommented Oct 21, 2014 at 9:53 -
-
I might be misunderstanding something with the example - if a feature was deprecated in Java 6, wouldn't it not exist in Java 7 either, so answers in Java 6 wouldn't be using that feature to begin with and be alright?– Damien HCommented Oct 22, 2014 at 4:28
-
@TheLostMind Ah, so the fact that feature X was deprecated wasn't the problem, it was the version difference. The way it was written seemed to put the emphasis on the former, rather than the latter, and I couldn't work out what the issue was.– Damien HCommented Oct 22, 2014 at 4:36
Yes.
Some folks follow the C++ tag, but not the version-specific ones. They assume (as I do) that any question that has a version-specific C++ tag will also have the C++ tag. If you don't include the C++ tag, these folks may not see your question.
This pattern is also true of other language tags, like C#. The main language tag is always included, in addition to the version-specific one.
Usually yes.
There are some extreme corner cases. For example, where you have 4 meaningful additional tags, and your problem is narrowly applicable to C++11, you might use c++11 and skip c++. I have also seen questions about particularly narrow standard issues that might be C++11 only, and leaving C++ out might be appropriate there.
However, when using a C++ tag, it is almost always a good idea to include at least one C++ version tag, as what form the answer takes can vary based on the version of the language.
At this point, if you ask C++ answers may assume C++11, but not C++14. Or they may answer C++14 with a description of how to implement it in C++11 (as the C++14 version is cleaner). A few may assume C++98/03.
C++11
tags and assumed their the same/similar? Reading comprehension, man.C++11
tag, my question asks ifC++11
tag always impliesC++
tag. They're completely different questions. It's like one question asked "Which weapon is more effective: knife or gun?" and the other one asked: "Is shooting people a bad thing?"... You'd have to braindead not to see that...