set::vector initialization with quotes in a numeric

Viewed 118

So I came about a question about std::reduce which lead me to an example on. cppreference.com

In this example I saw the following std::vector declaration:

    std::vector<double> v(10'000'007, 0.5);

What are these quotes doing here? I've never seen this before anywhere. Is this a new kind of C++ feature that I should know about?

2 Answers

This is a new feature in C++14. From cppreference:

Optional single quotes(') may be inserted between the digits as a separator. They are ignored by the compiler.

Related