After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 165222 - visit_each looked up with ADL, causing ambiguity
visit_each looked up with ADL, causing ambiguity
Status: RESOLVED FIXED
Product: libsigc++
Classification: Bindings
Component: adaptors
2.0
Other opensolaris
: Normal normal
: ---
Assigned To: Martin Schulze
Martin Schulze
Depends on:
Blocks:
 
 
Reported: 2005-01-25 19:58 UTC by Liza
Modified: 2005-01-28 21:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for 165222 issue found in mem_fun.h also (1.34 KB, patch)
2005-01-28 21:35 UTC, Liza
none Details | Review

Description Liza 2005-01-25 19:58:38 UTC
When using 2 versions of sigc in different namespaces (for personal reasons) ADL
causes an ambiguity when mem_fun calls visit_each. Item 1 shows the compiler
error. Item 2 is a patch solving the problem

Item 1: 

test.C:208:   instantiated from here
/opt/app/gnome-2.4/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:267:
error: call
   of overloaded `visit_each(const
   sigc::internal::limit_derived_target<sigc::trackable*,
   sigc::internal::slot_do_bind>&, sigc::pointer_functor3<MyMetaClient*,
   MetaContract*, meta_updated_flag, void>&)' is ambiguous
/opt/app/gnome-2.4/include/sigc++-2.0/sigc++/visit_each.h:113: error: candidates
   are: void sigc::visit_each(const T_action&, const T_functor&) [with T_action
   = sigc::internal::limit_derived_target<sigc::trackable*,
   sigc::internal::slot_do_bind>, T_functor =
   sigc::pointer_functor3<MyMetaClient*, MetaContract*, meta_updated_flag,
   void>]
/home/lex/SANDBOX2/install/include/toast/0.2/toast/signals/visit_each.H:113: error:
                  void toast::signals::visit_each(const T_action&, const
   T_functor&) [with T_action =
   sigc::internal::limit_derived_target<sigc::trackable*,
   sigc::internal::slot_do_bind>, T_functor =
   sigc::pointer_functor3<MyMetaClient*, MetaContract*, meta_updated_flag,
   void>]
gmake: *** [test.o] Error 1
gmake: *** Waiting for unfinished jobs....


Item 2: 

*** adaptor_trait.h.orig	2005-01-25 13:50:12.928361000 -0600
--- adaptor_trait.h	2005-01-25 13:50:54.599570000 -0600
***************
*** 264,270 ****
  void visit_each(const T_action& _A_action,
                  const adaptor_functor<T_functor>& _A_target)
  {
!   visit_each(_A_action, _A_target.functor_);
  }
  
  
--- 264,270 ----
  void visit_each(const T_action& _A_action,
                  const adaptor_functor<T_functor>& _A_target)
  {
!     sigc::visit_each(_A_action, _A_target.functor_);
  }
Comment 1 Murray Cumming 2005-01-27 11:55:13 UTC
OK. Committed. Thanks.

Please try to create an actual cvs patch (this was a generated file) and patch
the ChangeLog, in future:
http://www.gtkmm.org/bugs.shtml#CreatingPatches
Comment 2 Liza 2005-01-28 21:33:49 UTC
Same issue found in mem_fun.h. Attaching the patch.
Comment 3 Liza 2005-01-28 21:35:02 UTC
Created attachment 36670 [details] [review]
Patch for 165222 issue found in mem_fun.h also
Comment 4 Murray Cumming 2005-01-28 21:54:21 UTC
OK. Applied. Thanks.