Opened 8 years ago

Closed 8 years ago

#10662 closed Bugs (fixed)

Simple signal fails to compile using clang with -std=c++11

Reported by: beeblebrox42@… Owned by: Frank Mori Hess
Milestone: To Be Determined Component: signals2
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description

This test case fails to build using clang 3.0 and boost 1.55:

#include <boost/signals2/signal.hpp>

  int main()
  {
    boost::signals2::signal<void()> s;
    s();
  }

Error:

In file included from scratch.cpp:1:
In file included from /usr/include/boost/signals2/signal.hpp:38:
In file included from /usr/include/boost/signals2/variadic_signal.hpp:21:
/usr/include/boost/signals2/detail/variadic_slot_invoker.hpp:81:18: error: call
      to member function 'm_invoke' is ambiguous
          return m_invoke(resolver, func, indices_type(), args);
                 ^~~~~~~~

This is the same test case as #8260 which was marked a duplicate of #8102 and fixed in 1.54. Note that this test case results in a different error in 1.55.

Attachments (2)

scratch.cpp (101 bytes ) - added by beeblebrox42@… 8 years ago.
Simple test case demonstrating issue in clang 3.0: clang++ -std=c++11 scratch.cpp
errors.txt (7.3 KB ) - added by beeblebrox42@… 8 years ago.
Error output

Download all attachments as: .zip

Change History (5)

by beeblebrox42@…, 8 years ago

Attachment: scratch.cpp added

Simple test case demonstrating issue in clang 3.0: clang++ -std=c++11 scratch.cpp

by beeblebrox42@…, 8 years ago

Attachment: errors.txt added

Error output

comment:1 by Frank Mori Hess, 8 years ago

Have you tried a newer version of clang? I'm inclined to just blame this on clang 3.0 as other compilers do not have this problem even when variadic templates are being used.

comment:2 by anonymous, 8 years ago

I was able to find an upgrade for Ubuntu Precise to clang 3.3. It works.

comment:3 by Frank Mori Hess, 8 years ago

Resolution: fixed
Status: newclosed

This may work now on the develop branch, even with the buggy version of clang.

Note: See TracTickets for help on using tickets.