Quantcast
Channel: User HolyBlackCat - Stack Overflow
Browsing all 1285 articles
Browse latest View live
↧

Comment by HolyBlackCat on SDL3's SDL_SetWindowModalFor() fails with "that...

Does this only happen on SDL3 and not SDL2? Either way, I'd report a bug.

View Article


Comment by HolyBlackCat on Missing GCC Wformat warnings for "%p" in...

This looks like one of those "technically UB but always works in practice" warnings. It seems that Clang warns about this and GCC doesn't.

View Article


Comment by HolyBlackCat on OpenGL Error: Pixel Format is Invalid with...

Where did you get SFML? Did you build it yourself?

View Article

Comment by HolyBlackCat on Hash function for binary data

Looks ok. And you don't need memcpy, you can pass a pointer to your object directly to this.

View Article

Comment by HolyBlackCat on Non-type template parameter in struct vs alias

(2) doesn't work because the compiler isn't going to solve an equation to determine the template parameter of backend. I think it's more interesting how (1) is whitelisted.

View Article


Comment by HolyBlackCat on Is writing else statement at the last mandatory in...

Yes, it's legal. In general, An if-else-if ladder is not a special case, it's just a bunch of if else where the braces after else are omitted. It's easier to see if you indent the code like this:...

View Article

Comment by HolyBlackCat on Returning the raw pointer from a list of unique...

How about returning cosnt std::set<std::unique_ptr<B>> &? This isn't an ownership transfer.

View Article

Comment by HolyBlackCat on Why am I getting the error that `msys-2.0.dll was...

What does where git (or which git) say?

View Article


Comment by HolyBlackCat on VSCode CMake Tools use custom commands

I don't know about the CMake plugin, but you can always manually write tasks.json.

View Article


Answer by HolyBlackCat for c++20 vector comparison weird behaviour

C++20 replaces the individual <,<=,>,>= operators of std::vector (and of many other standard classes) with a single <=>.Internally it tries to use <=> to compare the elements,...

View Article

Answer by HolyBlackCat for How to use std::lower_bound when the key is part...

While (as the other answer says) you can give std::lower_bound a comparator with two different parameter types (as value is always the second parameter), in those cases I find it less confusing to use...

View Article

Comment by HolyBlackCat on C++ Runtime polymorphism calling unexpected...

Hopefully lesson learned: never C-style cast class pointers and references.

View Article

Comment by HolyBlackCat on How do I pass arguments to a template function?

"trying to present your arguments" I don't understand what you mean.

View Article


Comment by HolyBlackCat on How can I implement Chained Comparison Operator...

I would only allow chaining the same operator, and disallow chaining !=.

View Article

Comment by HolyBlackCat on I am trying to compile my cpp file but it is not...

Do you actually have g++.exe at the desktop? The path doesn't look right.

View Article


Comment by HolyBlackCat on Is this a preprocessor limitation

Ok, but what's S1(X) LOGCONA ... supposed to be in the second snippet?

View Article

Comment by HolyBlackCat on How can i disable the auto-opening terminal in VS...

What extension are you using, and how did you configure it?

View Article


Comment by HolyBlackCat on Is there an easy way to unpack (extract) a .tar...

@Raildex system is going to be a pain in the [...] no matter what. You need to quote the filename in an OS-specific way (and then distribute your own tar executable for e.g. Windows...).

View Article

Comment by HolyBlackCat on Scoped Enum Class, valid enumerator names

MSVC is weird. It stops accepting that if you add e.g. /std:c++latest.

View Article

Comment by HolyBlackCat on How does one get c macro stringification to work...

Quotes aren't your only problem. Sequences of >1 space will be collapsed to single space, newlines removed, side spaces trimmed.

View Article
Browsing all 1285 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>