Comment by HolyBlackCat on Makefile: How does a header file change trigger a...
@yapkm01 Another way to think about it: Which command to use to rebuild the file is decided independently from whether to rebuild it at all. The command is taken from the $(BUILD)/%.o: %.cc pattern...
View ArticleComment by HolyBlackCat on C++ this pointer
@molbdnilo "&this makes as much sense as &1" It does make sense, because there is an implicit this parameter in member functions. Inability to take its address is an artificial limitation.
View ArticleComment by HolyBlackCat on MSVC compiles C++ code in x86 but not x64
The least you can do is to provide the exact, full error message from the Output tab, in one piece (upload to pastebin if it's too long). But disentangling the code into a minimal example is your...
View ArticleAnswer by HolyBlackCat for Specializing std::tuple_size and std::get for...
The standard library is simply not designed to work with custom tuple-like types. Some other parts of the language do support them (structued bingings, and that's about it)You are not allowed to add...
View ArticleComment by HolyBlackCat on Compile time memcpy from double to std::int64_t
See if __builtin_bit_cast(std::int64_t, a_val) works on your compiler.
View ArticleComment by HolyBlackCat on Compile time memcpy from double to std::int64_t
Neither of those works at compile-time.
View ArticleComment by HolyBlackCat on Object direct-initialization with enumerator value...
@NathanOliver I might be missing something, but since this isn't a valid function declaration (as evident from the errors), shouldn't the parsing fall back to parsing this as a non-function? Should we...
View ArticleComment by HolyBlackCat on Can't understand the member lookup rule in C++23...
You have to read [class.member.lookup] from the beginning. Don't start from the middle. Yes, it's quite dense, but it expains everything. In particular, it does explain the S(...) notation they came up...
View ArticleComment by HolyBlackCat on What's the difference between the WIN32 and _WIN32...
@FlorianWinter I think it's fairly obvious. What are you trying to say? (Is this a nitpick about cygwin?)
View ArticleComment by HolyBlackCat on Where manually configured keyboard shortcut...
Same directory as settings.json, called keybindings.json.
View ArticleAnswer by HolyBlackCat for Where manually configured keyboard shortcut...
It is at ~/.config/Code/User/keybindings.json. In the same directory as settings.json.You can figure this out by opening the keyboard settings, pressing Open JSON in the top-right corner, and looking...
View ArticleComment by HolyBlackCat on std::cout problems with specific german characters...
You shouldn't need to set the locale. Ensure that all source files are saved as UTF-8.
View ArticleComment by HolyBlackCat on ascii art as an object in c++
The first thing that comes to mind is storing the coordinates of the car (X and Y, two numbers), and a 2D array of the car art. Then when drawing the array, offset it by the coordinates.
View ArticleComment by HolyBlackCat on template issue in class calling
Please make ONE code snippet that we can paste and immediately see the same error as you do. Confirm using an online compiler that your snippet indeed reproduces the error. If you want to add comments...
View ArticleComment by HolyBlackCat on C++ this pointer
@Caleth I guess I should've said "body is visible" instead of "gets inlined". :P
View ArticleComment by HolyBlackCat on MSVC compiles C++ code in x86 but not x64
The least you can do is to provide the exact, full error message from the Output tab, in one piece (upload to pastebin if it's too long). But disentangling the code into a minimal example is your...
View ArticleComment by HolyBlackCat on Is There a Better Way to use 24 bit Color in the...
Honestly, why use the terminal at all if you're starting to see performance issues? Pick some graphical API and use that.
View ArticleComment by HolyBlackCat on C++17 inline static member with template
Since Clang and GCC do accept this, looks like a MSVC bug.
View ArticleComment by HolyBlackCat on Exported typeinfo for pure virtual class in a...
We require all code to be in the question as text. Would be nice to reduce it to something that doesn't depend on Qt too.
View ArticleComment by HolyBlackCat on C++ overloading resolution when passing...
@n.m.couldbeanAI Of couse you can: gcc.godbolt.org/z/fvP7dWxfG That would only be true for non-const references.
View Article