mattreecebentley/plf_list

missing std::sort on clang 12

malytomas opened this issue · 1 comments

 /home/runner/work/cage/cage/externals/plf/plf_list/plf_list.h:2790:4: error: no member named 'sort' in namespace 'std'; did you mean simply 'sort'?
                        PLF_SORT_FUNCTION(node_pointers, node_pointer, sort_dereferencer<comparison_function>(compare));
                        ^~~~~~~~~~~~~~~~~
                        sort
/home/runner/work/cage/cage/externals/plf/plf_list/plf_list.h:231:28: note: expanded from macro 'PLF_SORT_FUNCTION'
        #define PLF_SORT_FUNCTION std::sort
                                  ^~~~~

Error appears when compiling with clang 12 or clang 13. Otherwise clang 14 and clang 15 are passing.

I assume it is missing the include algorithm. The preprocesor if looks suspicious to me.

#if !defined(PLF_SORT_FUNCTION) || defined(PLF_CPP20_SUPPORT)

The PLF_SORT_FUNCTION is defined few lines above, and the PLF_CPP20_SUPPORT is not defined.

Should be fixed now, thanks-