October 2024

What's So Hard About Cass Types as Non-type Template Parameters? -- Barry Revzin

revzin200930.pngPreviously, I tried to answer the question: what’s so hard about constexpr allocation?. Today, we continue what will become a series of posts about attempting to explain the issues behind a bunch of hard problems we’re trying to solve. The next problem: class types as non-type template parameters.

What's So Hard About Cass Types as Non-type Template Parameters?

by Barry Revzin

From the article:

Before C++20, the only types you could use as non-type template parameters were scalar types (like int and enums, but not floating point), pointers (including pointers-to-members), and references. Notably, not class types.

Floating point types were also added in C++20.

The hard question about handling class types is: how do you determine template argument equivalence? Class types can define their own equality. But you don’t really want to rely on that, since now matching specializations becomes a quadratic problem — you can’t really do much when determining the instantiation for some template f<x> other than looping through every other value vi to see if x == vi.

The other problem is we need == to really be strong enough. One very easy problem to run into in this space is violating the One Definition Rule (ODR). One essential, core requirement for templates is that instantiating the same template with the same arguments has to yield the same code.

 

Highlighting the student and support tickets for Meeting C++ 2024

Meeting C++ offers free online and onsite tickets through their student and support programs. This is supported through the ticket sales for Meeting C++ 2024.

Highlighting the student and support tickets for Meeting C++ 2024

by Jens Weller

From the article:

Like every year, I'd like to point towards the programs for those that can't afford to pay for a ticket for Meeting C++ 2024.

And let me start with thanking those that enable these programs through their ticket buying: the attendees and sponsors of Meeting C++ 2024! With the schedule published, I'd like to highlight the student and support tickets for Meeting C++ 2024. For a few years now Meeting C++ has hosted programs to give students, underrepresented folks and those who can't afford a ticket access to the conference.

This year for the first time you can choose to register either for onsite or online for these programs. A limited amount of tickets for Berlin will be available, depending on the ticket sale in October. So incase you registered for onsite but are not chosen for a ticket, then you'll have a chance to an online ticket...