Comment by HolyBlackCat on Why '-pedantic-errors' flag/switch is not catching...
@Peter The "escape routes ... only for use in system headers" part apparently only applies to __intN__ and __extension__ extensions. Some other extensions are unavoidable.
View ArticleComment by HolyBlackCat on What is the correct way to implement a custom...
There are built-in range formatters, you shouldn't write your own.
View ArticleComment by HolyBlackCat on Compile and Run dynamic C++ code inside react...
Termux ships Clang for android, copy what they do.
View ArticleComment by HolyBlackCat on class template argument deduction when non-type...
"there is a good indication this will become possible in C++26" Huh! Is there a proposal
View ArticleComment by HolyBlackCat on std::print() wrapper with altered format
decoratedPrint<"format">(args...) or decoratedPrint("format"_c, args...) are possible, but that's silly.
View ArticleComment by HolyBlackCat on std::print() wrapper with altered format
@康桓瑋std::format_string still validates the decoratedPrint's arguments. The only possible source of errors is incorrectly modifying the format string inside of it.
View ArticleComment by HolyBlackCat on Is it ok to cast a temporary object to rvalue...
Is the function under your control? Can you change the parameter to a pointer?
View ArticleComment by HolyBlackCat on Unable to cross compile simple C program using...
Using a full triplet --target=ppc64le-linux-gnu seems to work. I also needed -nostdlib to fix the next error.
View ArticleComment by HolyBlackCat on error, "SFML/Graphics.hpp: No such file or directory"
Uninstall winlibs and replace it with msys2. Msys2 not only lets you install the compiler, but also a compatible SFML.
View ArticleComment by HolyBlackCat on Why the order of elements doesn't matter in a class?
Function bodies are processed separately after the rest of the class.
View ArticleComment by HolyBlackCat on Why do the IO library and the Diagnostic library...
When you implement << and >> for your class, they accept a reference to the stream base class. How else could that work? (Yes, there are some possible alternative designs, but inheritance...
View ArticleComment by HolyBlackCat on PyBind11 produces pyd file without any class i...
When you run python, is the .pyd in the current directory? If you print something inside of PYBIND11_MODULE, does it get printed when you import the module?
View ArticleComment by HolyBlackCat on Why do some parts of the C++ standard library use...
When you implement << and >> for your class, they accept a reference to the stream base class. How else could that work? (Yes, there are some possible alternative designs, but inheritance...
View ArticleComment by HolyBlackCat on Is `*this = *obj` safe to use in C++?
@anatolyg Yep, I suggest that in the last paragraph.
View ArticleComment by HolyBlackCat on I'm stuck at an error when installing the DPP library
Please add the output of which cmake and which g++.
View ArticleComment by HolyBlackCat on I'm stuck at an error when installing the DPP library
What makes you think they don't support mingw? Just tried building it with it, didn't have any issues.
View ArticleComment by HolyBlackCat on Why are some types left uninitialized when default...
"could lead to much worse errors" I guess. Even destroying them would crash.
View ArticleComment by HolyBlackCat on Tricks to avoid pointer aliasing in generic code
Perhaps make local pointers to the iterator contents, and make them __restrict?
View ArticleAnswer by HolyBlackCat for Why are some types left uninitialized when default...
They (vectors and strings) would be very hard to use correctly if they could be uninitialized.Let's say the vector is designed so that std::vector<int> v; is uninitialized. If after that you do v...
View ArticleComment by HolyBlackCat on Is it safe to pass a lambda that is going out of...
This is impossible to answer in general (depends on how exactly you store the lambda). If you store it in std::function then you're safe, it always stores a copy.
View Article