Skip to content

Cannot compile helper tools with libc++ #10

Description

@viniciusferrao

As discussed on #9 it seems that libc++ does not implement the spaceship operator, which breaks the library when libc++ is used instead of libstdc++:

On macOS, it defaults to libc++, and it's impossible to compile the helper tools:

FAILED: merge/CMakeFiles/i18n-merge-pot.dir/merge.cpp.o 
/opt/local/bin/clang++ -DFMT_LOCALE -DFMT_SHARED -isystem /opt/local/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk -std=c++20 -MD -MT merge/CMakeFiles/i18n-merge-pot.dir/merge.cpp.o -MF merge/CMakeFiles/i18n-merge-pot.dir/merge.cpp.o.d -o merge/CMakeFiles/i18n-merge-pot.dir/merge.cpp.o -c /Users/ferrao/Documents/Development/i18n++/merge/merge.cpp
/Users/ferrao/Documents/Development/i18n++/merge/merge.cpp:15:44: error: invalid operands to binary expression ('const std::optional<std::string>' (aka 'const optional<basic_string<char, char_traits<char>, allocator<char>>>') and 'const std::optional<std::string>')
    std::strong_ordering order = a.context <=> b.context;
                                 ~~~~~~~~~ ^   ~~~~~~~~~

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions