-13

I often have to write in comments C++ Standard Library which is long for comments. Is there a standard abbreviation for it, since std is not C++ Standard Library, it is a namespace.

Do we have some tag for C++ Standard Library questions? For example, when I want to ask questions to be solved with C++ Standard Library, not with all std which includes, for example, 'ranges'?

23
  • 3
    Isn't it stl?
    – TylerH
    Commented Feb 20 at 20:58
  • 1
    @TylerH, absolutely not. Please see the What's the difference between "STL" and "C++ Standard Library"? Commented Feb 20 at 21:12
  • 4
    The C++ standard library is part of C++. If you want something solved with it then tag... C++? Commented Feb 20 at 21:13
  • 2
    @DamirTenishev So then the std tag looks like it is the tag to use for that. As the tag says, "for the library and its namespace".
    – TylerH
    Commented Feb 20 at 21:14
  • We also have tags for some specific parts of the library, such as std-ranges that applies to your specific example here. Commented Feb 20 at 21:15
  • 1
    We have [stl] and [std]; I assume one is correct.
    – Thom A
    Commented Feb 20 at 21:16
  • @StoryTeller-UnslanderMonica, it helps, thank you. How can I stress in the question and its tag that I want to limit the solution with C++ standard library? People start using 'ranges' and other stuff which belongs to C++ tag, but doesn't belong to C++ Standard Library Commented Feb 20 at 21:30
  • @TylerH, is doesn't work, since std tag covers std namespace which includes lots of things like 'ranges' and so on, which are not part of C++ Standard Library. Commented Feb 20 at 21:31
  • @StoryTeller-UnslanderMonica, 'std-ranges' is exactly what I want to exclude, see my original question (not with all std which includes, for example, 'ranges'). Commented Feb 20 at 21:32
  • 1
    @ThomA, stl is about library that was written back in 1990th and need to be installed separately. People often confuse STL with C++ Standard Library with borrowed many ideas from STL, but which is not STL. The std doesn't work by the reasons I mentioned in the previous comments. Commented Feb 20 at 21:33
  • 1
    Why do we need a specific tag that excludes std-ranges?
    – Kevin B
    Commented Feb 20 at 21:34
  • 2
    So you want a standard library defined by your definitions, not the standard's? There's no tag for that, nor should there be.
    – Thom A
    Commented Feb 20 at 21:34
  • 1
    @KevinB, because standard library doesn't include ranges and we don't have tag for it. We have tags for: stl - absolutely different library, std - namespace with includes ranges and many other stuff; and we have nothing for C++ Standard Library, Commented Feb 20 at 21:38
  • 5
    "because standard library doesn't include ranges" - What!? It very much includes ranges. It includes them since C++20. The fact they are in a nested namespace does not make them less a part of the standard library. Commented Feb 20 at 22:25
  • 4
    What's so special about C and C++, anyway, that we would want a tag for their standard libraries, but not for the standard library of any other programming language? Commented Feb 21 at 11:07

1 Answer 1

10

Based on the clarification you've provided, your request is illogical. Tags are inclusive, not exclusive. A tag for means "this question is about the Standard Library and/or its namespace". It does not mean "this question is about nothing but the Standard Library".

If you want to ask a question about the Standard Library, but are specifically looking to avoid the ranges feature within the Standard Library, use the tag and simply explain in your question that you want to avoid that feature.

6
  • So, you are saying that I should tag question with std and then in my question list all components of std which I don't want to use in the solution which are parts of std namespace? Like, please don't use: std::forward_list, std::ranges,std::vector<bool>, std::unordered_set, std::experimental::lexicographical_compare_3way, etc., etc.? What is the way to create a correct question? Commented Feb 20 at 21:45
  • @DamirTenishev Yes, if you really need to use some part of std but not others. Depending on your criteria, it may be easier to simply list in the question which parts you can use. Note that, in such unusual circumstances, you will probably get requests for clarification as to why you can't use so many standard parts of the relevant programming language, because that's akin to being given a hammer and told "now you can only use this hammer on X type of nails, not the other 25 types of nails out there" (AKA a silly, nonsense requirement).
    – TylerH
    Commented Feb 20 at 22:07
  • This will end up with people wasting lot of time and being angry because the initial question didn't state that std::unordered_set mustn't be used and this could come with any part of the answer. Well, let's see in action. Commented Feb 20 at 22:22
  • 6
    @DamirTenishev Why wouldn't the initial question state that? My recommendation is literally to state that, if it's a requirement. All questions should state all of their requirements upfront. If that's too much for you to fit into a question, maybe Stack Overflow is not the right place to get help; you might consider hiring a C++ consultant, instead. Bear in mind that questions on Stack Overflow should be specific and practical questions. "How do I import only 40% of the C++ standard library" (for example) does not sound very practical.
    – TylerH
    Commented Feb 20 at 22:24
  • ... or useful to other people.
    – Gimby
    Commented Feb 21 at 16:06
  • And it's a <air_quotes><sarcasm>solved problem</sarcasm></air_quotes>. Commented Feb 22 at 1:05

You must log in to answer this question.

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