March 2020

Are you ready for C++Now?--Jon Kalb

Yes!

Are you ready for C++Now?

by Jon Kalb

From the article:

C++Now, which takes place in Aspen this May, refers to itself as A Gathering of C++ Experts and Enthusiasts from around the world. The conference, originally called BoostCon, was started so that Boost library authors, who had gotten to know each other online, could meet and discuss face to face. The Boost library is where experts develop and put into production the cutting edge techniques of C++...

Literal classes as non-type template parameters in C++20 -- Kevin Hartman

Using user-defined literal classes as non-type template parameters in C++20.

Literal classes as non-type template parameters in C++20

by Kevin Hartman

 

From the article:

/**
* Prints whether or not a value was provided for "maybe" WITHOUT branching smile
*/
template<OptionalInt maybe>
void Print() {
    if constexpr(maybe.has_value) {
        std::cout << "Value is: " << maybe.value << std::endl;
    } else {
        std::cout << "No value." << std::endl;
    }
}

[intermediate][C++20]