Skip to content

Commit b1c534b

Browse files
rarutyunkboyarinov
andauthored
Enable CTAD for blocked_rangeNd since C++17 (#1524)
Co-authored-by: Boyarinov, Konstantin <[email protected]>
1 parent edad47b commit b1c534b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

include/oneapi/tbb/blocked_nd_range.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2017-2024 Intel Corporation
2+
Copyright (c) 2017-2025 Intel Corporation
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -47,11 +47,9 @@ namespace d1 {
4747
*/
4848

4949
template<typename Value, unsigned int N, typename = detail::make_index_sequence<N>>
50-
__TBB_requires(blocked_range_value<Value>)
5150
class blocked_nd_range_impl;
5251

5352
template<typename Value, unsigned int N, std::size_t... Is>
54-
__TBB_requires(blocked_range_value<Value>)
5553
class blocked_nd_range_impl<Value, N, detail::index_sequence<Is...>> {
5654
public:
5755
//! Type of a value.
@@ -142,7 +140,12 @@ class blocked_nd_range_impl<Value, N, detail::index_sequence<Is...>> {
142140
};
143141

144142
template<typename Value, unsigned int N>
145-
using blocked_nd_range = blocked_nd_range_impl<Value, N>;
143+
__TBB_requires(blocked_range_value<Value>)
144+
class blocked_nd_range : public blocked_nd_range_impl<Value, N> {
145+
using base = blocked_nd_range_impl<Value, N>;
146+
// Making constructors of base class visible
147+
using base::base;
148+
};
146149

147150
} // namespace d1
148151
} // namespace detail

include/oneapi/tbb/blocked_range.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2005-2024 Intel Corporation
2+
Copyright (c) 2005-2025 Intel Corporation
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -151,7 +151,6 @@ class blocked_range {
151151
friend class blocked_range3d;
152152

153153
template<typename DimValue, unsigned int N, typename>
154-
__TBB_requires(blocked_range_value<DimValue>)
155154
friend class blocked_nd_range_impl;
156155
};
157156

0 commit comments

Comments
 (0)