summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorda-woods <dw-git@d-woods.co.uk>2023-03-16 07:54:58 +0000
committerGitHub <noreply@github.com>2023-03-16 08:54:58 +0100
commit71d754d82aa75376bacf702350dc110efe3ff53e (patch)
tree958612d1529553d29167d5d5199653932fbc58ab
parent1796c7d4eadc6f1783f5894af8b0b2bd3c9741a3 (diff)
downloadcython-71d754d82aa75376bacf702350dc110efe3ff53e.tar.gz
Fix FakeReference on C++03 by avoiding C++11 features (GH-5317)
Apparently default function template parameters aren't allowed (and they don't seem to be needed here anyway) Closes https://github.com/cython/cython/issues/5316
-rw-r--r--Cython/Utility/ModuleSetupCode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index 3516beb24..e461cda1e 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -603,8 +603,8 @@ class __Pyx_FakeReference {
// TODO(robertwb): Delegate all operators (or auto-generate unwrapping code where needed).
template<typename U> bool operator ==(const U& other) const { return *ptr == other; }
template<typename U> bool operator !=(const U& other) const { return *ptr != other; }
- template<typename U=T> bool operator==(const __Pyx_FakeReference<U>& other) const { return *ptr == *other.ptr; }
- template<typename U=T> bool operator!=(const __Pyx_FakeReference<U>& other) const { return *ptr != *other.ptr; }
+ template<typename U> bool operator==(const __Pyx_FakeReference<U>& other) const { return *ptr == *other.ptr; }
+ template<typename U> bool operator!=(const __Pyx_FakeReference<U>& other) const { return *ptr != *other.ptr; }
private:
T *ptr;
};