Skip to content

Commit

Permalink
Workaround for Xcode (version 15+?) compile errors when using std::so…
Browse files Browse the repository at this point in the history
…rt().
  • Loading branch information
lawmurray committed Oct 27, 2024
1 parent 57f8367 commit 0980e0d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ executors:

mac:
macos:
xcode: 15.4.0
xcode: 16.0.0
environment:
CODENAME: mac
OMP_NUM_THREADS: 4
Expand Down
2 changes: 1 addition & 1 deletion libraries/Standard/src/primitive/primitive.birch
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ function is_sorted<Type>(x:Type[_]) -> Boolean {
function sort<Type>(x:Type[_]) -> Type[_] {
let y <- x;
cpp{{
std::sort(y.begin(), y.end());
std::stable_sort(y.begin(), y.end());
}}
return y;
}
Expand Down
4 changes: 4 additions & 0 deletions numbirch/numbirch/array/ArrayIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class ArrayIterator {
using const_reference = const T&;
using iterator_category = std::random_access_iterator_tag;

ArrayIterator() : buf(nullptr), shp(), pos(0) {
//
}

explicit ArrayIterator(T* buf, const ArrayShape<D> shp,
const difference_type pos) :
buf(buf),
Expand Down

0 comments on commit 0980e0d

Please sign in to comment.