]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
clang/error: fix: call to convertToOpaque is ambiguous
authorslipher <slipher@protonmail.com>
Sun, 5 Apr 2020 03:09:07 +0000 (05:09 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sun, 5 Apr 2020 03:43:33 +0000 (05:43 +0200)
libs/generic/callback.h

index 577dd9d958bd337082f9c2479c5c1803e664c1a3..7479826cbeb8335c6cd68846bdf3142075fe576e 100644 (file)
@@ -101,7 +101,7 @@ namespace detail {
 
        // pointer
 
-       template<class T>
+       template<class T, class U = typename std::enable_if<!std::is_function<T>::value>::type>
        inline const void *convertToOpaque(const T *t) {
                return t;
        }
@@ -113,7 +113,7 @@ namespace detail {
                }
        };
 
-       template<class T>
+       template<class T, class U = typename std::enable_if<!std::is_function<T>::value>::type>
        inline void *convertToOpaque(T *t) {
                return t;
        }