libsigc++ 2.2.0 Build Failure Using Sun C++ Compiler.

View: New views
2 Messages — Rating Filter:   Alert me  

libsigc++ 2.2.0 Build Failure Using Sun C++ Compiler.

by Elaine Xiong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I can't build libsigc++2.2.0(the previous releases are okay) with Sun
C++ compiler(CC). It seems the latest release includes code snips that
not supported by libCstd, which is the default C++ standard library. The
code snips are related to "iterator_reverse" and "iterator_traits". The
former one has different implementation compared to standard C++. The
later one is not defined in libCstd. I tried to write a patch to
workaroud them and attached it in this mail. Could anyone help me to
review it and checkin ? I would appreciate your any instructor and quick
response.

Best Regards,
Elaine

--- ./libsigc++-2.2.0/sigc++/signal.h.ori 2008-02-28 11:27:44.711328000 +0800
+++ ./libsigc++-2.2.0/sigc++/signal.h 2008-02-28 11:32:03.403395000 +0800
@@ -777,7 +777,12 @@
       signal_exec exec(impl);
       temp_slot_list slots(impl->slots_);
 
+#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
       typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
+#else
+      typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
+                                     slot_base, slot_base&, slot_base*, ptrdiff_t> reverse_iterator_type;
+#endif
       for (reverse_iterator_type it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it)
         {
           if (it->empty() || it->blocked())
--- ./libsigc++-2.2.0/tests/test_accum_iter.cc.ori 2008-02-28 11:11:13.568351000 +0800
+++ ./libsigc++-2.2.0/tests/test_accum_iter.cc 2008-02-28 14:06:01.250219000 +0800
@@ -17,7 +17,11 @@
     typedef T result_type;
 
     template<class I>
+#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR    
         typename std::iterator_traits<I>::value_type operator()(I i1, I i2)
+#else
+        typename I::value_type operator()(I i1, I i2)
+#endif        
         {
             return *std::min_element(i1, i2);
         }

_______________________________________________
libsigc-list mailing list
libsigc-list@...
http://mail.gnome.org/mailman/listinfo/libsigc-list

Re: libsigc++ 2.2.0 Build Failure Using Sun C++ Compiler.

by Murray Cumming :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2008-02-28 at 14:39 +0800, Elaine Xiong wrote:

> Hi,
>
> I can't build libsigc++2.2.0(the previous releases are okay) with Sun
> C++ compiler(CC). It seems the latest release includes code snips that
> not supported by libCstd, which is the default C++ standard library. The
> code snips are related to "iterator_reverse" and "iterator_traits". The
> former one has different implementation compared to standard C++. The
> later one is not defined in libCstd. I tried to write a patch to
> workaroud them and attached it in this mail. Could anyone help me to
> review it and checkin ? I would appreciate your any instructor and quick
> response.
>
> Best Regards,
> Elaine

Great. What version of Sun's CC are you using?

Did this patch fix the build for you? If so, could you attach it to this
bug, please?
http://bugzilla.gnome.org/show_bug.cgi?id=302098

--
murrayc@...
www.murrayc.com
www.openismus.com

_______________________________________________
libsigc-list mailing list
libsigc-list@...
http://mail.gnome.org/mailman/listinfo/libsigc-list