Answer by HolyBlackCat for Is std::source_location guarenteed to reuse the...
No, of course not. std::source_location::current() returns by value, it can't guarantee that.
View ArticleComment by HolyBlackCat on Function only compiles in owning project
Why can templates only be implemented in the header file?
View ArticleComment by HolyBlackCat on Is std::source_location guaranteed to reuse the...
"Compile-time constant" doesn't imply that every call produces the same address, is it? You could e.g. do foo(const T &a, const T &b); foo(current(), current());, and both temporaries are...
View ArticleComment by HolyBlackCat on Is std::source_location guaranteed to reuse the...
@TedLyngmo Here's a better one.
View ArticleAnswer by HolyBlackCat for Does "automatic storage" now include registers?
The C++ standard doesn't describe registers. The compiler can put whatever it wants in them, but it must do so transparently.I just want to use the correct term when I talk to my colleaguesThe right...
View ArticleComment by HolyBlackCat on Use of the word 'reference' as a return type
Doesn't help what compile? Add the code to your question as text, and add the error.
View ArticleComment by HolyBlackCat on Creating a trivially constructible object from a...
Can you not ensure the buffer is suitably aligned? And then just reinterpret_cast. People will grumble about the lifetimes, but as long as the bytes come from an opaque source, this will never break.
View ArticleWhat are MSYS2 environments? How do I pick one?
MSYS2 is said to have different environments.What are they? How do I choose which one to use? What's the difference between MINGW64 and UCRT64?(This Q&A is intended as a canonical duplicate on this...
View ArticleAnswer by HolyBlackCat for What are MSYS2 environments? How do I pick one?
See the official manual. Following environments are available: UCRT64, MINGW64, CLANG64, CLANGARM64, MSYS.UCRT64 is a good default, MINGW64 is popular too, but the alternatives are explained below.The...
View ArticleComment by HolyBlackCat on How to cross compile SDL2 sources on Windows for...
CMake and ./configure && make are orthogonal. If you use CMake, you don't need the latter.
View ArticleComment by HolyBlackCat on Adding Debugging Support for a Custom Language in...
The official C++ plugin can use one of the several debuggers, including GDB. If you set it to use GDB, you don't need to do anything.
View ArticleComment by HolyBlackCat on why is there no extract method option in visual...
Tag your programming language. All of this is language-dependent. C#?
View ArticleComment by HolyBlackCat on Initializing unque_ptr
@3CxEZiVlQ Apparently SQLWCHAR isn't always equal to wchar_t.
View ArticleComment by HolyBlackCat on How to cross compile SDL2 sources on Windows for...
Isn't there a package with a precompiled SDL on the distro running on the RPI?
View ArticleComment by HolyBlackCat on C++ Macro expanding incorrectly
MSVC is known to have a buggy default preprocessor, try with /Zc:preprocessor. If this doesn't help, please prepare a minimal reproducible example, I'm non reading this whole thing either.
View ArticleComment by HolyBlackCat on How to move std::string into string with different...
What exactly do your traits do? Perhaps it would be easier to make the comparison an external function?
View ArticleComment by HolyBlackCat on Tag dispatching with template specialization /...
Is there a reason to not have a single function and switch on the enum in it?
View ArticleComment by HolyBlackCat on I need help to fix auto suggest
1. Tag your programming language. 2. Do you have any AI extensions enabled?
View ArticleComment by HolyBlackCat on How to get CMake and MSYS2/pacman to work together...
MSVC and MinGW libraries are incompatible. MSYS2 installs MinGW libs. Use a different package manager, e.g. vcpkg.
View Article