Project

General

Profile

Actions

Bug #5517

closed

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

Added by Bruce Toll almost 8 years ago. Updated over 7 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 on DboTest.C:

In file included from test/dbo/DboTest.C:15:
In file included from src/Wt/Dbo/QueryModel.h:7:
In file included from src/Wt/Dbo/QueryModel:10:
In file included from src/Wt/WAbstractTableModel.h:7:
In file included from src/Wt/WAbstractTableModel:10:
In file included from src/Wt/WAbstractItemModel.h:7:
In file included from src/Wt/WAbstractItemModel:12:
In file included from src/Wt/WSignal.h:7:
In file included from src/Wt/WSignal:13:
src/Wt/Signals/signals.hpp:418:25: error: no viable conversion from 'const std::__1::__bind_r<bool, std::__1::reference_wrapper<(anonymous namespace)::CheckExpected>,
      std::__1::reference_wrapper<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >' to 'const CbFunction' (aka 'const function<void (Wt::WModelIndex, Wt::WModelIndex)>')
  return signal.connect(function, target);
                        ^~~~~~~~
src/Wt/WSignal:639:25: note: in instantiation of function template specialization 'Wt::Signals::Impl::connectFunction<std::__1::__bind_r<bool, std::__1::reference_wrapper<(anonymous
      namespace)::CheckExpected>, std::__1::reference_wrapper<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, Wt::WModelIndex, Wt::WModelIndex>' requested here
  return Signals::Impl::connectFunction<F, A...>(impl_, function, nullptr);
                        ^
test/dbo/DboTest.C:2430:26: note: in instantiation of function template specialization 'Wt::Signal<Wt::WModelIndex, Wt::WModelIndex>::connect<std::__1::__bind_r<bool,
      std::__1::reference_wrapper<(anonymous namespace)::CheckExpected>, std::__1::reference_wrapper<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >' requested here
    model->dataChanged().connect
                         ^
/usr/include/c++/v1/functional:1448:5: note: candidate constructor not viable: no known conversion from 'const std::__1::__bind_r<bool, std::__1::reference_wrapper<(anonymous namespace)::CheckExpected>,
      std::__1::reference_wrapper<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >' 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 'const std::__1::__bind_r<bool, std::__1::reference_wrapper<(anonymous namespace)::CheckExpected>,
      std::__1::reference_wrapper<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >' to 'const std::__1::function<void (Wt::WModelIndex, Wt::WModelIndex)> &' for 1st
      argument
    function(const function&);
    ^
/usr/include/c++/v1/functional:1450:5: note: candidate constructor not viable: no known conversion from 'const std::__1::__bind_r<bool, std::__1::reference_wrapper<(anonymous namespace)::CheckExpected>,
      std::__1::reference_wrapper<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >' to 'std::__1::function<void (Wt::WModelIndex, Wt::WModelIndex)> &&' 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_r<bool, std::__1::reference_wrapper<(anonymous namespace)::CheckExpected>,
      std::__1::reference_wrapper<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >]
                                        __callable<_Fp>::value &&
                                        ^
src/Wt/Signals/signals.hpp:199:40: note: passing argument to parameter 'cb' here
  Connection connect(const CbFunction &cb,

Attached is a patch that eliminates the compiler error. It was lightly tested with "test.postgres -t dbo_test26" but could benefit from additional review.


Files

Actions #1

Updated by André Jacobs almost 8 years ago

  • Assignee set to André Jacobs
Actions #2

Updated by André Jacobs almost 8 years ago

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

Updated by Roel Standaert almost 8 years ago

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

Updated by Roel Standaert over 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF