Comment by HolyBlackCat on Running an C++ file on VSC to pop out in an...
Why does it matter if it's an external terminal or not? What exactly are you clicking in VSC to run your program? Did you customize any of the config JSONS? Show them.
View ArticleComment by HolyBlackCat on c++: Derived class from CRTP can't access its own...
"Please edit your question to show us a minimal reproducible example" In other words, we want a small ~20 line program that we can compile ourselves and see the same issie you do.
View ArticleComment by HolyBlackCat on Why extent of std::span created from a static...
There's no partial class template argument deduction. Since you specified some template parameters (<...>), the extent template parameter is going to use its default value (that being...
View ArticleComment by HolyBlackCat on Change index of C++ range based for loop using...
No, write the loop manually. Not everything needs a stdlib abstraction. For extra style points you can embed the index declaration into the for: for (std::size_t i = 0; const auto &index : indices)...
View ArticleComment by HolyBlackCat on cross compiling Python-3.12 on windows
Cross compile from Windows to what OS? Or from what OS to Windows? What does Cygwin have to do with it?
View ArticleComment by HolyBlackCat on Dependent names in C++ template
@MKR It doesn't for me: gcc.godbolt.org/z/x5nevWzKM
View ArticleComment by HolyBlackCat on Dependent names in C++ template
@Ashiful The error happens during the initial parse of b, not when it's instantiated, so the compiler can't see the lack of specializations at that point. This now isn't specific to your case, it's the...
View ArticleComment by HolyBlackCat on "relative path" error message in cmake configure
What's up with all the hardcoded paths in CMakeLists.txt? You need none of that. Remove both Sets and include_directories (also drop .exe from the project name). Make sure you have installed pacman -S...
View ArticleComment by HolyBlackCat on Cannot figure type difference between c++ function...
We need a minimal reproducible example or we won't be able to help. You need to do your homework, which is reducing this to a small example we can compile ourselves and see the same error as you do.
View ArticleComment by HolyBlackCat on which command do i use to go to c drive then...
@MartinBrown Yeah, MSYS2 comes with a Cygwin-based bash, where C:\foo\bar is spelled as /c/foo/bar.
View ArticleComment by HolyBlackCat on "relative path" error message in cmake configure
I'm glad it worked, but again, hardcoding paths in a CMakeLists.txt is a very bad sign. You want it to be cross-platform and not locked to a specific installation directory. You should try to automate...
View ArticleComment by HolyBlackCat on Should I take the address of an array when using...
Probably doesn't matter. (1) looks more familiar, and it's also the only option when the array is heap-allocated.
View ArticleComment by HolyBlackCat on Why am I getting undefined reference to `WinMain'...
The error means you're missing the main() function, such as when you're compiling an empty file. It has nothing to do with what headers you include.
View ArticleComment by HolyBlackCat on Namespace-class resolution for static methods and...
TL;DR every class has a hidden using A = A; type alias in it, pointing to itself. It's called the injected-class-name.
View ArticleComment by HolyBlackCat on How to implement a `foreach` function inside a...
@Jarod42 I'm not sure if they suggested that as an alternative to the first snippet or the second one.
View ArticleAnswer by HolyBlackCat for How to write a If else condition in github action...
I came here looking how to disable the entire.yml file with a single condition.Adding the conditions to each job individually is not feasible, because e.g. in a pull request, it spams a "job skipped"...
View ArticleAnswer by HolyBlackCat for How to keep the CPU usage down while running an...
For me, the automatic delay between frames (caused by vsync) was consuming 100% of one CPU core while enabled. So before swapping the buffers, I started predicting what the delay will be and sleeping...
View ArticleComment by HolyBlackCat on Building RISC-V compiler seems to fail, looking...
Run make again after the error in a single-threaded mode. What is the last command it tries to run before this happen (may need to add --trace if it doesn't print by default).
View ArticleComment by HolyBlackCat on Do i need atomic or mutex protection for...
@3CxEZiVlQ By "the same" I mean provides the same synchronization guarantees.
View ArticleComment by HolyBlackCat on How to turn off this function in VS CODE
Please don't spam tags. visual-studio, visual-studio-2010, and fixed should be removed, keep the other two. As for the question, you can disable the red color for filenames, but this has nothing to do...
View Article