<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - clang fails to compile "future" from gcc 5.1"
   href="https://llvm.org/bugs/show_bug.cgi?id=24372">24372</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang fails to compile "future" from gcc 5.1
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>yaron.keren@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre><span class="quote">> cat as.cpp</span >
#include <future>
int main() {}

<span class="quote">> gcc -v</span >
...
gcc version 5.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)

<span class="quote">> g++ -std=c++11 -c as.cpp</span >

<span class="quote">> clang -v</span >
zapcc clang version 3.8.0 (trunk 243996) (based on LLVM 3.8.0svn) built on Aug 
4 2015 20:23:43

<span class="quote">> clang++ -std=c++11 -c as.cpp</span >

In file included from as.cpp:1:
In file included from C:\mingw32\i686-w64-mingw32\include\c++\future:38:
C:\mingw32\i686-w64-mingw32\include\c++\functional:1426:7: error: static_assert
failed "Wrong number of arguments for pointer-to-member"

      static_assert(_Varargs::value
      ^             ~~~~~~~~~~~~~~~
C:\mingw32\i686-w64-mingw32\include\c++\functional:1539:7: note: in
instantiation of template class 'std::_Bind_check_arity<void
     
(std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base,
      std::__future_base::_Result_base::_Deleter> ()> *, bool *)
__attribute__((thiscall)), std::__future_base::_State_baseV2 *,
      std::function<std::unique_ptr<std::__future_base::_Result_base,
std::__future_base::_Result_base::_Deleter> ()> *, bool *>'
      requested here
    : _Bind_check_arity<typename decay<_Func>::type, _BoundArgs...>
      ^
C:\mingw32\i686-w64-mingw32\include\c++\functional:1551:14: note: in
instantiation of template class 'std::_Bind_simple_helper<void
     
(std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base,
      std::__future_base::_Result_base::_Deleter> ()> *, bool *)
__attribute__((thiscall)), std::__future_base::_State_baseV2 *,
      std::function<std::unique_ptr<std::__future_base::_Result_base,
std::__future_base::_Result_base::_Deleter> ()> *, bool *>'
      requested here
    typename _Bind_simple_helper<_Callable, _Args...>::__type
             ^
C:\mingw32\i686-w64-mingw32\include\c++\mutex:717:30: note: while substituting
deduced template arguments into function template
      '__bind_simple' [with _Callable = void
     
(std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base,
      std::__future_base::_Result_base::_Deleter> ()> *, bool *)
__attribute__((thiscall)), _Args = <std::__future_base::_State_baseV2
      *, std::function<std::unique_ptr<std::__future_base::_Result_base,
std::__future_base::_Result_base::_Deleter> ()> *, bool *>]
      auto __bound_functor = std::__bind_simple(std::forward<_Callable>(__f),
                             ^
C:\mingw32\i686-w64-mingw32\include\c++\future:386:2: note: in instantiation of
function template specialization 'std::call_once<void
     
(std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base,
      std::__future_base::_Result_base::_Deleter> ()> *, bool *)
__attribute__((thiscall)), std::__future_base::_State_baseV2 *,
      std::function<std::unique_ptr<std::__future_base::_Result_base,
std::__future_base::_Result_base::_Deleter> ()> *, bool *>'
      requested here
        call_once(_M_once, &_State_baseV2::_M_do_set, this,
        ^
In file included from as.cpp:1:
In file included from C:\mingw32\i686-w64-mingw32\include\c++\future:39:
C:\mingw32\i686-w64-mingw32\include\c++\mutex:717:30: error: no matching
function for call to '__bind_simple'
      auto __bound_functor = std::__bind_simple(std::forward<_Callable>(__f),
                             ^~~~~~~~~~~~~~~~~~
C:\mingw32\i686-w64-mingw32\include\c++\future:386:2: note: in instantiation of
function template specialization 'std::call_once<void
     
(std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base,
      std::__future_base::_Result_base::_Deleter> ()> *, bool *)
__attribute__((thiscall)), std::__future_base::_State_baseV2 *,
      std::function<std::unique_ptr<std::__future_base::_Result_base,
std::__future_base::_Result_base::_Deleter> ()> *, bool *>'
      requested here
        call_once(_M_once, &_State_baseV2::_M_do_set, this,
        ^
C:\mingw32\i686-w64-mingw32\include\c++\functional:1552:5: note: candidate
template ignored: substitution failure [with _Callable = void

     
(std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base,
      std::__future_base::_Result_base::_Deleter> ()> *, bool *)
__attribute__((thiscall)), _Args = <std::__future_base::_State_baseV2
      *, std::function<std::unique_ptr<std::__future_base::_Result_base,
std::__future_base::_Result_base::_Deleter> ()> *, bool *>]
    __bind_simple(_Callable&& __callable, _Args&&... __args)
    ^
C:\mingw32\i686-w64-mingw32\include\c++\functional:680:24: error: reference to
non-static member function must be called; did you mean
      to call it with no arguments?
      { return __object.*_M_pm; }
               ~~~~~~~~^~~~~~~
C:\mingw32\i686-w64-mingw32\include\c++\functional:717:11: note: in
instantiation of member function 'std::_Mem_fn_base<void
      (std::thread::*)() __attribute__((thiscall)), false>::operator()'
requested here
        { return (*this)(__ref.get()); }
                 ^
C:\mingw32\i686-w64-mingw32\include\c++\functional:1530:18: note: in
instantiation of function template specialization
      'std::_Mem_fn_base<void (std::thread::*)() __attribute__((thiscall)),
false>::operator()<std::thread, void>' requested here
          return std::forward<_Callable>(std::get<0>(_M_bound))(
                 ^
C:\mingw32\i686-w64-mingw32\include\c++\functional:1520:16: note: in
instantiation of function template specialization
      'std::_Bind_simple<std::_Mem_fn<void (std::thread::*)()
__attribute__((thiscall))>
      (std::reference_wrapper<std::thread>)>::_M_invoke<0>' requested here
        return _M_invoke(_Indices());
               ^
C:\mingw32\i686-w64-mingw32\include\c++\mutex:697:7: note: in instantiation of
member function 'std::_Bind_simple<std::_Mem_fn<void
      (std::thread::*)() __attribute__((thiscall))>
(std::reference_wrapper<std::thread>)>::operator()' requested here
      (*(_Callable*)__once_callable)();
      ^
C:\mingw32\i686-w64-mingw32\include\c++\mutex:720:22: note: in instantiation of
function template specialization
      'std::__once_call_impl<std::_Bind_simple<std::_Mem_fn<void
(std::thread::*)() __attribute__((thiscall))>
      (std::reference_wrapper<std::thread>)> >' requested here
      __once_call = &__once_call_impl<decltype(__bound_functor)>;
                     ^
C:\mingw32\i686-w64-mingw32\include\c++\future:1638:27: note: in instantiation
of function template specialization 'std::call_once<void
      (std::thread::*)() __attribute__((thiscall)),
std::reference_wrapper<std::thread> >' requested here
    void _M_join() { std::call_once(_M_once, &thread::join, ref(_M_thread)); }
                          ^
In file included from as.cpp:1:
In file included from C:\mingw32\i686-w64-mingw32\include\c++\future:38:
C:\mingw32\i686-w64-mingw32\include\c++\functional:680:16: error: non-const
lvalue reference to type 'void () __attribute__((thiscall))'

      cannot bind to a temporary of type 'void'
      { return __object.*_M_pm; }
               ^~~~~~~~~~~~~~~
4 errors generated.



-std=gnu++11 or -std=gnu++14 did not help.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>