Skip to content

Commit f832f01

Browse files
author
Drew Hubley
committed
Fixed CI added OSX 13 and GCC 12
1 parent edc67a3 commit f832f01

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

.github/workflows/linux.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,24 @@ defaults:
1212
shell: bash -e -l {0}
1313
jobs:
1414
build:
15-
runs-on: ubuntu-20.04
1615
name: ${{ matrix.sys.compiler }} ${{ matrix.sys.version }} - ${{ matrix.sys.name }}
1716
strategy:
1817
fail-fast: false
1918
matrix:
2019
sys:
21-
- {compiler: clang, version: '15', name: assert, flags: -DXTENSOR_ENABLE_ASSERT=ON}
22-
- {compiler: clang, version: '16', name: column-major, flags: -DDEFAULT_COLUMN_MAJOR=ON}
23-
- {compiler: gcc, version: '8', name: openmp, flags: -DXTENSOR_USE_OPENMP=ON}
24-
- {compiler: gcc, version: '9', name: noexcept, flags: -DXTENSOR_DISABLE_EXCEPTIONS=ON}
25-
- {compiler: gcc, version: '10', name: xsimd, flags: -DXTENSOR_USE_XSIMD=ON}
26-
- {compiler: gcc, version: '11', name: c++17, flags: -DCPP17=ON}
27-
- {compiler: gcc, version: '11', name: xsimd-tbb, flags: -DXTENSOR_USE_XSIMD=ON -DXTENSOR_USE_TBB=ON}
28-
- {compiler: gcc, version: '11', name: tbb, flags: -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=$CONDA_PREFIX/include -DTBB_LIBRARY=$CONDA_PREFIX/lib}
29-
20+
- {os: ubuntu-20.04, compiler: clang, version: '15', name: assert, flags: -DXTENSOR_ENABLE_ASSERT=ON}
21+
- {os: ubuntu-20.04, compiler: clang, version: '16', name: column-major, flags: -DDEFAULT_COLUMN_MAJOR=ON}
22+
- {os: ubuntu-20.04, compiler: gcc, version: '8', name: openmp, flags: -DXTENSOR_USE_OPENMP=ON}
23+
- {os: ubuntu-20.04, compiler: gcc, version: '9', name: noexcept, flags: -DXTENSOR_DISABLE_EXCEPTIONS=ON}
24+
- {os: ubuntu-22.04, compiler: gcc, version: '10', name: xsimd, flags: -DXTENSOR_USE_XSIMD=ON}
25+
- {os: ubuntu-22.04, compiler: gcc, version: '11', name: c++17, flags: -DCPP17=ON}
26+
- {os: ubuntu-22.04, compiler: gcc, version: '11', name: xsimd-tbb, flags: -DXTENSOR_USE_XSIMD=ON -DXTENSOR_USE_TBB=ON}
27+
- {os: ubuntu-22.04, compiler: gcc, version: '11', name: tbb, flags: -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=$CONDA_PREFIX/include -DTBB_LIBRARY=$CONDA_PREFIX/lib}
28+
- {os: ubuntu-22.04, compiler: gcc, version: '12', name: c++17, flags: -DCPP17=ON}
29+
- {os: ubuntu-22.04, compiler: gcc, version: '12', name: xsimd-tbb, flags: -DXTENSOR_USE_XSIMD=ON -DXTENSOR_USE_TBB=ON}
30+
- {os: ubuntu-22.04, compiler: gcc, version: '12', name: tbb, flags: -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=$CONDA_PREFIX/include -DTBB_LIBRARY=$CONDA_PREFIX/lib}
31+
runs-on: ${{ matrix.sys.os }}
3032
steps:
31-
3233
- name: Setup GCC
3334
if: ${{ matrix.sys.compiler == 'gcc' }}
3435
run: |
@@ -39,7 +40,6 @@ jobs:
3940
echo "CC=$CC" >> $GITHUB_ENV
4041
CXX=g++-$GCC_VERSION
4142
echo "CXX=$CXX" >> $GITHUB_ENV
42-
4343
- name: Setup clang
4444
if: ${{ matrix.sys.compiler == 'clang' }}
4545
run: |

.github/workflows/osx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os:
21-
- 11
2221
- 12
22+
- 13
2323

2424
steps:
2525

include/xtensor/xutils.hpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -807,12 +807,12 @@ namespace xt
807807
{
808808
using base_type = A;
809809
using value_type = typename A::value_type;
810-
using reference = typename A::reference;
811-
using const_reference = typename A::const_reference;
812-
using pointer = typename A::pointer;
813-
using const_pointer = typename A::const_pointer;
814-
using size_type = typename A::size_type;
815-
using difference_type = typename A::difference_type;
810+
using reference = value_type&;
811+
using const_reference = const value_type&;
812+
using pointer = typename std::allocator_traits<A>::pointer;
813+
using const_pointer = typename std::allocator_traits<A>::const_pointer;
814+
using size_type = typename std::allocator_traits<A>::size_type;
815+
using difference_type = typename std::allocator_traits<A>::difference_type;
816816

817817
tracking_allocator() = default;
818818

@@ -835,9 +835,13 @@ namespace xt
835835
return base_type::allocate(n);
836836
}
837837

838-
using base_type::construct;
839838
using base_type::deallocate;
839+
840+
// Construct and destroy are removed in --std=c++-20
841+
#if ((defined(__cplusplus) && __cplusplus < 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG < 202002L))
842+
using base_type::construct;
840843
using base_type::destroy;
844+
#endif
841845

842846
template <class U>
843847
struct rebind

test/test_xbuffer_adaptor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ namespace xt
7676
{
7777
public:
7878

79-
size_t* allocate(size_t n, const void* hint = 0)
79+
size_t* allocate(size_t n)
8080
{
81-
size_t* res = std::allocator<size_t>::allocate(n, hint);
81+
size_t* res = std::allocator<size_t>::allocate(n);
8282
// store the size into the result so we can
8383
// check if the size is correct when we deallocate.
8484
res[0] = n;

0 commit comments

Comments
 (0)