Comment by HolyBlackCat on Using the new SDL3 Callback App Structure
Why the heck was this closed? This doesn't ask for library recommendation, this asks how to use a specific library.
View ArticleComment by HolyBlackCat on Refrence to "..." is ambiguous
Because you used using namespace std;, your distance conflicts wth std::distance. You should read Why is âusing namespace std;â considered bad practice?, and Why should I not #include...
View ArticleComment by HolyBlackCat on Is it OK for a class constructor to block forever?
@JanSchultke Mhm, edited.
View ArticleComment by HolyBlackCat on How to implement classes in C++ for Bank...
This doesn't compile. And you're not even calling the methods of your class.
View ArticleComment by HolyBlackCat on Installing make and gcc on a Windows machine
I'd recommend installing them from MSYS2 instead, and use msys2/setup-msys2@v2 action to get it into the PATH.
View ArticleComment by HolyBlackCat on lld cannot open /lib/x86_64-linux-gnu/libm.so.6 in...
-dynamic-linker /lib64/ld-linux-x86-64.so.2 looks fine to me, this path should only be used at runtime. The real problem is LLD searching for libm at the wrong location, not sure what's going on.
View ArticleComment by HolyBlackCat on Is my understanding of std::map and...
@GeneralGrievance The new title looks misleading. std::map doesn't use hashing, and OP didn't claim that.
View ArticleComment by HolyBlackCat on Getting argument type that depends on another...
I don't understand the question. What's wrong with this code?
View ArticleComment by HolyBlackCat on How const std::unique_lock or const...
There should be no difference, other than the inability to call some (non-const) member functions.
View ArticleComment by HolyBlackCat on Assigning std::make_unique to unique_ptr failed
Without even looking at the code: this can happen if you're doing this in context where the classes are forward-declared but the definitions are not visible. If I'm wrong, pleas emake a proper minimal...
View ArticleComment by HolyBlackCat on Lifetime of rvalue of custom class bound by rvalue...
This is correct in OP's case, but a reference can own an object that had its lifetime extended.
View ArticleComment by HolyBlackCat on visual studio code
You get errors in the terminal at the bottom at the screen. Scroll up and look at them. If you don't understand them, paste them and your code into the question.
View ArticleComment by HolyBlackCat on template friend: compilation fails with clang but...
@user12002570 "Always use the latest compilers." To be fair, Clang only fixed it in trunk. The latest stable rejects this.
View ArticleComment by HolyBlackCat on Installing libpng gets error: C compiler cannot...
You're running this inside MSYS2 terminal, right?
View ArticleAnswer by HolyBlackCat for read from file to a struct containing an atomic...
I believe the bool itself is more problematic than std::atomic here.Regardless of what std::is_trivially_copyable says for std::atomic (which seems to be a subject of a defect report), it should be...
View ArticleComment by HolyBlackCat on Is there a sequence point problem with this code?
@DĂșthomhas Not UB, because the two are indeterminately sequenced rather than unsequenced, because one is in a function call. Cppreference was missing this detail for a few years...
View ArticleComment by HolyBlackCat on Is there a sequence point problem with this code?
@JanSchultke Mhm, I've updated the accepted answer there.
View ArticleComment by HolyBlackCat on How to protect the memory of my shared library?
This really is an organizational problem, not a technical one. When they tell you your library is bugged, you ask for a code sample to reproduce the issue.
View ArticleComment by HolyBlackCat on MSVC compiler bug with C++ generic lambda? (now...
You should report a bug.
View ArticleComment by HolyBlackCat on RVO when implicit conversion is happening to the...
RVO means something else, but yes, std::move isn't needed here.
View Article