[libsigc++2/variadic_bind4: 4/18] hide.h: Use this as a normal .h file.



commit e5cb2453d5d910e466d91599955b6f6cea4f3ac6
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Jan 14 17:43:04 2016 +0100

    hide.h: Use this as a normal .h file.
    
    Instead of generating it from an .h.m4 file.

 sigc++/.gitignore                            |    1 -
 sigc++/adaptors/{macros/hide.h.m4 => hide.h} |   38 +++++---------------------
 sigc++/filelist.am                           |    5 ++-
 3 files changed, 10 insertions(+), 34 deletions(-)
---
diff --git a/sigc++/.gitignore b/sigc++/.gitignore
index fc0584b..e375f77 100644
--- a/sigc++/.gitignore
+++ b/sigc++/.gitignore
@@ -1,6 +1,5 @@
 /limit_reference.h
 /adaptors/bind.h
-/adaptors/hide.h
 /adaptors/retype.h
 /adaptors/track_obj.h
 /functors/mem_fun.h
diff --git a/sigc++/adaptors/macros/hide.h.m4 b/sigc++/adaptors/hide.h
similarity index 85%
rename from sigc++/adaptors/macros/hide.h.m4
rename to sigc++/adaptors/hide.h
index 3ed7508..afed14c 100644
--- a/sigc++/adaptors/macros/hide.h.m4
+++ b/sigc++/adaptors/hide.h
@@ -1,32 +1,6 @@
-dnl Copyright 2002, The libsigc++ Development Team
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-dnl
-divert(-1)
-
-include(template.macros.m4)
-
-define([ORDINAL],[dnl
-ifelse($1,0,,$1)ifelse($1,0,[last],$1,1,[st],$1,2,[nd],$1,3,[rd],[th])[]dnl
-])
-
-])])dnl
-])dnl end HIDE_OPERATOR
-
-divert(0)dnl
-_FIREWALL([ADAPTORS_HIDE])
+#ifndef _SIGC_ADAPTORS_HIDE_H_
+#define _SIGC_ADAPTORS_HIDE_H_
+
 #include <sigc++/adaptors/adaptor_trait.h>
 #include <sigc++/tuple_cat.h>
 #include <sigc++/tuple_end.h>
@@ -181,7 +155,7 @@ struct visitor<hide_functor<I_location, T_functor> >
  * @ingroup hide
  */
 template <int I_location, class T_functor>
-inline hide_functor<I_location, T_functor>
+inline decltype(auto)
 hide(const T_functor& _A_func)
   { return hide_functor<I_location, T_functor>(_A_func); }
 
@@ -194,8 +168,10 @@ hide(const T_functor& _A_func)
  * @ingroup hide
  */
 template <class T_functor>
-inline hide_functor<-1, T_functor>
+inline decltype(auto)
 hide(const T_functor& _A_func)
   { return hide_functor<-1, T_functor> (_A_func); }
 
 } /* namespace sigc */
+
+#endif /* _SIGC_ADAPTORS_HIDE_H_ */
diff --git a/sigc++/filelist.am b/sigc++/filelist.am
index 49bbb55..f073570 100644
--- a/sigc++/filelist.am
+++ b/sigc++/filelist.am
@@ -27,11 +27,11 @@ functors_built_h = mem_fun.h
 
 # Adaptors (adaptors/)
 adaptors_m4 = bind.h.m4 \
-             hide.h.m4 retype.h.m4 \
+             retype.h.m4 \
              track_obj.h.m4
 adaptors_built_cc =
 adaptors_built_h = bind.h \
-                   hide.h retype.h \
+                   retype.h \
                    track_obj.h
 
 # Combine all the above parts with right directories prefixed
@@ -70,6 +70,7 @@ sigc_public_h =                               \
        adaptors/bound_argument.h       \
        adaptors/compose.h \
        adaptors/exception_catch.h \
+       adaptors/hide.h \
        adaptors/retype_return.h \
        functors/functor_trait.h                \
        functors/functors.h             \


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