Namespaces
Variants
Views
Actions

Talk:cpp/symbol index

From cppreference.com
< Talk:cpp
Revision as of 23:10, 29 July 2022 by Guyutongxue (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

You can poach MediaWiki:Cpp-search-list-cpp for the list of all standard library symbols, if you really want to do this. --Cubbi (talk) 06:29, 8 August 2016 (PDT)

Thank you! I cannot directly extract the information I want to display from this file, but I can use it as a checklist to see what is missing :-) -- Gemini67 (talk) 06:57, 8 August 2016 (PDT)

By the way, I'm curious how you'd tackle overloads that appear on different pages, such as single-argument std::move vs 3/4-argument std::move or the single-argument std::remove vs 2/3/4-argument std::remove. I see you already have std::move linking to the multi-argument version. --Cubbi (talk) 04:58, 9 August 2016 (PDT)

I think I'll do it as the search results are displayed: Two entries, with (utility) or (algorithm) added in parentheses. Gemini67 (talk) 10:17, 13 August 2016 (PDT)

Contents

[edit] make namespaces more noticable?

I didn't realize there's a lot more to see if I click on a namespace until I clicked on one. Perhaps they deserve some sort of an indicator that makes them stand out as much as the collapsed atomics. Maybe at least an icon like ▶? --Cubbi (talk) 08:02, 11 September 2016 (PDT)

Good point. I first tried to write 'namespace' before it, but the icon is better. Done. Gemini67 (talk) 04:12, 25 September 2016 (PDT)

[edit] printf and friends?

It was pointed out on SO that std::printf is missing from this index, and by the looks of it, the whole cpp/io/c is missing. --Cubbi (talk) 05:50, 7 August 2017 (PDT)

Yes, as the page states, symbols that are actually C functions, like the printf family, are left out on purpose. I suggest, these should be listed in a "C Symbols Index". Gemini67 (talk) 06:56, 23 August 2017 (PDT)
That's not right though. std::printf is a C++ symbol defined by the C++ standard library. --Cubbi (talk) 06:58, 23 August 2017 (PDT)
But it is not a separate implementation of this function, it is just the C function printf() imported into the C++ std namespace. At least when I look at the cstdio file I have at hand. I would prefer to have all these 'imported' functions in a separate index. But if a majority votes for adding them here, I'll do it. Gemini67 (talk) 07:17, 23 August 2017 (PDT)

[edit] Should we remove all symbols present in C from this page?

Some macros(which are not belonging to any namespace) and identifiers from <cfenv>, <clocale> and <cmath> are currently listed on this page. As c/symbol_index have been made now, should we get these symbols removed? (or import all symbols both present in C and C++ into this page?)

-- Fruderica (talk) 10:08, 17 May 2018 (PDT)

I still think all library symbols available in C++ should be here, including those defined through links to C standard, like std::printf, or defined independently but named identical to a C library symbol, like std::atomic_int or assert. It would be nice if all C names that are also imported into C++ (so, printf, but not thrd_create or printf_s) could be defined once in some special list and included in both lists by template magic.. It may be more work than necessary: after all, C++ standard itself gave up on doing that and now lists every name imported from C explicitly (std::printf is in cstdio.syn). --Cubbi (talk) 11:59, 17 May 2018 (PDT)

[edit] Is it better to list macros in a separated page?

I am importing symbols which are from C and available in C++ into the page now. However, listing macros would make the page very long, and macros are not in the namespace std. So is it better to list macros in a separated page like cpp/symbol index/macro? -- Fruderica (talk) 00:27, 2 July 2018 (PDT)

I suppose it's fair since they are not in namespace std (and each namespace seems to have its own page). Don't miss assert --Cubbi (talk) 11:02, 2 July 2018 (PDT)

[edit] Easy references from other pages

It would be very helpful if we could develop a plugin for doxygen that automatically generates links for all names that begin with std:: to the specific page on cppreference. Apparently this existed before, but got deprecated, because the author had to curate the list of name->url manually.

Now that there is a symbol list, would it be possible to also add https://en.cppreference.com/w/cpp/symbol_index/$SYMBOLNAME for every symbol as a redirect to that smybol's page? That would make it super easy for other resources to integrate cppreference!

Thanks,

Hannes 160.45.38.134 04:01, 6 July 2018 (PDT)

I've built a simple service https://cppref.cf that might come in handy. --Guyutongxue (talk) 00:10, 30 July 2022 (PDT)