summaryrefslogtreecommitdiff
blob: 7d409b5bfe6fd44d6b4ad29ad877587a5179212e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 83f57ba569eab78581b3a682edca70592b2b2577 Mon Sep 17 00:00:00 2001
From: Alessandro Pignotti <a.pignotti@sssup.it>
Date: Sun, 10 Jun 2012 19:32:22 +0200
Subject: [PATCH] Restore NullRef instead of std::nullptr_t

std::nullptr is ambiguos since it's acceptable also as Ref constructor

This reverts commit 3d243ec18be069b27774b5cef10305b48156fc1c.
---
 src/smartrefs.h |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/smartrefs.h b/src/smartrefs.h
index d7f51bd..5087b2f 100644
--- a/src/smartrefs.h
+++ b/src/smartrefs.h
@@ -119,15 +119,14 @@ class Ref
 	return Ref<T>(a);
 }
 
-#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 6)
+//#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 6)
 /* Fallback for gcc < 4.6 not supporting nullptr */
 class NullRef_t {};
 extern NullRef_t NullRef;
-#else
-/* This is needed for MSVC and can be used on gcc >= 4.6 */
+/*#else
 typedef std::nullptr_t NullRef_t;
 #define NullRef (nullptr)
-#endif
+#endif*/
 
 template<class T>
 class NullableRef
-- 
1.7.10