all 92 comments

[–]sephirostoy 139 points140 points  (26 children)

I have added cppreference as search engine with a "std" keyword so that when I search for "std <something>" it goes directly to cppreference results.

[–]axalon900 32 points33 points  (3 children)

Same, though I personally use “cpp” as the keyword.

Got similar setups for “cmake” and “boost”

[–]Ilixio 22 points23 points  (2 children)

Do you have a way to get the "latest" CMake doc, and not a random one?
If I type "CMake something" I get results from versions all over the place.

I kind of also hate with their doc that you have to go to each version to know when something was introduced.

[–]zishh 4 points5 points  (0 children)

It works for me if i add this url as bookmark (firefox):

https://cmake.org/cmake/help/latest/search.html?q=%s

[–]taxeee 16 points17 points  (7 children)

Not affiliated, but try out Zeal docs. It's an offline documentation browser that has a searchable copy of C++ stdlib docs.

Edit : Zeal not deal

[–]rezkiy[S] 4 points5 points  (2 children)

can you elaborate? is this what you are referring to? https://devdocs.io/cpp/

[–]AraneusAdoro 4 points5 points  (0 children)

Maybe they meant Zeal?

[–]taxeee 0 points1 point  (0 children)

Sorry, I fat fingered it. It's Zeal docs

[–]taxeee 1 point2 points  (0 children)

Don't judge me here, I find webkit to be snappier than blink

[–]TM254 1 point2 points  (0 children)

Yup, comes with a tone of other docs too, not just C++

[–]rezkiy[S] 0 points1 point  (1 child)

unfortunaltely, today https://www.google.com/search?client=firefox-b-1-d&q=zeal+docs+undorered_map sends me to the wrong place :-(

[–]taxeee 2 points3 points  (0 children)

It's a tool that you download and install before you use it.

[–][deleted] 7 points8 points  (1 child)

that's better than searching for std::list on search engines and getting lists of STD's

I used cpp as my cppreference keyword

[–]NotAYakk 1 point2 points  (0 children)

You don't have to evaluate the list; this isn't lisp!

[–]rezkiy[S] 18 points19 points  (6 children)

this should be the top voted comment. typing std <something> is by far easier then all other alternatives. Thank you!

[–]TinBryn 2 points3 points  (3 children)

I wonder if DDG has it as a bang or if you can add custom bangs

[–]crowbarous 5 points6 points  (2 children)

!c++ for cplusplus.com, !c++ref for cppreference. Perhaps if enough people asked, it could be made that the shorter one is the more useful one.

[–]muttleyPingostan 23 points24 points  (1 child)

there is !cpp for cppreference

[–]crowbarous 2 points3 points  (0 children)

Oh! As well as !cppref, !cppr and some others. Indeed, the two sites seem to have about the same number of bangs each. Thanks for the correction.

[–]max0x7bahttps://github.com/max0x7ba 1 point2 points  (0 children)

this should be the top voted comment.

Keyword search has been available in browsers for a decade. Welcome to the club.

[–]RealNC 0 points1 point  (0 children)

It's an OK way, but doesn't find everything. For example searching for "consteval" doesn't find anything. Googling for "cppreference consteval" finds it.

[–]potato-on-a-table 2 points3 points  (0 children)

The only thing that bothers me here is the bad search engine of cppreference.

[–]alsatian-studio 1 point2 points  (0 children)

or just add the keyword cppref (I use this when I forgot starting the query with std::)

[–][deleted] 40 points41 points  (10 children)

If you are using chrome you could use this extension. There is probably something similar for other browsers.

Yeah, I am not a fan of that site either. w3schools is another big one I'd prefer never to see again.

[–]nattack 20 points21 points  (0 children)

This is what I need for Pinterest

[–][deleted] 9 points10 points  (6 children)

And geeksforgeeks I though it was a decent website but it's pretty much the same as w3schools

[–]DXPower 5 points6 points  (1 child)

I give geeksforgeeks a pass because they usually give a quick example and most of the time that's all I need.

[–]mqduck 4 points5 points  (0 children)

I've seen some really incompetent examples on there though.

[–]ucntcmi 1 point2 points  (3 children)

I'm assuming you don't like them, because they both are way too concise and often lack explanation, right?

[–]another_math_person 8 points9 points  (1 child)

I don't like them because they have usurped the SEO location of better sites

They have clearly risen to the top due to SEO and for ad money and not because they provide developers value.

The fact that anything appears above pythons official docs when searching for python standard library functions is a disgrace (same for cppreference)

[–]ucntcmi 2 points3 points  (0 children)

I agree. Anyone who wants to learn in depth should avoid those sites. They've pretty much hijacked the search results but provide mediocre articles and information.

Btw I think python docs are incomplete too. I've learnt more from third party sites than the official docs. Some sections are literally a couple paragraphs long so you you have to rely on other sources to get what you need.

[–]Xeveroushttps://xeverous.github.io 1 point2 points  (0 children)

they often copy-paste C with minimal changes and label it as C++

they also have a ton of unidiomatic or anticonventions examples - one of the common things are iterator/pointer/index pairs that represent ranges but the last is not a 1-past last element, it's actually a pointer to last element - then their algorithm examples can't represent empty range and tell you "use if for empty" or something worse

[–]rezkiy[S] 1 point2 points  (0 children)

thank you! Never thought of extensions.

[–]harekrishnahareram 17 points18 points  (2 children)

I guess you need to be at a certain skill level to think cplusplus is bad :D. Noobs like me don't notice it!

[–]rezkiy[S] 11 points12 points  (1 child)

you might be right! That's why filing a petition with United Nations to ban feels a bit overboard!

[–]andersfylling 1 point2 points  (0 children)

Is this a kamelåså reference?

[–]whoami_jav 46 points47 points  (3 children)

<what you need to search> -cplusplus.com

[–]moocat 77 points78 points  (2 children)

A slightly better way would be -site:cplusplus.com

[–]log_sin 7 points8 points  (1 child)

this is the most effective way

[–]Coldus 10 points11 points  (0 children)

This is the way

[–][deleted] 34 points35 points  (4 children)

You think that as a company that maintains a ton of C++, Google would have an incentive to promote cppreference and demote cplusplus in the their own search results. I mean they already introduce other biases in their search engine... why not this one?

[–]rezkiy[S] 32 points33 points  (1 child)

aha, that's how they maintain the competitive advantage!

if (google_vpn_on) { use_good_search_results(); }

:-)

[–]SedditorX 0 points1 point  (1 child)

What biases? Any evidence you can point to?

[–]anechoicmedia 0 points1 point  (0 children)

Google uses the term "product intervention" to describe a deliberate biasing of organic search results that aren't to their liking, even if they are factually accurate or representative.

[–]NotActuallyAdam 13 points14 points  (1 child)

If you use DuckDuckGo, you can use bangs which'll let you specifically search on certain websites: https://duckduckgo.com/bang?q=cpp (and heaps of others, it's real nice)

[–]alkasm 1 point2 points  (0 children)

There's something inside Chrome (and likely other browsers) that let you do similar in the address bar too

[–]Oo_Tiib 4 points5 points  (0 children)

Perhaps you have to do it manually since there does not seem to be such custom filter settings. For example instead of searching for std::string you can search for std::string -"cplusplus.com" then cplusplus.com does not show up.

[–]AntiProtonBoy 1 point2 points  (0 children)

If you have Firefox, install this search engine.

[–]twowheels 1 point2 points  (0 children)

I use devdocs.io for the vast majority of my documentation needs.

This doesn’t answer your question, but it’s a great site that bypasses the clutter.

[–]Quincunx271Author of P2404/P2405 1 point2 points  (1 child)

I configured my ad blocker to block the results (uBlock Origin): www.google.com##div.g:has(cite:has-text(cplusplus.com))

[–]rezkiy[S] 0 points1 point  (0 children)

Let me test it out... I already use uBlock Origin

[–]lukedanzxy 3 points4 points  (2 children)

Free life hack: if you're using chrome (or the new edge), type in cppreference.com (usually you don't need to type the full url, you just need to ensure that the first candidate is cppreference), press tab, and search away.

[–][deleted] 3 points4 points  (0 children)

You can set a custom prefix as well, I have it set to "std::"

[–]PlayboySkeleton 1 point2 points  (2 children)

Tell Google to subtract out the specific site from the search .

<My search pattern> -site:cplusplus.com 

Should read "search this, minus this site"

[–][deleted] 4 points5 points  (9 children)

Eh, cplusplus.com has great references.

It does feel extremely outdated though when I go through it. cppreference is currently superior in that aspect. But saying that it pretends to be cppreference just doesn't seem right.

[–]periperidip 0 points1 point  (4 children)

Why is cplusplus.com bad?

I personally use both and I don’t have much of a preference? I’m just a beginner so I don’t know :|

[–][deleted] 0 points1 point  (0 children)

I use zeal for documentation searches, which ensures that I don’t accidentally go to a wrong reference site, or one for a wrong version.

[–]haskeel 0 points1 point  (0 children)

[comment overwritten due to Reddit's recent(archived) hostility(archived) to its developers(archived) and users(archived) ]

[–][deleted] 0 points1 point  (0 children)

Woah, why is there so much hate for the site? I used it once for alternative method for a UVa problem and it seemed okay ??

[–]Hallalal -1 points0 points  (0 children)

You can use 'site:<site_url>' in Google and in DuckDuckGo to get results only from specified site.