CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
66 lines
1.9 KiB
C++
66 lines
1.9 KiB
C++
// RUN: %clang_cc1 -std=c++2c -fexperimental-new-constant-interpreter -verify=expected,both %s
|
|
// RUN: %clang_cc1 -std=c++2c -verify=ref,both %s
|
|
|
|
// both-no-diagnostics
|
|
|
|
namespace std {
|
|
inline namespace {
|
|
template <bool, class _IfRes, class> using conditional_t = _IfRes;
|
|
template <class _Ip>
|
|
concept input_iterator = requires { typename _Ip; };
|
|
auto end = int{};
|
|
namespace ranges {
|
|
template <class>
|
|
concept range = requires { end; };
|
|
template <class _Tp>
|
|
concept input_range = input_iterator<_Tp>;
|
|
template <class>
|
|
concept forward_range = false;
|
|
template <range _Rp> struct owning_view {
|
|
_Rp __r_;
|
|
};
|
|
} // namespace ranges
|
|
template <int _Size> struct array {
|
|
int __elems_[_Size];
|
|
};
|
|
template <class> struct allocator {
|
|
constexpr array<2> *allocate(decltype(sizeof(int))) {
|
|
return static_cast<array<2> *>(operator new(sizeof(array<2>)));
|
|
}
|
|
};
|
|
namespace ranges {
|
|
template <input_range _View, forward_range _Pattern> struct join_with_view {
|
|
join_with_view(_View, _Pattern);
|
|
};
|
|
} // namespace ranges
|
|
template <class> struct vector {
|
|
constexpr ~vector() {
|
|
(__end_ - 1)->~array<2>();
|
|
}
|
|
constexpr vector() {
|
|
__end_ = __alloc_.allocate(0);
|
|
_ConstructTransaction __tx(*this);
|
|
++__tx.__pos_;
|
|
}
|
|
array<2>* __end_;
|
|
allocator<array<2>> __alloc_;
|
|
struct _ConstructTransaction {
|
|
constexpr _ConstructTransaction(vector &__v)
|
|
: __v_(__v), __pos_(__v.__end_) {}
|
|
constexpr ~_ConstructTransaction() { __v_.__end_ = __pos_; }
|
|
vector __v_;
|
|
array<2>* __pos_;
|
|
};
|
|
};
|
|
} // namespace
|
|
} // namespace std
|
|
template <bool RefIsGlvalue, class Inner>
|
|
using VRange = std::conditional_t<RefIsGlvalue, std::vector<Inner>, Inner>;
|
|
template <int RefIsGlvalue> void test_pre_increment() {
|
|
using V = VRange<RefIsGlvalue, std::array<2>>;
|
|
using Pattern = std::array<2>;
|
|
using JWV = std::ranges::join_with_view<std::ranges::owning_view<V>,
|
|
std::ranges::owning_view<Pattern>>;
|
|
JWV jwv({}, {});
|
|
}
|