Cross-platform, cross-language development is quite tedious... 🙃
You need to wait for builds to finish, then test on three different OS with different ways to load things.
At least with a Windows machine, you get a Linux environment via WSL2 for free, although it doesn't launch via dotnet run.
And finally you also need access to macOS somehow.
All this time I've been using the return value of snprintf as the number of characters actually written, when it's in fact the number of characters that would be written if the max size passed in were large enough.
In fact: "If the resulting string would be longer than n-1 characters, the remaining characters are discarded and not stored, but counted for the value returned by the function."
@gfxstrand Good to know, will definitely be checking that.
Of course to be sure I should check the behaviour on Windows 11, Windows 10... Windows 8.1, Windows 8... Windows XP, 2000... Windows Me, no just kidding on that last one.
After 10 years of commercial experience in #cpp I think I’m ready for a new chapter. I have played around with #rust#golang#zig and #clojure but most job offers that I see are for people with at least X years of commercial experience in this exact languages. Do you have any hints how to approach this? I would think that my previous experience as a #software engineer would matter. Especially since I do not expect to move to another senior role, I’m checking junior positions too. #jobsearch
Funny. I removed all modules from my C++ codebase (roughly 10% of it) and I got about 10-16% shorter compilation times. Not to mention Intellisense no longer crashing all over the place.
I wonder if it ever be a worthwhile feature to use.
@jakub_neruda the feature is not ready for prime time. Don't use it if the bleeding crashing edge is not your thing.
For compilation speed, it depends how fine grained your modules are. The smaller your modules are, the longer the compile time. They are not meant to replace headers 1:1. A good example is the STL, where any other splitting than just import std was found to be slower.
I spent ~hour yesterday fighting an issue with my C++ code, only to later figure out it's a possible GCC bug, because Clang accepts the same code.
The issue is that GCC does not permit a constrained type parameter in a template template parameter of an aliased template. See the simplified code with the issue.
A cursory search of GCC Bugzilla does not readily show any related bug. I'll look carefully but lemme know if this is a known bug (probably is). 🙏🏽
@gracicot I can't get it to work. I have a source file including iostream and importing a module. The module imports Std and uses some stl stuff, e.g. a unique_ptr. And voila, I get redifinition errors in <memory>.
Without the include of <iostream> everything works as expected. And it doesn't matter If include or import comes first.
This is the only solution that supports simultaneous hot-reload for C++ applications across multiple platforms and processes, both locally and over the network. https://www.youtube.com/watch?v=ewbkdxskl7I