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

Comment by HolyBlackCat on How can I use a lamda expression as constant...

Uhh. It being a primary-expression is not the only requirement, it must be a compile-time boolean constant.

View Article


Comment by HolyBlackCat on How can I use a lambda expression as constant...

Uhh. It being a primary-expression is not the only requirement, it must be a compile-time boolean constant.

View Article


Comment by HolyBlackCat on How can I use a lambda expression as constant...

They seem to already know (some part of?) this, as shown by the last paragraph of the question.

View Article

Comment by HolyBlackCat on Why does static library link solve collect2.exe...

This is usually fixed by reordering directories in PATH to make MSYS2 be first. In the (non-msys2) terminal, run echo $env:PATH to print the PATH and confirm that MSYS2 is first.

View Article

Comment by HolyBlackCat on System cannot find glfw3 even though it is installed

"instead using GLFW instead of glfw3" Do you mean -lGLFW? It should be -lglfw, I believe. "GLAD fails to initialize" This is a better error compared to "glfw3: no such file or directory", it means...

View Article


Comment by HolyBlackCat on Issues compiling a simple cpp script using wtsapi32.h

Works for me out of the box on MSYS2 GCC, without any compiler flags. Don't try to use MinGW with MSVC's headers, get a version of MinGW that directly supports headers you need.

View Article

Comment by HolyBlackCat on How do I run an exectuable file with the GTK 4...

The linked question should answer this. If not, please tell.

View Article

Comment by HolyBlackCat on Static library will not compile without...

Can a PCH be involved? Also try going to the VS settings and increasing the log level, maybe the compiler will tell you what includes those files.

View Article


Comment by HolyBlackCat on Gcc and clang reject move constructor with =default

I didn't downvote this, but eel.is/c++draft/dcl.fct.def.default#2 seems relevant, I'd quote it too. My current reading is that OP's =default should become =delete automatically in this case, but I...

View Article


Comment by HolyBlackCat on Is there any type defined in Standard Library...

std::allocator is an empty class, I don't understand why it has a custom copy constructor in the first place.

View Article

Comment by HolyBlackCat on Does a constructor have a "type" since it is a...

Function types can't exist without the return type. I highly doubt this was the intent, it looks like the new "T may be empty" wording only tries to handle conversion operators.

View Article

Comment by HolyBlackCat on Setting up neovim for c++

Clangd has this silly habit of inserting placeholders for function arguments. --function-arg-placeholders=false stops it.

View Article

Comment by HolyBlackCat on Why does std::expected overload all reference type...

If you have an rvalue expected and call .value() on it, you want it to return an rvalue, to be able to move from it.

View Article


Comment by HolyBlackCat on How to implement an array that can grow up to a...

@Gene You can't do this with std::allocator, or at least not directly. Allocator requirements force it to be copyable, and the copy must be able to free the memory allocated by the original.

View Article

Comment by HolyBlackCat on Run a rule but allow intervention

This is makefiles 101. The makefile targets should be named after the files they produce, then they're not going to be re-run.

View Article


Comment by HolyBlackCat on How does CMake's universal binary builds work?

You can build in verbose mode and look at the compiler commands.

View Article

Comment by HolyBlackCat on Switch case: Return from impossible default case

"putting an assert at the end doesn't seems correct" Why not? Also if you only have two states, it sounds like a job for bool, not a enum, then you won't have this problem. Also I recommend not adding...

View Article


Comment by HolyBlackCat on How to install OpenMP for clang on windows

Works for me on msys2 clang: stackoverflow.com/q/30069830/2752075

View Article

Comment by HolyBlackCat on Why isn't c++ letting me include a header file?

c_cpp_properties.json only affects hints in the editor, not the actual compilation. You want to add -Iinclude to your tasks.json if you're using one.

View Article

Comment by HolyBlackCat on So, basically I`m new to C language, and I`ve...

This usually means Example_1.exe is already running and needs to be closed first.

View Article
Browsing all 1287 articles
Browse latest View live


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