if consteval {
if constexpr (foo) {
if (bar) {
throw error;
}
}
}
if consteval {
if constexpr (foo) {
if (bar) {
throw error;
}
}
}
constexpr auto FractBits = 10;
using Fixed = fp32_t<FractBits>;
{ … auto x = Fixed(45.678); … }
constexpr auto FractBits = 10;
using Fixed = fp32_t<FractBits>;
{ … auto x = Fixed(45.678); … }
🤯
With that, who needs runtime tests? Just compile!
🤩
🤯
With that, who needs runtime tests? Just compile!
🤩
My head does not wrap around the syntax, however. Why `template for(. . .)` instead of `for constexpr(. . .)`???
My head does not wrap around the syntax, however. Why `template for(. . .)` instead of `for constexpr(. . .)`???
CCC Simple modules, no imports,
Simple ref types nullability, val/var, default init/clinit.
Compiletime eval, constexpr, rmw vs atomic vs ordering.
CCC Simple modules, no imports,
Simple ref types nullability, val/var, default init/clinit.
Compiletime eval, constexpr, rmw vs atomic vs ordering.
Feels like a lot for a config check, but idk what else would be portable
Feels like a lot for a config check, but idk what else would be portable
blog.jetbrains.com/clion/2025/0...
blog.jetbrains.com/clion/2025/0...
How a small bug report and "yeah, shouldn't be too hard to fix" ends up in the second refactoring in three days :/
How a small bug report and "yeah, shouldn't be too hard to fix" ends up in the second refactoring in three days :/
C is yassified assembly.
Assembly is yassified machine code.
yaaas qween constexpr legend std::move the house down noexcept slay queen template mama and I OOP auto&& daddy work concept my wig
C is yassified assembly.
Assembly is yassified machine code.
yaaas qween constexpr legend std::move the house down noexcept slay queen template mama and I OOP auto&& daddy work concept my wig
template <class C, class R, class… Args>
R (* GetFn (R (C::*m) (Args…))) (void *, Args…) {
typedef R (C::* MemFn) (Args…);
typedef R (* RegFn) (void *, Args…);
constexpr auto x = sizeof (MemFn) - sizeof (RegFn);
...
template <class C, class R, class… Args>
R (* GetFn (R (C::*m) (Args…))) (void *, Args…) {
typedef R (C::* MemFn) (Args…);
typedef R (* RegFn) (void *, Args…);
constexpr auto x = sizeof (MemFn) - sizeof (RegFn);
...
constexpr auto myFoldout = Foldout("title",
Label("label"),
Field(&MyData::MyField)
);
and then at runtime do
foldoutInstance = bind(myFoldout, myDataInstance)
constexpr auto myFoldout = Foldout("title",
Label("label"),
Field(&MyData::MyField)
);
and then at runtime do
foldoutInstance = bind(myFoldout, myDataInstance)
So I'm having this (possibly bad) idea that I could build a whole branch in a constexpr expression (and I've got that working)
So I'm having this (possibly bad) idea that I could build a whole branch in a constexpr expression (and I've got that working)
Bora Microsoft, tem gente querendo trabalhar aqui
Bora Microsoft, tem gente querendo trabalhar aqui
My compile time code is mostly constexpr these days which is quite fast. Thanks!
5/5
My compile time code is mostly constexpr these days which is quite fast. Thanks!
5/5
With my metacompiler implementation, the constexpr functions that act as continuations require the ability to isolate function arguments, which is to say variadic indexing.
4/5
With my metacompiler implementation, the constexpr functions that act as continuations require the ability to isolate function arguments, which is to say variadic indexing.
4/5
Practical TMP: A C++17 Compile Time Register Machine
From there I used the same idea but switched to constexpr functions which in effect allows one to "inject" function code directly into C++ compiler's syntax trees (gcc/clang).
2/5
Practical TMP: A C++17 Compile Time Register Machine
From there I used the same idea but switched to constexpr functions which in effect allows one to "inject" function code directly into C++ compiler's syntax trees (gcc/clang).
2/5
Watch Daniel Nikpayuk (@nikpayuk.bsky.social): "A universal data structure for compile time use."
Explore constexpr restrictions & paradigms for designing potent, compile-time data structures.
🔗 youtu.be/UAmyfaXpPiA
#CppNorth #cpp #constexpr
Watch Daniel Nikpayuk (@nikpayuk.bsky.social): "A universal data structure for compile time use."
Explore constexpr restrictions & paradigms for designing potent, compile-time data structures.
🔗 youtu.be/UAmyfaXpPiA
#CppNorth #cpp #constexpr
godbolt.org/z/zP4WKPeMx
godbolt.org/z/zP4WKPeMx