emscripten-core / emscripten-core/emscripten

Operator Overloading Error in system/lib/libcxx/include/__algorithm/sort.h

Open
#22,014 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I faced the following error when compiling stxxl (https://github.com/stxxl/stxxl) using Emscripten. It seems there is a bug in `system/lib/libcxx/include/__algorithm/sort.h` header.

version: latest (3.1.60) and 3.1.54

```
/home/sara/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__algorithm/sort.h:614:14: error: no viable overloaded '='
614 | *__begin = _Ops::__iter_move(__pivot_pos);
| ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
You can reproduce the error using the following commands:

```
$ git clone https://github.com/stxxl/stxxl
$ cd stxxl
$ mkdir build
$ cd build
$ emcmake cmake -DBUILD_TESTS=ON ..
$ emmake cmake --build .
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.