Comment by HolyBlackCat on Why is this concept true?
So TL;DR std::get is not SFINAE-friendly.
View ArticleComment by HolyBlackCat on Error running opencv in C++ using visual studio
PATH is only for executables, it doesn't do anything for headers and libraries. Use the -I flag to tell the compiler where to look for headers, then -L for where to look for .a files, and link the .a...
View ArticleComment by HolyBlackCat on My compiler keeps compiling too much for just a...
Show the compilation log as text.
View ArticleComment by HolyBlackCat on Undefined reference to `WinMain@16'
You're simply missing the main() function, or aren't compiling the file with it. The duplicate is a bit misleading.
View ArticleComment by HolyBlackCat on C++: overload resolutionthrough return type?
@Caleth "SFINAE-caught error" perhaps.
View ArticleComment by HolyBlackCat on Why Microsoft so persistent in use size_t instead...
"Having many declarations I "hate" this name for typing '::' which I often mistype like ';:'" You'll get used to it (and stop making typos) with more practice.
View ArticleComment by HolyBlackCat on Get rid of the default element
You're adding that element somewhere. We can't now where you do it without seeing the code.
View ArticleComment by HolyBlackCat on Trying to run basic C++ Program and it won't run...
Are you saying this works for you?
View ArticleComment by HolyBlackCat on Installing package via vcpkg causing a...
This is a poor solution. You should fix your include paths instead of modifying files managed by a package manager.
View ArticleComment by HolyBlackCat on Debugging a Folder in VS Code with C/C++ Runner...
Why do you think the Debug folder button even exists? Normally you'd do this by configuring launch.json.
View ArticleComment by HolyBlackCat on Const reference: variable used in loop condition...
@Swift-FridayPie You're allowed to cast the const away, as long as the target object isn't actually const. That's what const_cast is for after all. (Or even without the cast, you can access the target...
View ArticleComment by HolyBlackCat on c++ intelliSense cannot distinguish between...
Please add a minimal reproducible example that we can use to reproduce the problem. Also please provide unedited screenshots (we need a small artificial example anyway, so it won't contain any...
View ArticleComment by HolyBlackCat on No concept subsumption with template parameter pack?
Hmm, so you're saying template <Fooable... Ts> desugars to a fold expression?
View ArticleComment by HolyBlackCat on Do I need `std::launder` when working with unions?
@wohlstad This got asked in TCCPP discord, and I realized I don't know the answer.
View ArticleComment by HolyBlackCat on Do I need `std::launder` when working with unions?
Since we're language-lawyering this, do you have the source for the first paragraph? Is it just eel.is/c++draft/class.union#general-2?
View ArticleComment by HolyBlackCat on msys2/mintty pasting mysterious characters
You can try asking this on unix.stackexchange.com. A shame it got closed here.
View ArticleComment by HolyBlackCat on Compiling wxWidgets applications in VS Code using...
Compare the command ran by the makefile with the one you run in tasks.json.
View ArticleComment by HolyBlackCat on int a = strncmp("zbcd", "abcd", 3); a = 1. WHY?
"WHY?" Why what? What return value did you expect and why? Did you read the documentation?
View ArticleComment by HolyBlackCat on Compiled with MSYS2 but DLL not found running in CMD
How to debug DLL issues in MinGW?
View ArticleComment by HolyBlackCat on std::ranges::sort not working with non-default...
Non-default <=> doesn't generate == because it's slow in general (e.g. for strings == can compare sizes and stop early if not equal, while <=> can't). And even when you do default...
View Article