mattreecebentley / plf_list

A drop-in replacement for std::list with 293% faster insertion, 57% faster erasure, 17% faster iteration and 77% faster sorting on average. 20-24% speed increase in use-case testing.
https://plflib.org/list.htm
zlib License
151 stars 21 forks source link

Allow plf_list.h to build in MSVC C++17 with unused parameter warnings #15

Closed cscrimge closed 4 years ago

cscrimge commented 4 years ago

I believe that C++17 causes these warnings to trigger because the parameters in question are only used in one side of an if constexpr() block

mattreecebentley commented 4 years ago

Had a look, that's a bug in MSVC which you need to report. If an expression is constexpr, that's not the same as pre-processing, so the last_endpoint_node should not, in my view, be reported as unused. I will also report the bug when I have the time.

cscrimge commented 4 years ago

I agree. I have reported the issue here: https://developercommunity.visualstudio.com/content/problem/929724/incorrect-warning-c4100-in-template-function.html

mattreecebentley commented 4 years ago

Thanks, have upvoted it-

On Wed, 26 Feb 2020 at 07:32, Chris Scrimgeour notifications@github.com wrote:

I agree. I have reported the issue here: https://developercommunity.visualstudio.com/content/problem/929724/incorrect-warning-c4100-in-template-function.html

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mattreecebentley/plf_list/pull/15?email_source=notifications&email_token=ABE4FIRCAQFYRUEWQ6RJKCLREVP27A5CNFSM4KXOZOJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM47FPQ#issuecomment-591000254, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE4FISNFL7S6R5E4XNUOJ3REVP27ANCNFSM4KXOZOJA .