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

Comment by HolyBlackCat on C++ Get name of type in template

Yeah, as mentioned it "produces strings in a compiler-dependent format".

View Article


Comment by HolyBlackCat on Cpp libraries for game (for absolute beginner)

Library recommendations are off-topic. That said, the big three options are SDL3 (a new release just dropped!), SFML, and Raylib. That's roughly my order of preference.

View Article


Comment by HolyBlackCat on C++/STL: get warnings about empty iterator ranges

You didn't pass begin() twice, a typo?

View Article

Comment by HolyBlackCat on How to make a C++ template expression work?

Why do you need typedef typename E::Type Type; in the first place? Nothing in IntExpr needs it, and the derived classes already provide it. What if you uncomment everything other than that typedef?

View Article

Comment by HolyBlackCat on i am having problem with configuring clangd...

Reinstall everything from MSYS2 (clangd and mingw). Then they will work together with zero configuration.

View Article


Comment by HolyBlackCat on Why can I not use find_if_not or find_if in C++?

The parameter type of your lambda or is_space should be unsigned char instead of char. The standard isspace (and friends) trigger UB if given a negative character.

View Article

Comment by HolyBlackCat on What, actually, is the modulo of a negative number?

@khteh What is unclear about it?

View Article

Comment by HolyBlackCat on Resizing a borderless window is not working in sdl3

@AlanBirtles OP's version should do something too. But I guess trying a more realistic example doesn't hurt.

View Article


Comment by HolyBlackCat on cannot find -lSDL3main: No such file or directory

SDL3 (as opposed to SDL2) changed how main works. I don't think you need -lmingw32 -lSDL3main anymore.

View Article


Comment by HolyBlackCat on Why does the thread sanitizer complain about...

@nh2 It talks about acquire/release fences, and the only other kind of fence is seq_cst, unless I'm missing something.

View Article

Comment by HolyBlackCat on How to flush a stream in C++23 when using...

Even if so, your self-answer doesn't provide any new information. The answers in that thread already suggest both std::flush and std::fflush. And if anything, they explain in more detail the difference...

View Article

Comment by HolyBlackCat on const qualifier on struct

"Does all the members inherit const, or only the variable p is read-only?" I don't understand the question. Clearly the members themselves can't be modified, as you've tested yourself.

View Article

Comment by HolyBlackCat on Check if 3D point inside a box

@Ray Yeah, should work? Each condition checks that the point is between two parallel planes.

View Article


Comment by HolyBlackCat on When ever i try to debug my c++ file in vc code it...

Show tasks.json.

View Article

Comment by HolyBlackCat on What is MIMode in the debug adapter protocol (DAP)?

MI is an older alternative protocol, similar to DAP, I believe? They are not used together.

View Article


Comment by HolyBlackCat on Can't uninstall msys2

What do you mean by "directories are there" if you say they don't "show up in the file system"? Add some screenshots.

View Article

Comment by HolyBlackCat on c++ boost class export with templates

I didn't read the manual, but assuming the macro was written by sane people, BOOST_CLASS_EXPORT((DerivedA<double, float>)) should work.

View Article


Comment by HolyBlackCat on How to setup environment for compilation mode on...

You could use a build system (such as CMake) and/or switch to a different compiler (such as Clang, which I think is a better option anyway).

View Article

Comment by HolyBlackCat on How to setup environment for compilation mode on...

Store the correct env variables somewhere and apply them before building, it should be faster than running vcvars every time.

View Article

Comment by HolyBlackCat on How to use Docker to build a C++ application?

I recommend installing Ubuntu. It has third-party repos with up-to-date GCC and Clang. (The former coming from an "official" source I believe.)

View Article
Browsing all 1285 articles
Browse latest View live


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