C & C++
cross-posted from: https://lemmy.ml/post/15682818 > The next major version of the GNU Compiler Collection (GCC), 14.1, was released on May 7 2024. Like every major GCC release, this version brings many additions, improvements, bug fixes, and new features.
Yes, it is probably a weird question, but I tried a lot, and I started to think that maybe is impossible to overload this template function properly: ```cpp #include <iterator> class Foo { private: const int arr[5] = {10, 20, 30, 40, 50}; public: const int* begin() const { return arr; } friend auto std::begin<>(const Foo &f) -> decltype(f.begin()); } ``` It always throw the same error (in GCC 12.2.0): ``` main.cxx:10:13: error: template-id ‘begin<>’ for ‘const int* std::begin<>(const Foo&)’ does not match any template declaration ``` I just wanna know if is possible do things like this. Thanks.
Hi everyone, I built an open-source Smartwatch firmware for Raspberry Pi Pico in C programming language.The watch has the following features: * Call Management * Notifications * Music and media control * Reminder * Alarms * Lock Screen * Temperature * Touch Gestures * Stopwatch * Calendar * Notepad * Remote Configuration [Check out WearPico's source code!](https://github.com/umutsevdi/wear-pico/)
Hi everyone I'm writing a web browser for Linux in C programming language. It's a work in progress. It supports HTTP Gemini and Gopher. Check it out. Feel free to contact me for any issues or feature requests.
[r/cpp](https://libreddit.mha.fi/r/cpp/comments/17kgio4/bjarne_stroustrups_plan_for_bringing_safety_to_c)
I am writing a unit test and mocking library in C and I want to set the call stack memory to some pre determined value like memset. I want to do this before the test function is called so the test writer can verify they aren't using uninitialized memory in their tests. Is there any somewhat portable way to do this?
cross-posted from: https://lemmy.ml/post/4072147 > Is there a library for C, providing thread safe (high performance), and structured logging? An example for rust is the Tracing crate for rust (from Tokio). It should support several outputs as well.
[r/cpp](https://libreddit.mha.fi/r/cpp/comments/14h0ixr/making_c_memorysafe_without_borrow_checking_rc_or)
cross-posted from: https://lemmy.ml/post/1447800 > The latest major version of the GNU Compiler Collection (GCC), 13.1, was released in April 2023. Like every major GCC release, this version brings many additions, improvements, bug fixes, and new features. GCC 13 is already the system compiler in Fedora 38. Red Hat Enterprise Linux (RHEL) users will get GCC 13 in the Red Hat GCC Toolset (RHEL 8 and RHEL 9). It's also possible to try GCC 13 on godbolt.org and similar web pages. > > Like the article I wrote about GCC 10 and GCC 12, this article describes only new features implemented in the C++ front end; it does not discuss developments in the C++ language itself. Interesting changes in the standard C++ library that comes with GCC 13 are described in a separate blog post: New C features in GCC 13
[r/cpp](https://libreddit.mha.fi/r/cpp/comments/14efjyv/polymurhash_a_fast_hash_with_a_mathematically)
Trip report from the first C++26 ISO meeting by foonathan
[r/cpp](https://libreddit.mha.fi/r/cpp/comments/13bw8ud/the_future_of_boost_by_vinnie_falco/)
[r/cpp](https://libreddit.spike.codes/r/cpp/comments/117aq4h/c23_is_finalized_here_comes_c26) comments
Reddit comments [r/computerscience](https://libreddit.spike.codes/r/computerscience/comments/10yd9g1/can_c_be_saved_bjarne_stroustrup_on_ensuring/)
[r/cpp](https://libreddit.spike.codes/r/cpp/comments/y9n52o/gcc_powered_interactive_cc_shell_created_with_bash)
Two related reddit discussions: [Overview of the CMake controversy, and break down the pros and cons of the critical C++ tool. ](https://teddit.net/r/programming/comments/ufueci/overview_of_the_cmake_controversy_and_break_down) [What's the hate for CMake all about? Is CMake really that bad? ](https://teddit.net/r/cpp/comments/qum4sq/whats_the_hate_for_cmake_all_about_is_cmake)
Because the world isn't weird enough?
I don't know I feel like there aren't many resources to learn C++. Maybe it is because I am not looking hard enough. Can someone here recommend some websites or videos?
I haven't really understood the difference between `i++` and `++i`
cross-posted from: https://lemmy.ml/post/70930 > I am learning C++ and in my book `using namespace std` is written in every program. > I understand that `std::cout <<"hello"; ` can be simply written as `cout << "hello";` by using namespace std. > > Why?
Rob and Jason are joined by Arnaud Desitter. They first discuss blog posts on parameter passing, fuzzing and push_back vs emplace_back. Then they talk to Arnaud Desitter about his successes improving application performance by reducing memory allocations found using heaptrack.
Rob and Jason are joined by Raymond Chen from Microsoft. They first talk about Herb Sutter’s virtual ISO Plenary Trip Report and some new features voted into the C++23 draft. Then they talk to Raymond Chen from Microsoft about his career working on Windows and the Old New Thing blog.
In our articles, we regularly repeat an important idea: a static analyzer should be used regularly. This helps detect and cheaply fix many errors at the earliest stage. It looks nice in theory. As we know, actions still speak louder than words. Let's look at some recent bugs in new code of the Blender project.
Rob and Jason are joined by Nicole Mazzuca from Microsoft. They first talk about a differential equation library, and modules support in build2 and meson. Then they talk to Nicole from Microsoft’s vcpkg team about some new features in vcpkg to enable teams to host their own libraries.