C++

!cpp

@programming.dev
Create post
Checking if a hash is collision free on a limited domain

Checking if a hash is collision free on a limited domain

Open link in next tab

Checking the collision \

https://lexp.lt/posts/checking_the_collision_freeness_of_an_homemade_hash/

# Why? In a work related context, I had to create a hash algorithm working on a finite set of values ([0, 0xFFFFFFFF]) to output a non sequential serie from a sequential one (the output had to be rendered as a UUID. Basically, I wanted to avoid generating UUID looking like 00000000-0000-0000-0000-000000000001, that will definitely appear to be sequential and easily abused to find other IDs. # The transformation Previously I called it a hash, it’s more like a map function (or transform function for my C++ folks), operating on [0, 0xFFFFFFFF] -> [0, 0xFFFFFFFF] where the sequential aspect is lost.

Enum Class Improvements for C++17, C++20 and C++23

Enum Class Improvements for C++17, C++20 and C++23

Open link in next tab

Enum Class Improvements for C++17, C++20 and C++23

https://www.cppstories.com/2024/enum-improvements/

The evolution of the C++ language continues to bring powerful features that enhance code safety, readability, and maintainability. Among these improvements, we got changes and additions to enum class functionalities across C++17, C++20, and C++23. In this blog post, we’ll explore these advancements, focusing on initialization improvements in C++17, the introduction of the using enum keyword in C++20, and the std::to_underlying utility in C++23.

Enum Class Improvements for C++17, C++20 and C++23
The difference between undefined behavior and ill-formed C++ programs - The Old New Thing

The difference between undefined behavior and ill-formed C++ programs - The Old New Thing

Open link in next tab

The difference between undefined behavior and ill-formed C++ programs - The Old New Thing

https://devblogs.microsoft.com/oldnewthing/20240802-00/?p=110091

They are two kinds of undefined-ness, one for runtime and one for compile-time.

The difference between undefined behavior and ill-formed C++ programs - The Old New Thing
How to build highly-debuggable C++ binaries

How to build highly-debuggable C++ binaries

Open link in next tab

How to build highly-debuggable C++ binaries

https://dhashe.com/how-to-build-highly-debuggable-c-binaries.html

code { white-space : pre-wrap !important; } This article is tightly scoped to cover one topic with specific, actionable advice: How to configure...

What’s so hard about constexpr allocation?

What’s so hard about constexpr allocation?

Open link in next tab

What’s so hard about constexpr allocation?

https://brevzin.github.io/c++/2024/07/24/constexpr-alloc/

Setting the Stage

How to build highly-debuggable C++ binaries

How to build highly-debuggable C++ binaries

Open link in next tab

How to build highly-debuggable C++ binaries

https://dhashe.com/how-to-build-highly-debuggable-c-binaries.html

code { white-space : pre-wrap !important; } This article is tightly scoped to cover one topic with specific, actionable advice: How to configure...

Draft FAQ: Why does the C++ standard ship every three years? (2019)

Draft FAQ: Why does the C++ standard ship every three years? (2019)

Open link in next tab

Draft FAQ: Why does the C++ standard ship every three years?

https://herbsutter.com/2019/07/13/draft-faq-why-does-the-c-standard-ship-every-three-years/

WG21 has a strict schedule (see P1000) by which we ship the standard every three years. We don’t delay it. Around this time of each cycle, we regularly get questions about “but why so strict?”, esp…

Draft FAQ: Why does the C++ standard ship every three years?
Comparing C/C++ unity build with regular build on a large codebase

Comparing C/C++ unity build with regular build on a large codebase

Open link in next tab

Comparing C/C++ unity build with regular build on a large codebase | Hereket

https://hereket.com/posts/cpp-unity-compile-inkscape/

New features in C++26 [LWN.net]

New features in C++26 [LWN.net]

Open link in next tab

New features in C++26 [LWN.net]

https://lwn.net/Articles/979870/

Slint 1.7 Released with New Widgets, Multi-Window Support, and Live-Preview Redesign

Slint 1.7 Released with New Widgets, Multi-Window Support, and Live-Preview Redesign

Open link in next tab

Slint 1.7 Released with New Widgets, Multi-Window Support, and Live-Preview Redesign

https://slint.dev/blog/slint-1.7-released

Slint 1.7 Released with New Widgets, Multi-Window Support, and Live-Preview Redesign

Slint 1.7 Released with New Widgets, Multi-Window Support, and Live-Preview Redesign