forked from mpusz/mp-units
Merge branch 'mpusz:master' into master
This commit is contained in:
14
.github/workflows/ci-conan.yml
vendored
14
.github/workflows/ci-conan.yml
vendored
@@ -61,6 +61,12 @@ jobs:
|
|||||||
compiler: { type: CLANG, version: 12, cc: "clang-12", cxx: "clang++-12" },
|
compiler: { type: CLANG, version: 12, cc: "clang-12", cxx: "clang++-12" },
|
||||||
lib: "libc++"
|
lib: "libc++"
|
||||||
}
|
}
|
||||||
|
- {
|
||||||
|
name: "Ubuntu Clang 13.0.0 + libc++",
|
||||||
|
os: ubuntu-20.04,
|
||||||
|
compiler: { type: CLANG, version: 13, cc: "clang-13", cxx: "clang++-13" },
|
||||||
|
lib: "libc++"
|
||||||
|
}
|
||||||
# In case a Conan docker image will be needed to provide a specific configuration we can use a Docker image as follows
|
# In case a Conan docker image will be needed to provide a specific configuration we can use a Docker image as follows
|
||||||
# - {
|
# - {
|
||||||
# name: "Ubuntu GCC 10.2.0",
|
# name: "Ubuntu GCC 10.2.0",
|
||||||
@@ -89,7 +95,7 @@ jobs:
|
|||||||
if: matrix.config.compiler.type == 'CLANG' && matrix.config.lib == 'libc++'
|
if: matrix.config.compiler.type == 'CLANG' && matrix.config.lib == 'libc++'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt install -y libc++-${{ matrix.config.compiler.version }}-dev libc++abi-${{ matrix.config.compiler.version }}-dev
|
sudo apt install -y libc++-${{ matrix.config.compiler.version }}-dev libc++abi-${{ matrix.config.compiler.version }}-dev libunwind-${{ matrix.config.compiler.version }}-dev
|
||||||
- name: Install Ninja
|
- name: Install Ninja
|
||||||
# TODO Find a proper syntax to make the below work
|
# TODO Find a proper syntax to make the below work
|
||||||
# if: !matrix.config.docker_image
|
# if: !matrix.config.docker_image
|
||||||
@@ -120,6 +126,12 @@ jobs:
|
|||||||
conan profile update settings.compiler.libcxx=${{ matrix.config.lib }} default
|
conan profile update settings.compiler.libcxx=${{ matrix.config.lib }} default
|
||||||
fi
|
fi
|
||||||
conan profile show default
|
conan profile show default
|
||||||
|
- name: Add support for clang-13 to Conan's settings.yml
|
||||||
|
# TODO Remove when Conan will support clang-13
|
||||||
|
if: matrix.config.compiler.type == 'CLANG'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sed -i -e 's/"8", "9", "10", "11", "12"]/"8", "9", "10", "11", "12", "13"]/' ~/.conan/settings.yml
|
||||||
- name: Run Conan Package Tools
|
- name: Run Conan Package Tools
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
|
14
.github/workflows/ci-test-package-cmake.yml
vendored
14
.github/workflows/ci-test-package-cmake.yml
vendored
@@ -65,6 +65,12 @@ jobs:
|
|||||||
compiler: { type: CLANG, version: 12, cc: "clang-12", cxx: "clang++-12" },
|
compiler: { type: CLANG, version: 12, cc: "clang-12", cxx: "clang++-12" },
|
||||||
lib: "libc++"
|
lib: "libc++"
|
||||||
}
|
}
|
||||||
|
- {
|
||||||
|
name: "Ubuntu Clang 13.0.0 + libc++",
|
||||||
|
os: ubuntu-20.04,
|
||||||
|
compiler: { type: CLANG, version: 13, cc: "clang-13", cxx: "clang++-13" },
|
||||||
|
lib: "libc++"
|
||||||
|
}
|
||||||
# In case a Conan docker image will be needed to provide a specific configuration we can use a Docker image as follows
|
# In case a Conan docker image will be needed to provide a specific configuration we can use a Docker image as follows
|
||||||
# - {
|
# - {
|
||||||
# name: "Ubuntu GCC 10.2.0",
|
# name: "Ubuntu GCC 10.2.0",
|
||||||
@@ -105,7 +111,7 @@ jobs:
|
|||||||
if: matrix.config.compiler.type == 'CLANG' && matrix.config.lib == 'libc++'
|
if: matrix.config.compiler.type == 'CLANG' && matrix.config.lib == 'libc++'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt install -y libc++-${{ matrix.config.compiler.version }}-dev libc++abi-${{ matrix.config.compiler.version }}-dev
|
sudo apt install -y libc++-${{ matrix.config.compiler.version }}-dev libc++abi-${{ matrix.config.compiler.version }}-dev libunwind-${{ matrix.config.compiler.version }}-dev
|
||||||
- name: Install Ninja
|
- name: Install Ninja
|
||||||
# TODO Find a proper syntax to make the below work
|
# TODO Find a proper syntax to make the below work
|
||||||
# if: !matrix.config.docker_image
|
# if: !matrix.config.docker_image
|
||||||
@@ -138,6 +144,12 @@ jobs:
|
|||||||
conan profile update settings.compiler.libcxx=${{ matrix.config.lib }} default
|
conan profile update settings.compiler.libcxx=${{ matrix.config.lib }} default
|
||||||
fi
|
fi
|
||||||
conan profile show default
|
conan profile show default
|
||||||
|
- name: Add support for clang-13 to Conan's settings.yml
|
||||||
|
# TODO Remove when Conan will support clang-13
|
||||||
|
if: matrix.config.compiler.type == 'CLANG'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sed -i -e 's/"8", "9", "10", "11", "12"]/"8", "9", "10", "11", "12", "13"]/' ~/.conan/settings.yml
|
||||||
- name: Install Conan dependencies
|
- name: Install Conan dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@@ -121,13 +121,19 @@ They are defined using the `reference` class template::
|
|||||||
namespace length_references {
|
namespace length_references {
|
||||||
|
|
||||||
inline constexpr auto km = reference<dim_length, kilometre>{};
|
inline constexpr auto km = reference<dim_length, kilometre>{};
|
||||||
inline constexpr auto h = reference<dim_time, hour>{};
|
|
||||||
|
|
||||||
} // namespace length_references
|
} // namespace length_references
|
||||||
|
|
||||||
|
namespace time_references {
|
||||||
|
|
||||||
|
inline constexpr auto h = reference<dim_time, hour>{};
|
||||||
|
|
||||||
|
} // namespace time_references
|
||||||
|
|
||||||
namespace references {
|
namespace references {
|
||||||
|
|
||||||
using namespace length_references;
|
using namespace length_references;
|
||||||
|
using namespace time_references;
|
||||||
|
|
||||||
} // namespace references
|
} // namespace references
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ public:
|
|||||||
uncertainty_type uncertainty;
|
uncertainty_type uncertainty;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if UNITS_COMP_CLANG == 12 || UNITS_COMP_MSVC
|
#if UNITS_COMP_CLANG <= 13 || UNITS_COMP_MSVC
|
||||||
|
|
||||||
template<QuantityOrQuantityPoint QQP, units::Quantity U>
|
template<QuantityOrQuantityPoint QQP, units::Quantity U>
|
||||||
estimation(state<QQP>, U) -> estimation<QQP>;
|
estimation(state<QQP>, U) -> estimation<QQP>;
|
||||||
|
23
src/core/include/units/bits/external/hacks.h
vendored
23
src/core/include/units/bits/external/hacks.h
vendored
@@ -66,9 +66,10 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if UNITS_COMP_CLANG == 12 && UNITS_LIBCXX
|
#if UNITS_LIBCXX
|
||||||
|
|
||||||
|
#if UNITS_COMP_CLANG == 12
|
||||||
|
|
||||||
#include <concepts/compare.hpp>
|
|
||||||
#include <concepts/concepts.hpp>
|
#include <concepts/concepts.hpp>
|
||||||
#include <range/v3/functional/comparisons.hpp>
|
#include <range/v3/functional/comparisons.hpp>
|
||||||
#include <range/v3/iterator.hpp>
|
#include <range/v3/iterator.hpp>
|
||||||
@@ -76,6 +77,12 @@
|
|||||||
#include <range/v3/algorithm/lower_bound.hpp>
|
#include <range/v3/algorithm/lower_bound.hpp>
|
||||||
#include <range/v3/algorithm/transform.hpp>
|
#include <range/v3/algorithm/transform.hpp>
|
||||||
|
|
||||||
|
#elif UNITS_COMP_CLANG == 13
|
||||||
|
|
||||||
|
#include <range/v3/functional/comparisons.hpp>
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <concepts>
|
#include <concepts>
|
||||||
@@ -99,7 +106,9 @@ namespace std {
|
|||||||
template<class T>
|
template<class T>
|
||||||
concept default_constructible = constructible_from<T>;
|
concept default_constructible = constructible_from<T>;
|
||||||
|
|
||||||
#elif UNITS_COMP_CLANG && UNITS_LIBCXX
|
#elif UNITS_LIBCXX
|
||||||
|
|
||||||
|
#if UNITS_COMP_CLANG == 12
|
||||||
|
|
||||||
// concepts
|
// concepts
|
||||||
using concepts::common_with;
|
using concepts::common_with;
|
||||||
@@ -209,6 +218,14 @@ constexpr bool in_range(T t) noexcept
|
|||||||
std::cmp_less_equal(t, std::numeric_limits<R>::max());
|
std::cmp_less_equal(t, std::numeric_limits<R>::max());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#elif UNITS_COMP_CLANG == 13
|
||||||
|
|
||||||
|
using concepts::three_way_comparable;
|
||||||
|
using concepts::three_way_comparable_with;
|
||||||
|
using ::ranges::compare_three_way;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
Reference in New Issue
Block a user