Oh look, my reply to Heb Sutter's tweet is in his talk.
https://youtu.be/6lurOCdaj0Y
https://youtu.be/6lurOCdaj0Y
After benchmarking and testing some "normalize" algorithms, I just found out that even Poco library's implementation is faulty and not compatible with the RFC.
You'll find the benchmarks in the benchmark directory of the project.
And here's a test:
https://godbolt.org/z/T4jod8
And twitter thread to follow upon this; thanks to those who contributed their time for this, but I'm not gonna put that much time into this algorithm, it's not in a performance bottleneck of the framework at this point.
https://twitter.com/the_moisrex/status/1322644648435818503?s=20
Benchmark results on quick-bench (but of course 2 of those algorithms are buggy so it's not completely fair):
https://quick-bench.com/q/sT2UaEgvd9HpRCD5AZ6vgBbFWcs
You'll find the benchmarks in the benchmark directory of the project.
And here's a test:
https://godbolt.org/z/T4jod8
And twitter thread to follow upon this; thanks to those who contributed their time for this, but I'm not gonna put that much time into this algorithm, it's not in a performance bottleneck of the framework at this point.
https://twitter.com/the_moisrex/status/1322644648435818503?s=20
Benchmark results on quick-bench (but of course 2 of those algorithms are buggy so it's not completely fair):
https://quick-bench.com/q/sT2UaEgvd9HpRCD5AZ6vgBbFWcs
Found another GCC bug; is it a known issue or I should report this?
https://godbolt.org/z/xWadq6
https://godbolt.org/z/xWadq6
Web++: A C++ Web Framework
Found another GCC bug; is it a known issue or I should report this? https://godbolt.org/z/xWadq6
Here's a work around for this GCC 10.2.0 bug:
https://godbolt.org/z/3x98Y9
https://godbolt.org/z/3x98Y9
float and double is still not implemented for std::to_chars in GCC's STL!
So it's not working for double. Do I have to go and implement the whole thing myself now?
So it's not working for double. Do I have to go and implement the whole thing myself now?
Web++: A C++ Web Framework
Why can't we just return a "type"? wouldn't that be cooler and simplify TMP in general?
One of the alternatives to that code, is to use this "lazy evaluated" alternative to std::conditional_t.
This
- join multiple types that can be converted to strings
- it finds the best allocator among them by ranking them
- it'll only require one allocation
Here's the source: https://github.com/the-moisrex/webpp/blob/dev/core/include/webpp/strings/join.hpp
string::join will help you:- join multiple types that can be converted to strings
- it finds the best allocator among them by ranking them
- it'll only require one allocation
Here's the source: https://github.com/the-moisrex/webpp/blob/dev/core/include/webpp/strings/join.hpp
With the help of TaskWarrior and the two bash script files, gtask and gtask-markdown in the project, we can easily add the TODO table in the README.md file so every visitor can easily know about them and hopefully that'll help them to contribute more easily.
Seriously pro tip in C++20 concepts:
Do NOT use your instances of your concepts (the types that match your concepts) directly if they're going to be all over the place.
You WILL change the concept at some point. Use middle-man type aliases to extract information out of them.
Do NOT use your instances of your concepts (the types that match your concepts) directly if they're going to be all over the place.
You WILL change the concept at some point. Use middle-man type aliases to extract information out of them.
Web++: A C++ Web Framework
Seriously pro tip in C++20 concepts: Do NOT use your instances of your concepts (the types that match your concepts) directly if they're going to be all over the place. You WILL change the concept at some point. Use middle-man type aliases to extract informationβ¦
I think I should propose this to be added to the C++ Core Guideline if it's not already there.
It could get really messy if you don't follow this. Trust me, I currently getting bitten by it already! π
It could get really messy if you don't follow this. Trust me, I currently getting bitten by it already! π
You can pass
I'm using this for passing allocators in any order; there was simpler solutions for that but allocators don't usually support copy assignment operator but do support copy constructors.
std::tuple's elements in any order with this.I'm using this for passing allocators in any order; there was simpler solutions for that but allocators don't usually support copy assignment operator but do support copy constructors.