Meeting 24 January 2019

Deducing your intentions

Deducing your intentions by Andrzej Krzemieński

In this post we will briefly describe what class template argument deduction is, and why it works differently than what people often expect.
  • Class template argument deduction (CTAD) in C++17: P0091R2
auto q = std::make_optional(std::optional<int>{});
// q is optional<optional<int>>
std::optional q (std::optional<int>{});
// q is optional<int> !

Stop with the CTAD FUD!

Stop with the CTAD FUD!

std::optional maybe_string{"Hello!"s}; // optional<string>
std::optional other_thing{maybe_string}; // optional<string>

// Deduction guides:
// [1] Explicit
template <typename T> auto __deduce(T) -> optional<T>;
// [2] Implicit from std::optional copy ctor
template <typename T> auto __deduce(const optional<T>&) -> optional<T>;

"Modern" C++ Lamentations

"Modern" C++ Lamentations by Aras Pranckevičius (Unity)

C++ compilation times have been a source of pain in every non-trivial-size codebase I’ve worked on. <...> Yet it feels like the C++ community at large pretends that is not an issue, with each revision of the language putting even more stuff into header files, and even more stuff into templated code that has to live in header files.

Some of the “all feedback will be ignored unless it comes in form of a paper presented at a C++ committee meeting” replies that I’ve seen in the past few days sound to me like a not very productive approach.

Thoughts on Modern C++ and Game Dev

Thoughts on Modern C++ and Game Dev by Ben Deane

TL;DR: The C++ committee isn’t following some sort of agenda to ignore the needs of game programmers, and “modern” C++ isn’t going to become undebuggable.

I think it’s a shame that the STL is so strongly identified with its containers. They tend to be what gets taught first, so when we say “the STL” we often first think of std::vector when we should really be thinking of std::find_if.

"Modern" C++ Ruminations

"Modern" C++ Ruminations by Sean Parent

Programming is a profession. It is an ethical obligation to work to improve our profession. The more senior and talented you are, the more you owe to the community. Giving back can take many forms; mentoring, lecturing, publishing, serving on committees and furthering open source projects. Part of that obligation is to continue to study, to read papers and work through books.

Compile Time, Binary Size Reductions and C++'s future for sol3

Compile Time, Binary Size Reductions and C++'s future for sol3 by ThePhD


Eagleson's Law:

Any code of your own that you haven't looked at for six or more months might as well have been written by someone else.