Best of C++ โ€” August 2024

  1. 1
    Article
    Avatar of p99confP99 Confยท2y

    Switching From C++ to Rust

    Nikita Lapkov shares his experience transitioning from writing C++ to Rust. He highlights the benefits of Rust's memory safety, unified build system, concise and helpful compiler error messages, and powerful type system with features like generics and enums. Compared to C++, Rust offers a more pleasant and efficient developer experience.

  2. 2
    Article
    Avatar of game_developersGame Developersยท2y

    ๐ŸŒŸ Exciting News โ€“ My First Website is Live! ๐ŸŒŸ

    A beginner game developer shares that their first website is live, detailing the challenges they faced, including a major bug that deleted the project folder. The site, hosted on Google Drive, compares C++ and C# for game development. The author seeks feedback and advice from the community.

  3. 3
    Article
    Avatar of sandordargoSandor Dargoยท2y

    What is std::ref?

    std::ref and std::cref are helper functions that generate std::reference_wrapper objects, making references both copy-constructible and copy-assignable. They are useful for storing references in standard containers and for passing references to templates and helper functions like std::bind, std::thread, and std::make_pair, ensuring references are used correctly and not replaced by copies.

  4. 4
    Article
    Avatar of hnHacker Newsยท2y

    tpecholt/imrad: ImRAD is a GUI builder for the ImGui library

    ImRAD is a cross-platform GUI builder for the ImGui library, capable of generating and parsing C++ code for various kinds of windows and widgets. It offers support for property binding, event handling, and customizable window styles. The tool integrates with GLFW and stb libraries for enhanced functionality and adheres to open-source licensing. Users can build and run ImRAD using CMake and Visual Studio.

  5. 5
    Article
    Avatar of isocppC++ยท2y

    C++ programmer's guide to undefined behavior: part 4 of 11

    The post delves into intricate aspects of undefined behavior in C++ programming, focusing on issues with lambda function capture lists, std::tuple class template, object lifetime errors, unexpected mutability, proxy objects, and move semantics. It provides examples of how these features can lead to bugs, unexpected crashes, and undefined behavior, and discusses possible ways to avoid these pitfalls through careful coding practices. It also highlights the challenges in static code analysis for detecting such issues.

  6. 6
    Article
    Avatar of isocppC++ยท2y

    C++ programmer's guide to undefined behavior: part 3 of 11

    Undefined behavior in C++ occurs frequently due to issues with object lifetimes, such as dangling references and use-after-free errors. Often, these errors are hidden within layers of abstraction in code. The article explores various examples and solutions to prevent such errors, including best practices for using references, smart pointers, and value semantics. Tools like static analyzers, sanitizers, and proper coding patterns are recommended to mitigate these issues.