Giter Site home page Giter Site logo

cpp_from_1998_to_2020's People

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

cpp_from_1998_to_2020's Issues

What is the difference between flexible array and varying array?

I'm not sure I understand the text below:

  1. Support of varying array array. In C99, the last member of a structure can be a flexible array. In C++ it's possible as well.
  2. In C99, but not in C++, there is a flexible arrays. That arrays with a size specified via a non-const variable. In C99, to pass such arguments to a function, use the notation void g(int pp[*], int k){}.

What is the difference between flexible array and varying array?

In C++ there is open array:

void foo(int arr[], size_t arrSize)
{
}

From other side variable array in the documentation is described as flexible array here: https://wiki.sei.cmu.edu/confluence/display/c/DCL38-C.+Use+the+correct+syntax+when+declaring+a+flexible+array+member

PDF file generator does not support formula

It seems the PDF generator does not support formula. It does not convert $[-2^{n-1}, 2^{n-1}-1] into image:

Following is a screenshot of the PDF file:
image

Following is how GitHub interprets the formula:
image

C++ is the fastest general-purpose programming language in the world

In the Introduction there is a statement:

C++ is complex, but currently, it's the fastest (in terms of execution speed in CPU) high-level, general-purpose programming language in the world.

You need a prove here. Otherwise would be better to reword it into "C++ is one of the most fastest ...."

Non-actual information regardng RValue life extension

In the For People New to C++ there is following text:

you can capture returned temporary objects from a function by constant reference to reduce the number of copy constructors

That makes sense for C++03 and maybe C++11. In case of C++14 (or better) it is possible to return value even if copy and more constructors are explicitly deleted. I mean in this case it makes no sense to extend the life of the RValue.

Consider licensing the notes.

As this is your work and you have reserved all rights for it, you can anything you want with them and rightfully so. However as these are public and the note states that contributions are welcome, it seems that at least one of the goals is to benefit the "greater C++ community".

Purpose of this issue is to ask you to consider different licensing options and how they could align with your goals for the note. As unlicensed work there are some obstacles to use it in some contexts. It also could discourage contributing to it.

If you decide to use some license, with assumption that one of the goals is to benefit C++ community, I would advocate to use some form of copyleft license such as GNU Free Documentation License or Creative Commons Attribution-ShareAlike.

I find great potential value in this technical note to C++ community, as C++ has been missing freely available book-like documentation that goes over the important parts. Thanks for putting effort in writing this and thanks for the editors for their effort in it.

[Benchmark] 4. C/C++ benchmark code is not fair

The C++ code of the benchmark in the "[Why learn C++ if I know Python (Toy Example)" is not fair. Because code operate on local variables which do not have any aliases and a is a regular C-array, C++ compiler can remove for() loop completely and just set s into some compile time value.

Please avoid use of "C/C++"; C and C++ are distinct languages

There is no language "C/C++". The continued use of such a term confuses people and propagates the misconception that there is. C and C++ are different languages with different ISO standards and different committees.

If you mean "C or C++", say that. If you mean "C and C++", say that. If you mean something else, please clarify appropriately.

A "technical note" on C++98 to C++20 should not contain such an incorrect term.

Extra parentheses inside the decltype expression

I'm not sure if the following is right:

int x;
const int *p;
decltype(x) x1;     // x1: int
decltype(ptr) p1;   // p1: int*
decltype((ptr)) p2; // p1: const int*

Extra parentheses are used to preserve const property for the type of expression.

Tried to compile that code and it seems decltype(ptr) p1 is equivalent to const int *p, so you cannot modify the value pointed by pointer. And decltype((ptr)) p2 is an equivalent to const int * &p.

BTW, there is a typo. There is no ptr identifier. Do you mean p ?

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.