Peter Dimov
Peter Dimov
`deque`/`queue` is probably better. ``` #include #include #include #include #include template void pop_front( std::deque & v ) { v.pop_front(); } template void pop_front( std::vector & v ) { v.erase( v.begin()...
``` N=1000000, M=1: vector: 31 ms deque: 33 ms N=1000000, M=10: vector: 52 ms deque: 34 ms N=1000000, M=100: vector: 282 ms deque: 34 ms N=1000000, M=1000: vector: 2516 ms...
> As the main copyright holder of `date`, I have no intention of requiring the license attribution on non-source code. Then you shouldn't have used a license that requires it.
Yes, I did read this section; it would be much simplified by my suggested addition. > Blindly taking a seed and xor-ing that seed to any algorithm's result sounds dangerous...
There are alternative approaches to this, but I don't like them. Such as for instance `uhash` having a constructor taking `int` and constructing `hasher` with it in `op()` instead of...
Something like ``` template class uhash { private: std::tuple args_; public: using result_type = typename Hasher::result_type; explicit uhash( Args... args ): args_( args... ) { } template result_type operator()(T const&...
Or, after looking at your examples more closely, make that ``` template explicit uhash(U&&... u): args_(std::forward(u)...) {} ``` and then ``` template struct process_seeded_hash: uhash { process_seeded_hash(): uhash(get_process_seed()) {} };...
I didn't think of that, was assuming a specialization for the no-args case. On third thought though, I take back the forwarding constructor, don't want default-constructability in the argumentful case....
You haven't included ``.
Is an unencoded `+` allowed in a URL?