Skip to content

Fix build with libc++ 22 - #665

Closed
daeho-ro wants to merge 1 commit into
ncmpcpp:masterfrom
daeho-ro:fix-libcxx-22
Closed

daeho-ro wants to merge 1 commit into
ncmpcpp:masterfrom
daeho-ro:fix-libcxx-22

Conversation

@daeho-ro

Copy link
Copy Markdown

Building with libc++ 22 fails:

sift_down.h:49:39: error: no matching function for call to object of type 'LocaleBasedSorting'
comparators.h:69:7: note: candidate template ignored: could not match 'std::pair' against 'operator_brackets_proxy'

libc++ 22 calls the comparator with it[n] instead of *it. For Boost's transform iterator, it[n] is a proxy object, not the element itself. The std::pair and RunnableItem overloads of LocaleBasedSorting are templates, and templates do not convert a proxy to the element type.

Each of the two templates is used with a single type, so this replaces them with plain overloads for those types. Plain overloads convert the proxy, as the existing std::string, Playlist and Song ones already do.

Fixes #663

@arybczak

Copy link
Copy Markdown
Collaborator

Superseded by 10718bb.

@arybczak arybczak closed this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Failure to compile when using libc++ rather than libstdc++

2 participants