Coder Social home page Coder Social logo

p12tic / cppreference-doc Goto Github PK

View Code? Open in Web Editor NEW
414.0 414.0 104.0 1.47 MB

C++ standard library reference

Home Page: en.cppreference.com

License: GNU General Public License v3.0

Makefile 0.68% Python 16.22% XSLT 0.36% CSS 8.22% JavaScript 11.01% Shell 0.16% PHP 2.76% HTML 60.59%

cppreference-doc's People

Contributors

cpplearner avatar cubbimew avatar dependabot[bot] avatar giez avatar kapeli avatar lukis90 avatar mikepurvis avatar mmmike avatar mokibit avatar nanoant avatar p12tic avatar peterfeicht avatar pjboy avatar reinerh avatar sergey-krushch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cppreference-doc's Issues

QCH fonts are too large

When compared to the Qt documentation, cppreference appears to have really large fonts. And the problem is exacerbated with current Qt5 versions which lack QtWebKit, so one can't even scale down the main text: only the caption scales.

The fonts appear correct in the official QCH book release 20170409, and are already too large in the 20181028 release. And this problem remains with the releases made from this repo.

See the following screenshots for comparison between Qt docs and C++ docs.

QString docs @ Qt5 Assistant:
QString @ Qt5 Assistant

std::string docs @ Qt5 Assistant:
std::string docs @ Qt5 Assistant

Even if I open in Qt4 Assistant built with QtWebKit support, the fonts are too large, although the content is easier to scale (and formatting is less broken, but this is another issue, #47).

std::string docs @ Qt4 Assistant:
std::string docs @ Qt4 Assistant

C Index

<function name="towlower" link="c/string/wide/tolower"/>
<function name="towupper" link="c/string/wide/toupper"/>

should be:

<function name="towlower" link="c/string/wide/towlower"/>
<function name="towupper" link="c/string/wide/towupper"/>

Feature request: select language version

It's really nice that pages like https://en.cppreference.com/w/cpp/language/constexpr include information about many versions of the language! That said, if one happens to just be interested in a specific version of the language, then the inapplicable information can be a bit noisy and distracting. For example, quite often all I want to know is "how does feature X work in C++17?", not "what was the detailed evolution of feature X over the complete history of C++?".

So maybe a useful feature could be to have a button somewhere near the top of the page, that lets the user select a language version. The effect of selecting a language version would be that text inapplicable to that standard version would be omitted. For example, if you select C++17, then obsolete rules that only applied "(until C++14)" or "(until C++17)" would not be shown.

What do you think? :)

Under attack by Rust programmers!

As of August 1, 2023, there have been attacks on this site with posts saying Rust is the best and links changed to Rust's Wikipedia.
Once this has been corrected, it appears to have been fixed, but the number of attacks has increased since the beginning of this year, so I decided to report it and list it on the issue.

It seems docs give wrong output

When I search std::move from docs online, it gives me a piece of code

#include <iostream>
#include <utility>
#include <vector>
#include <string>

int main()
{
    std::string str = "Hello";
    std::vector<std::string> v;

    // uses the push_back(const T&) overload, which means 
    // we'll incur the cost of copying str
    v.push_back(str);
    std::cout << "After copy, str is \"" << str << "\"\n";

    // uses the rvalue reference push_back(T&&) overload, 
    // which means no strings will be copied; instead, the contents
    // of str will be moved into the vector.  This is less
    // expensive, but also means str might now be empty.
    v.push_back(std::move(str));
    std::cout << "After move, str is \"" << str << "\"\n";

    std::cout << "The contents of the vector are \"" << v[0]
                                         << "\", \"" << v[1] << "\"\n";

    // string move assignment operator is often implemented as swap,
    // in this case, the moved-from object is NOT empty
    std::string str2 = "Good-bye";
    std::cout << "Before move from str2, str2 = '" << str2 << "'\n";
    v[0] = std::move(str2);
    std::cout << "After move from str2, str2 = '" << str2 << "'\n";
}

The docs give the output

After copy, str is "Hello"
After move, str is ""
The contents of the vector are "Hello", "Hello"
Before move from str2, str2 = 'Good-bye'
After move from str2, str2 = 'Hello'

But when using the clang compiler which the website offers, the output is

After copy, str is "Hello"
After move, str is ""
The contents of the vector are "Hello", "Hello"
Before move from str2, str2 = 'Good-bye'
After move from str2, str2 = ''

So I am confused which one is the correct answer.

QCH file is missing the whole 'common/' folder

The QCH file/database is missing all the files from the common/ folder, only the en/ folder is packaged. This folder is quite important as it contains some Javascript, but also the CSS of the website and a bunch of UML diagram referenced in various pages.

I'm displaying the qch content in my own application (using my own Qt interface), and everything looks terrible as I can't retrieve the required common/ files from the qch file.

doxygen tag files miss many C++20 things

e.g. the concepts from std:: and std::ranges; all the view adaptors...

I could make PRs for this, but I have no clue how. Is there documentation somewhere on how to contribute these?

Wrong link

<class name="std::regex_error" link="cpp/regex_error">

Should be:

<class name="std::regex_error" link="cpp/regex/regex_error">

Anki 2.0 Deck creation

This is a follow-up to the post on the website:

Where would i start looking to implement a simple CSV file along these lines?

Anki renders the cards as HTML in the interface, so i have essentially spammed the
default card stylesheet with the cppreference stylesheet to keep the page formatting.
It seems that every section/linkable keyword correlates to an 'answer' or concept worth
remembering. The hardest part is of course generating questions. My idea (at least for
a first approximation) was to generate the card/question list from the section/keyword
list + context in tree. Imagine each section as a flashcard. for example:
Q: What is: Operator Overloading (C++ Language, Expressions)

In Windows NAN.html and nan.html repeat.

In Windows NAN.html and nan.html repeat.
In
html_book_20140827.zip\reference\en\c\numeric\math\
and
html_book_20140827.zip\reference\en\cpp\numeric\math
both have NAN.html and nan.html.It can't stay in windows.
In cppreference-doc-20140827.zip\cppreference-doc-20140827\reference\en.cppreference.com\w\c\numeric\math
and
cppreference-doc-20140827.zip\cppreference-doc-20140827\reference\en.cppreference.com\w\cpp\numeric\math
also have this question.

Not sure: : should forward_iterator_tag not also inherit from truct output_iterator_tag ?

Hello at all,
reading https://en.cppreference.com/w/cpp/iterator/iterator_tags,
i wonder, the inheritance structure of should forward_iterator_tag is correct herein.

Is the forward_iterator_tag not also inherit from sruct output_iterator_tag ?

it says
struct forward_iterator_tag : public input_iterator_tag {}; // (4)

Were do I find a decise manual howto properly write my own iterators for my own classes.
Yours,
Frank.Haferkorn

Request: add ability to hide contents from previous standards to non-logged-in users.

On the discussion page this was discussed and said that it is possible for logged-in users, but it is not production ready. T. Canens had written some notes about the shortcomings here.

On the main page: https://en.cppreference.com/w/ (but not on https://en.cppreference.com/w/cpp) there is standard revision option in the header, but it seems not to do anything (Firefox 122.)

It works on any other page than the main page. Marking this as closed.

C++ Index

(maybe)

<class name="std::err_c" link="cpp/error/err_c">

should be:

<class name="std::errc" link="cpp/error/errc">

Use https

I am embedding pages from cppreference in an iframe from a web app (the jupyter notebook), which fetches the resources from cppreference based on some tag file.

The problem is that when the connection to jupyter is https, the CORS setting disallow loading content from an insecure source. Would it be possible for cppreference to be served over https?

Possible output errors in utility/move

utility/move

The following results are generated from Apple Clang 7 on Mac OS X 10.11. And I believe the output of the last line would never be 'Hello', shown in the above page.

After copy, str is "Hello"
After move, str is ""
The contents of the vector are "Hello", "Hello"
Before move from str2, str2 = 'Good-bye'
After move from str2, str2 = **''**

Keyword lookup when using Clang's/OSX libc++ (w/fix)

When using QCH files together with Clang on OSX it does not find any keywords using F1. The reason for that is libc++ adds extra prefix to the namespace.

So std::basic_ifstream::is_open method is resolved and looked up in Qt Creator as std::__LIBCPP_ABI_VERSION::basic_ifstream::is_open.

A simple trivial workaround is to generate libc++ keyword version as a post-process step of QCH generation using following SQL (sqlite3) script:

 insert into IndexTable (Name, Identifier, NamespaceId, FileId, Anchor) select Name, replace(Identifier, 'std::', 'std::___LIBCPP_ABI_VERSION::'), NamespaceId, FileId, Anchor from IndexTable;

Or add this to some pre-process Python script.

DevHelp package in error

OS: Kubuntu 17.x x64
I've installed DevHelp through flatpak,
then I proceded to install the cppreference package:
sudo apt install cppreference-doc-en-html
then I start DevHelp, which finds as you can see, but it can't open it, because not existing files :/
immagine

(AND also I noticed that the package is old (20170409-1).

How to make it work?
It's possible to get an updated package?

Headers for C?

In this repo the headers for C++ are present. Is a similar effort available for the C headers (eg, string.h, etc) available? I notice those headers are described on cppreference so I was curious where I might find those. Thanks!

Is it an official project for cppreference.com?

Hello, maintainers.

According to README.md, this project is a source package of cppreference.com.

Since the cppreference.com is a Wiki website, there is an "Edit" option in the menu bar, which can let us edit the pages directly.

Therefore, I wonder:

  1. Is it an official project for cppreference.com?

  2. If we gonna edit the content of cppreference.com, where should we contribute to?

  3. What is the purpose of maintaining this project?

all the keywords point to the start page in the qch file

No sure if this is the place to report it, I apologize if so.
The qch file hosted at http://en.cppreference.com/w/Cppreference:Archives isn't working properly (February and March of 2014), May 2013 version is fine.

The QtCreator context search finds keywords but whatever it is found, the links are just pointing to the start page. The same happens in Qt Assistant.

I could generate a qch myself to testing, but I'm not sure if the script works on Windows.

Could you add new format(zim) of offline archive?

Could you add new format(zim) of offline archive?
You can use zimwriterfs to pack those html files.
I think it is a good idea.
Because we can read this doc in many devices(for example android) only 1 file(use kiwix or kiwix-serve).
And we can Full text search.
Also you can let kiwix help you build this doc.I think they will be happy to help.
zimwriterfs is a console tool to create ZIM (http://www.openzim.org)
files from a localy stored directory containing a "self-sufficient"
HTML content (with pictures, javascript, stylesheets). The result will
contain all the files of the local directory compressed and merged in
the ZIM file. Nothing more, nothing less. The generated file can be
open with a ZIM reader, Kiwix (http://www.kiwix.org) for example, but
you have other one (http://openzim.org/wiki/ZIM_Readers).
https://sourceforge.net/p/kiwix/other/ci/master/tree/zimwriterfs/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.