Skip to content

Commit 3b779c0

Browse files
committed
Resolve ambiguous call with SFINAE
Signed-off-by: John Pennycook <[email protected]>
1 parent ce5fc20 commit 3b779c0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

sycl/include/sycl/khr/group_interface.hpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ inline namespace _V1 {
2222

2323
namespace khr {
2424

25-
// Forward declarations for friend functions and traits.
25+
// Forward declarations for traits.
2626
template <int Dimensions> class work_group;
27-
template class sub_group;
27+
class sub_group;
2828
template <typename ParentGroup> class work_item;
29-
template <typename ParentGroup> work_item<ParentGroup> get_item(ParentGroup);
3029

3130
} // namespace khr
3231

@@ -58,6 +57,12 @@ struct is_khr_group<khr::sub_group> : public std::true_type {};
5857

5958
namespace khr {
6059

60+
// Forward declaration for friend function.
61+
template <typename ParentGroup>
62+
std::enable_if_t<detail::is_khr_group<ParentGroup>::value,
63+
work_item<ParentGroup>>
64+
get_item(ParentGroup g);
65+
6166
template <int Dimensions = 1> class work_group {
6267
public:
6368
using id_type = id<Dimensions>;

0 commit comments

Comments
 (0)