Project

General

Profile

Actions

Bug #5516

closed

Wt4 WServer.C compile error with clang3.8 libc++ boost1.62

Added by Bruce Toll about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
01/24/2017
Due date:
% Done:

0%

Estimated time:

Description

With preview version of Wt4, github 3.3.6-22-gb3a1dd7b, clang 3.8.1 x86_64, using libc and boost1.62 under Debian stretch/testing produces this error:

src/Wt/WServer.C:222:10: error: no viable conversion from '__bind<bool (Wt::WebController::*)(const Wt::ApplicationEvent &), Wt::WebController *&, Wt::ApplicationEvent &>' to
      'const std::function<void ()>'
                       std::bind(&WebController::handleApplicationEvent,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/functional:1448:5: note: candidate constructor not viable: no known conversion from '__bind<bool (Wt::WebController::*)(const Wt::ApplicationEvent &), Wt::WebController *&,
      Wt::ApplicationEvent &>' to 'nullptr_t' for 1st argument
    function(nullptr_t) _NOEXCEPT : __f_(0) {}
    ^
/usr/include/c++/v1/functional:1449:5: note: candidate constructor not viable: no known conversion from '__bind<bool (Wt::WebController::*)(const Wt::ApplicationEvent &), Wt::WebController *&,
      Wt::ApplicationEvent &>' to 'const std::__1::function<void ()> &' for 1st argument
    function(const function&);
    ^
/usr/include/c++/v1/functional:1450:5: note: candidate constructor not viable: no known conversion from '__bind<bool (Wt::WebController::*)(const Wt::ApplicationEvent &), Wt::WebController *&,
      Wt::ApplicationEvent &>' to 'std::__1::function<void ()> &&' for 1st argument
    function(function&&) _NOEXCEPT;
    ^
/usr/include/c++/v1/functional:1454:41: note: candidate template ignored: disabled by 'enable_if' [with _Fp = std::__1::__bind<bool (Wt::WebController::*)(const Wt::ApplicationEvent &), Wt::WebController *&,
      Wt::ApplicationEvent &>]
                                        __callable<_Fp>::value &&
                                        ^
src/Wt/WIOService:76:64: note: passing argument to parameter 'function' here
  void schedule(int milliSeconds, const std::function<void()>& function);

Attached is a patch that eliminates the compiler error, but which has not had any significant testing (other than trying the feature/broadcast example). It would definitely benefit from a careful review.


Files

Actions #1

Updated by André Jacobs about 7 years ago

  • Assignee set to André Jacobs
Actions #2

Updated by André Jacobs about 7 years ago

  • Status changed from New to Implemented @Emweb
Actions #3

Updated by Roel Standaert about 7 years ago

  • Status changed from Implemented @Emweb to Resolved
Actions #4

Updated by Roel Standaert over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF