New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check for cache #104
Comments
It's fold expression in c++17, you need choose c++17. |
OK, I found this documentation: https://en.cppreference.com/w/cpp/language/fold. ( pack op ... ) where op is the comma operator and pack is |
the op is the comma expression |
While I still can't wrap my head around this fold expression, I tried to see what it does, so I wrote this code:
The last function call looks weird to me, since I passed a enable_cache{ true } but we still eventually skip cache (because of the log_t{}). |
I will explain the intention for you tomorrow:) |
Well, there is bug here, i have fixed it right now, thanks for your checking.
Firstly, i don't want to limit the sequence of enable_cache, as you can see, the enbale_cache can be every where;
In the first line, the need_cache will be false, as there is not enable_cache; |
Thanks for the explanation. I think I finally understood the logic here. That said, I think this line could still be simplified from: ((!b&&(b = need_cache(std::forward<AP>(ap))), false),...); to this (removing the false expression since it's not doing anything): ((!b&&(b = need_cache(std::forward<AP>(ap)))),...); |
yes, you're right, i will remove the false expression. |
Cool! I'm closing this issue then. Thanks for your patience :) |
Hi,
Newbie question. I'm trying to understand the code in http_server.hpp and I'm having a hard time understanding line 172:
Could you please explain why there's a
false
? Eclipse tells me there's a syntax error, by the way.Thanks in advance,
Allister
The text was updated successfully, but these errors were encountered: