Ugh, maybe I'm just wayyyy too deep in a metaprogramming rabbit hole and I can't see the obvious solution. The only options I see are horrendous compile times, horrible hacks or intrusive changes like a cookie on each concepts
8.5.2025 04:08Ugh, maybe I'm just wayyyy too deep in a metaprogramming rabbit hole and I can't see the obvious solution. The only options I see...In this context, `Next` may instantiate a concept recursively, which is bad. I want to drop that branch, and select the one using `Next2`.
Simply wrapping `can_do` in a sfinae expression worked for some compilers, but now instantiating a concept could result in a hard error depending on the order of evaluation of the compiler chooses, which really really bad.
8.5.2025 03:24In this context, `Next` may instantiate a concept recursively, which is bad. I want to drop that branch, and select the one using...More info on my situation:
I have a type that kinda looks like this:
template<typename Next1, typename Next2>
struct type {
Next n;
Next2 n2;
template<typename T> requires can_do<Next, T>
auto do_it() -> T {
n.template do_it<T>();
}
template<typename T> requires can_do<Next2, T>
auto do_it() -> T {
n2.template do_it<T>();
}
};
So... to make concepts work in a recursive context, I just have to wrap the concept in a sfinae expression, then use mutable constexpr tricks to instantiate new types so that the compiler don't do hard error when trying to evaluate a constraint cycle?
Is there any easy way to make instantiating a concept be a soft error?
8.5.2025 03:16So... to make concepts work in a recursive context, I just have to wrap the concept in a sfinae expression, then use mutable constexpr...Concepts and sfinae are conspiring against me pls help 😭
24.4.2025 03:44Concepts and sfinae are conspiring against me pls help 😭#cplusplus #cpp #SFINAEI need to roll my own std::optional for the fourth time because I need to support references lets goooooooo
19.3.2025 01:57I need to roll my own std::optional for the fourth time because I need to support references lets goooooooo#cplusplus #cppExplanation: I'm dealing with recursive structures. Concepts really don't like when you do stuff recursively. SFINAE on the other hand gracefully handles self referential conditions as long as you hit an incomplete type while doing so. There's no such thing as an incomplete concepts.
I do everything with concepts mostly, but there are specific places that sfinae will shine!
18.3.2025 04:42Explanation: I'm dealing with recursive structures. Concepts really don't like when you do stuff recursively. SFINAE on the other...Me using c++20 after one month: concepts are so nice! I will only use concepts for everything, make all concepts subsume exactly how it should!!!1!!1!
Me using c++20 after two years: uh, sfinae is pretty good right?
18.3.2025 04:37Me using c++20 after one month: concepts are so nice! I will only use concepts for everything, make all concepts subsume exactly how it...Yeah... I switched to fennec and librewolf and I'll probably just wait for ladybird and servo to become usable in the daily. Their "clarification" was a bunch of corporate gaslighting without any meaningful changes. You really think I don't know the difference between a license and ownership? You really think I'm that stupid??
That was the last straw for me. I'm done with Mozilla, probably for ever. I think you all should do the same.
#firefox #mozilla #fennecbrowser #librewolf
1.3.2025 22:07Yeah... I switched to fennec and librewolf and I'll probably just wait for ladybird and servo to become usable in the daily. Their...At least we don't put strawberries in that spaghetti, that would be outrageous
12.2.2025 22:00At least we don't put strawberries in that spaghetti, that would be outrageousItalians: Starting to be in peace with the idea that there exists some people that do enjoy pineapple on their pizzas
Québecois: Pizza-Ghetti 🤪
#food #pizza #spaghetti #canada #quebec
12.2.2025 21:59Italians: Starting to be in peace with the idea that there exists some people that do enjoy pineapple on their pizzasQuébecois:...Yup, that's my cat's personality
#cat #CatsOfMastodon #cats #CatsOfFediverse
27.1.2025 22:22Yup, that's my cat's personality#cat #CatsOfMastodon #cats #CatsOfFediverseI have a bluesky account now! Follow me there too! @gracicot.bsky.social #bluesky
17.1.2025 22:12I have a bluesky account now! Follow me there too! @gracicot.bsky.social #blueskyIt's done. I deleted my twitter account. Goodbye, I won't miss you. I found a much better and saner community here
11.11.2024 17:47It's done. I deleted my twitter account. Goodbye, I won't miss you. I found a much better and saner community here#twittermigration...I couldn't drive up north this time but I'm happy I was able to see it and take a few shots!
11.10.2024 02:43I couldn't drive up north this time but I'm happy I was able to see it and take a few shots!YouTube recommended alt right videos on the top of my stream only three times this week, despite clicking on "not interested" again 🙄
2.10.2024 20:41YouTube recommended alt right videos on the top of my stream only three times this week, despite clicking on "not interested"...Context: https://developercommunity.visualstudio.com/t/accept-invalid-MSVC-accept-invalid-pac/10756709
1.10.2024 19:36Context: https://developercommunity.visualstudio.com/t/accept-invalid-MSVC-accept-invalid-pac/10756709Breaking news: MSVC developer learns that a syntax error is not a substitution failure
1.10.2024 12:38Breaking news: MSVC developer learns that a syntax error is not a substitution failure#cpp #cplusplus #msvcclang-tidy ruining my day again 😭
Compile with clang-18? No problem in the code.
Run clang-tidy? over 20 compile error.
Upgrade to llvm 19? Haha, clang-tidy emits a bogous compiler error about missing parenthesis on __has_builtin, but I don't use that in my code, and only use headers from the standard library.
7.9.2024 00:45clang-tidy ruining my day again 😭Compile with clang-18? No problem in the code.Run clang-tidy? over 20 compile error.Upgrade to llvm 19?...Gotta love C++ initialization 🙃
29.7.2024 03:19Gotta love C++ initialization 🙃 #cplusplus #cpp⬆️
⬇️