Answer by HolyBlackCat for VS Code - can I turn a block selection into a...
The only solution I know is AltShiftIAdd Cursors to Line Ends, that gives you the cursors but without the selection.You can then do ShiftHome to select the lines, or just Home to have the cursors at...
View ArticleComment by HolyBlackCat on How can a sprintf-like function in C++20/23 verify...
In the linked answer, all you need to change is to make format_string a template and pass <T...> to its template arguments.
View ArticleComment by HolyBlackCat on Is there a way to increase the size of a memory...
Obligatory reminder that GCC 6 is outdated, the latest is GCC 14. Install it from MSYS2.
View ArticleComment by HolyBlackCat on How to check that a function result is constexpr...
@Oersted I think the first paragraph of the question is good enough as a layman explanation. If you're looking for something more official, it's somewhere in...
View ArticleHow to check that a function result is constexpr even when the argument is not?
constexpr functions can yield constexpr results even when their arguments are not constexpr, if they are unused. Such is, for example, std::integral_constant::operator T:#include...
View ArticleComment by HolyBlackCat on How to recover offset in buffer of emplaced object...
Don't overthink it. I think it's generally agreed that this wording is defective, and regardless of what the standard says, this is the only option and it will always work in practice.
View ArticleComment by HolyBlackCat on How do I make my c++ 11 struct more expressive?
@PepijnKramer I think the layout is fairly stable in most cases?
View ArticleComment by HolyBlackCat on How configure Visual Studio Code for develo GTK3...
What OS and compiler? You normally would figure out how to compile in the terminal first, and then make VSC run the same commands.
View ArticleComment by HolyBlackCat on OpenGL Error 1282 in Release mode due to compiler...
You have undefined behavior somewhere. Enable ASAN and other sanitizers you have available, see if they catch it.
View ArticleComment by HolyBlackCat on GL_INVALID_OPERATION in Release mode due to...
You have undefined behavior somewhere. Enable ASAN and other sanitizers you have available, see if they catch it.
View ArticleComment by HolyBlackCat on LoadLibrary taking infinite time
Pause in the debugger and see what's it doing?
View ArticleComment by HolyBlackCat on cl.exe error with GLFW and GLAD in VS Code
VS is a lot easier to set up than VSC. You shouldn't switch (at least not for this reason). Ask about the issues you have with VS instead.
View ArticleComment by HolyBlackCat on I want to make audio programs from scratch with no...
Pure C++ can't do audio, you have to use a library. And if you use one, you might as well pick a cross-platform one.
View ArticleComment by HolyBlackCat on Differences in constraint validation order between...
@TedLyngmo Something needs to call the function with a bad type for there to be an error. If you remove the concept it and don't call it with a bad type in any other way, yes, it compiles.
View ArticleComment by HolyBlackCat on std::chrono doesnt recognized by compiler - fix...
Attach the errors as text from the output tab (at least the first few errors).
View ArticleComment by HolyBlackCat on Differences in constraint validation order between...
I'm a bit confused by "when an instantiation is needed. The standard isn't very clear" but then "Templates are only instantiated when necessary". The way I understood you is that the entire (top-level)...
View ArticleComment by HolyBlackCat on C++ Code not Working in VS Code Terminal but...
99% sure this is a dll issue. Follow the advice in the linked thread and report back if it doesn't work.
View ArticleComment by HolyBlackCat on Camera unexpectedly shifts when change window...
Ignore mouse moves for a few frames when toggling?
View ArticleComment by HolyBlackCat on Checking noexceptness when applying function to a...
@康桓瑋 Added a note to the answer. I think I'll leave this as an exercise to the reader, as it doesn't look too tricky.
View ArticleComment by HolyBlackCat on Makefile: How does a header file change trigger a...
@yapkm01 Your post is a simple example. Similarly, you could have something like 1.o: 1.cpp<tab>g++ 1.cpp -c -o 1.o1.o: 1.h. The last line adds another prerequisite, as if you did 1.o: 1.cpp 1.h...
View Article