[libsigc++2/variadic_bind4] Remove nil and the associated pragma push/pop fixes for Objective C++.



commit fcf45047f0e8f5b18e9359c63ee912925d5792fa
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Mar 3 10:37:21 2016 +0100

    Remove nil and the associated pragma push/pop fixes for Objective C++.

 build/cxx.m4                       |   51 ------------------------------------
 configure.ac                       |    1 -
 sigc++/adaptors/bind.h             |   12 --------
 sigc++/adaptors/macros/retype.h.m4 |   11 --------
 sigc++/functors/functor_trait.h    |   28 -------------------
 sigc++/functors/slot.h             |   11 --------
 sigc++/signal.h                    |   12 --------
 7 files changed, 0 insertions(+), 126 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1df49ba..f8b24bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,6 @@ MM_ARG_ENABLE_DOCUMENTATION
 MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++])
 
 AC_LANG([C++])
-SIGC_CXX_PRAGMA_PUSH_POP_MACRO
 SIGC_CXX_HAS_NAMESPACE_STD
 SIGC_CXX_HAS_SUN_REVERSE_ITERATOR
 
diff --git a/sigc++/adaptors/bind.h b/sigc++/adaptors/bind.h
index d82f993..390d42b 100644
--- a/sigc++/adaptors/bind.h
+++ b/sigc++/adaptors/bind.h
@@ -8,14 +8,6 @@
 #include <sigc++/tuple-utils/tuple_end.h>
 #include <sigc++/tuple-utils/tuple_transform_each.h>
 
-
-//TODO: See comment in functor_trait.h.
-#if defined(nil) && defined(SIGC_PRAGMA_PUSH_POP_MACRO)
-  #define SIGC_NIL_HAS_BEEN_PUSHED 1
-  #pragma push_macro("nil")
-  #undef nil
-#endif
-
 namespace sigc {
 
 
@@ -335,8 +327,4 @@ bind(const T_functor& _A_func, T_type... _A_b)
 
 } /* namespace sigc */
 
-#ifdef SIGC_NIL_HAS_BEEN_PUSHED
-  #undef SIGC_NIL_HAS_BEEN_PUSHED
-  #pragma pop_macro("nil")
-#endif
 #endif /* _SIGC_ADAPTORS_BIND_H_ */
diff --git a/sigc++/adaptors/macros/retype.h.m4 b/sigc++/adaptors/macros/retype.h.m4
index dd69839..2478a3b 100644
--- a/sigc++/adaptors/macros/retype.h.m4
+++ b/sigc++/adaptors/macros/retype.h.m4
@@ -43,13 +43,6 @@ _FIREWALL([ADAPTORS_RETYPE])
 #include <sigc++/functors/mem_fun.h>
 #include <sigc++/functors/slot.h>
 
-//TODO: See comment in functor_trait.h.
-#if defined(nil) && defined(SIGC_PRAGMA_PUSH_POP_MACRO)
-  #define SIGC_NIL_HAS_BEEN_PUSHED 1
-  #pragma push_macro("nil")
-  #undef nil
-#endif
-
 namespace sigc {
 
 /** @defgroup retype retype(), retype_return()
@@ -183,7 +176,3 @@ RETYPE_MEM_FUNCTOR([bound_const_volatile_])
 
 } /* namespace sigc */
 
-#ifdef SIGC_NIL_HAS_BEEN_PUSHED
-  #undef SIGC_NIL_HAS_BEEN_PUSHED
-  #pragma pop_macro("nil")
-#endif
diff --git a/sigc++/functors/functor_trait.h b/sigc++/functors/functor_trait.h
index 176a330..904d507 100644
--- a/sigc++/functors/functor_trait.h
+++ b/sigc++/functors/functor_trait.h
@@ -5,34 +5,6 @@
 
 namespace sigc {
 
-//TODO: When we can break ABI, replace nil by something else, such as sigc_nil.
-// nil is a keyword in Objective C++. When gcc is used for compiling Objective C++
-// programs, nil is defined as a preprocessor macro.
-// https://bugzilla.gnome.org/show_bug.cgi?id=695235
-#if defined(nil) && defined(SIGC_PRAGMA_PUSH_POP_MACRO)
-  #define SIGC_NIL_HAS_BEEN_PUSHED 1
-  #pragma push_macro("nil")
-  #undef nil
-#endif
-
-/** nil struct type.
- * The nil struct type is used as default template argument in the
- * unnumbered sigc::signal and sigc::slot templates.
- *
- * @ingroup signal
- * @ingroup slot
- */
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-struct nil;
-#else
-struct nil {};
-#endif
-
-#ifdef SIGC_NIL_HAS_BEEN_PUSHED
-  #undef SIGC_NIL_HAS_BEEN_PUSHED
-  #pragma pop_macro("nil")
-#endif
-
 /** @defgroup sigcfunctors Functors
  * Functors are copyable types that define operator()().
  *
diff --git a/sigc++/functors/slot.h b/sigc++/functors/slot.h
index 66ad68e..7a3713f 100644
--- a/sigc++/functors/slot.h
+++ b/sigc++/functors/slot.h
@@ -6,13 +6,6 @@
 #include <sigc++/adaptors/adaptor_trait.h>
 #include <sigc++/functors/slot_base.h>
 
-//TODO: See comment in functor_trait.h.
-#if defined(nil) && defined(SIGC_PRAGMA_PUSH_POP_MACRO)
-  #define SIGC_NIL_HAS_BEEN_PUSHED 1
-  #pragma push_macro("nil")
-  #undef nil
-#endif
-
 namespace sigc {
 
 namespace internal {
@@ -265,9 +258,5 @@ struct visitor<slot<T_return, T_arg...>>
 
 } /* namespace sigc */
 
-#ifdef SIGC_NIL_HAS_BEEN_PUSHED
-  #undef SIGC_NIL_HAS_BEEN_PUSHED
-  #pragma pop_macro("nil")
-#endif
 
 #endif /* _SIGC_FUNCTORS_SLOT_H_ */
diff --git a/sigc++/signal.h b/sigc++/signal.h
index 59b3580..9a36575 100644
--- a/sigc++/signal.h
+++ b/sigc++/signal.h
@@ -29,13 +29,6 @@
 #include <tuple>
 #include <utility>
 
-//TODO: See comment in functor_trait.h.
-#if defined(nil) && defined(SIGC_PRAGMA_PUSH_POP_MACRO)
-  #define SIGC_NIL_HAS_BEEN_PUSHED 1
-  #pragma push_macro("nil")
-  #undef nil
-#endif
-
 namespace sigc {
 
 /** STL-style iterator for slot_list.
@@ -1108,9 +1101,4 @@ public:
 
 } /* namespace sigc */
 
-#ifdef SIGC_NIL_HAS_BEEN_PUSHED
-  #undef SIGC_NIL_HAS_BEEN_PUSHED
-  #pragma pop_macro("nil")
-#endif
-
 #endif /* _SIGC_SIGNAL_H_ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]