49 lines
1.4 KiB
Diff
49 lines
1.4 KiB
Diff
From 2be7a91f3d2cf9a863afeb6aae5ca20c0ca2e2c3 Mon Sep 17 00:00:00 2001
|
|
From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
|
|
Date: Tue, 10 Dec 2019 09:48:46 +0100
|
|
Subject: [PATCH] Fix implicit conversion for unary operator+
|
|
|
|
---
|
|
pythran/pythonic/include/operator_/pos.hpp | 4 ++++
|
|
pythran/pythonic/operator_/pos.hpp | 12 ++++++++++++
|
|
2 files changed, 16 insertions(+)
|
|
|
|
diff --git a/pythran/pythonic/include/operator_/pos.hpp b/pythran/pythonic/include/operator_/pos.hpp
|
|
index d2e83cfa0..0cb1dad81 100644
|
|
--- a/pythran/pythonic/include/operator_/pos.hpp
|
|
+++ b/pythran/pythonic/include/operator_/pos.hpp
|
|
@@ -11,6 +11,10 @@ namespace operator_
|
|
template <class A>
|
|
auto pos(A const &a) -> decltype(+a);
|
|
|
|
+ char pos(char const& a);
|
|
+ signed char pos(signed char const& a);
|
|
+ unsigned char pos(unsigned char const& a);
|
|
+
|
|
DEFINE_FUNCTOR(pythonic::operator_, pos);
|
|
}
|
|
PYTHONIC_NS_END
|
|
diff --git a/pythran/pythonic/operator_/pos.hpp b/pythran/pythonic/operator_/pos.hpp
|
|
index 5428ecbd8..53933074c 100644
|
|
--- a/pythran/pythonic/operator_/pos.hpp
|
|
+++ b/pythran/pythonic/operator_/pos.hpp
|
|
@@ -15,6 +15,18 @@ namespace operator_
|
|
{
|
|
return +a;
|
|
}
|
|
+
|
|
+ char pos(char const& a) {
|
|
+ return +a;
|
|
+ }
|
|
+
|
|
+ signed char pos(signed char const& a) {
|
|
+ return +a;
|
|
+ }
|
|
+
|
|
+ unsigned char pos(unsigned char const& a) {
|
|
+ return +a;
|
|
+ }
|
|
}
|
|
PYTHONIC_NS_END
|
|
|