41

Every C++11 code is also a C++ code. Should I always use tag when I'm using ? How are they intended to be used?

10
  • 40
    Yes. Especially if you want more people to see it. Lots of people (like me) only follow the master tag and not the sub-tags. If you want their attention, you better have the master tag.
    – Mysticial
    Commented Oct 21, 2014 at 1:20
  • 4
    If you're asking a question that specifically uses/requires C++11-only features then tag as such. Otherwise it is just noise. Commented Oct 21, 2014 at 9:39
  • 15
    Have hierarchical tags ever been proposed? If c++11 inherited from c++, this issue could be solved. Having to redundantly specify the topic goes against the 5 tag limit.
    – musiKk
    Commented Oct 21, 2014 at 10:04
  • 8
    @musiKk Yes, plenty of times. Commented Oct 21, 2014 at 19:42
  • Statistical evaluation of the used tags should give already kind of a tag similarity measure. One could even construct a hierachy from that. This may not result in a strict hierachy but may be used for suggesting additional tags and for tag browsing and search (i.e. search a set of similar/related tags). I just wonder why are people only following C++ tag and not also C++11 tag? They are extremely similar and relevant for each other. Most of the time there is not much sense in following only one of them. Commented Oct 22, 2014 at 8:11
  • IMHO C++11 should be merged with C++. It doesn't make sense to use it now as it's already a blessed standard for awhile.
    – piokuc
    Commented Oct 22, 2014 at 12:44
  • 2
    The official stance: "The only questions that should use the c#-4.0 tag, in my opinion, are those questions which are specifically asking for detail about features that were added in 4.0."
    – Braiam
    Commented Oct 22, 2014 at 12:57
  • @Lundin Oh my god, have you even read both questions? Or did you just see both mention C++11 tags and assumed their the same/similar? Reading comprehension, man.
    – NPS
    Commented Oct 23, 2014 at 14:40
  • @NPS Indeed I did, they are 100% equivalent. This would be why you need 5 people to close a question. The real question is, did you read them? And the next question, did you search meta before asking your own question?
    – Lundin
    Commented Oct 24, 2014 at 6:13
  • Absolutely not! The other question asks whether and when you should use a C++11 tag, my question asks if C++11 tag always implies C++ 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...
    – NPS
    Commented Oct 24, 2014 at 12:28

3 Answers 3

44

Yes. You should add both tags. Why??

  1. Your question is primarily on C++. So, I would add C++ tag first.
  2. Next, I would ask myself, what more information can I give about my question. Bang! I am using C++ 11. Add that as well.
  3. 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).

6
  • 54
    One 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.
    – wm1sr
    Commented 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
    – Erbureth
    Commented Oct 21, 2014 at 9:53
  • i smell a feature request from @wm1sr i like it!
    – deW1
    Commented Oct 21, 2014 at 20:57
  • 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 H
    Commented 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 H
    Commented Oct 22, 2014 at 4:36
10

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.

3

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 and skip . 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.

Not the answer you're looking for? Browse other questions tagged .