ylliX - Online Advertising Network

Rust and C++ with Steve Klabnik and Herb Sutter – Software Engineering Daily

In software engineering, C++ is often used in areas where low-level system access and high-performance are critical, such as operating systems, game engines, and embedded systems. Its long-standing presence and compatibility with legacy code make it a go-to language for maintaining and extending older projects. Rust, while newer, is gaining traction in roles that demand […]

How to use std::array’s data and other member functions in a constexpr context?

I defined the following class, expecting to be able to use std::array in a constexpr context, but calling the data function results in a compilation error. #include <array> template <size_t N> struct ConstexprString { consteval ConstexprString(const char (&_str)[N]) : char_array(std::to_array(_str)) { } consteval auto Data() const -> const char* { return char_array.data(); } private: const […]

Unclear template resolution

I was going through the exercises in this post https://www.slamecka.cz/posts/2021-03-17-cpp-metaprogramming-exercises-1/ First of all, I want to say huge thanks to the author. The problems were quite interesting, challenging, and engaging. One part of the problem caused me some issues, and I don’t really understand why. /** * 18. Define Insert for Vector, it should take […]