Skip to content

Commit 308b1ea

Browse files
authored
Merge pull request #2256 from hvdijk/urreturnhelper-ambiguity
Avoid potential ambiguity in UrReturnHelper
2 parents 4a68f61 + d642db3 commit 308b1ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/ur/ur.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ class UrReturnHelper {
304304

305305
// Array return value where element type is differrent from T
306306
template <class RetType, class T>
307-
ur_result_t operator()(const T *t, size_t s) {
307+
std::enable_if_t<!std::is_same_v<RetType, T>, ur_result_t>
308+
operator()(const T *t, size_t s) {
308309
return ur::getInfoArray<T, RetType>(s, param_value_size, param_value,
309310
param_value_size_ret, t);
310311
}

0 commit comments

Comments
 (0)