[LLVMbugs] [Bug 10248] New: compiling Poco with libc++

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jul 2 07:13:10 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10248

           Summary: compiling Poco with libc++
           Product: libc++
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: llvm at niebuhrt.de
                CC: llvmbugs at cs.uiuc.edu


This is probably a problem of Poco (pocoproject.org), but I am not sure about
it.
When compiling the following program with libc++ (with or without c++0x) 
//clang++ -c   -stdlib=libc++ -I projects/odemx-http.git/install/include/
main.cpp 

#include <Poco/Data/Statement.h>
#include <Poco/Types.h>
#include <algorithm>
void test(Poco::Data::Statement& s1, Poco::Data::Statement& s2) {
    std::swap<Poco::Data::Statement>( s1, s2);
}

-----------------

Statement.h includes <algorithm>
so the template swap should be in the namespace std

-----------------
I get the following errors:


In file included from main.cpp:1:
projects/odemx-http.git/install/include//Poco/Data/Statement.h:839:7: error: no
function template matches function template specialization 'swap'
        void swap<Poco::Data::Statement>(Poco::Data::Statement& s1, 
             ^
In file included from main.cpp:1:
In file included from
projects/odemx-http.git/install/include//Poco/Data/Statement.h:44:
In file included from
projects/odemx-http.git/install/include//Poco/Data/StatementImpl.h:44:
In file included from
projects/odemx-http.git/install/include//Poco/Data/AbstractBinding.h:44:
In file included from
projects/odemx-http.git/install/include//Poco/Data/AbstractBinder.h:44:
In file included from
projects/odemx-http.git/install/include//Poco/Data/Date.h:44:
In file included from
projects/odemx-http.git/install/include//Poco/Dynamic/VarHolder.h:54:
In file included from /usr/include/c++/v1/vector:261:
/usr/include/c++/v1/__bit_reference:26:26: error: no type named
'__storage_type' in 'Poco::Data::Statement'
    typedef typename _C::__storage_type    __storage_type;
            ~~~~~~~~~~~~~^~~~~~~~~~~~~~
main.cpp:5:36: note: in instantiation of template class
'std::__1::__bit_reference<Poco::Data::Statement>' requested here
        std::swap<Poco::Data::Statement>( s1, s2);
                                          ^
In file included from main.cpp:1:
In file included from
projects/odemx-http.git/install/include//Poco/Data/Statement.h:44:
In file included from
projects/odemx-http.git/install/include//Poco/Data/StatementImpl.h:44:
In file included from
projects/odemx-http.git/install/include//Poco/Data/AbstractBinding.h:44:
In file included from
projects/odemx-http.git/install/include//Poco/Data/AbstractBinder.h:44:
In file included from
projects/odemx-http.git/install/include//Poco/Data/Date.h:44:
In file included from
projects/odemx-http.git/install/include//Poco/Dynamic/VarHolder.h:54:
In file included from /usr/include/c++/v1/vector:261:
/usr/include/c++/v1/__bit_reference:27:26: error: no type named
'__storage_pointer' in 'Poco::Data::Statement'
    typedef typename _C::__storage_pointer __storage_pointer;
            ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__bit_reference:33:25: error: no type named '__self' in
'Poco::Data::Statement'
    friend typename _C::__self;
           ~~~~~~~~~~~~~^~~~~~
main.cpp:5:2: error: no matching function for call to 'swap'
        std::swap<Poco::Data::Statement>( s1, s2);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/memory:3859:1: note: candidate function [with _Tp =
Poco::Data::Statement] not viable: no known conversion from
'Poco::Data::Statement' to
      'shared_ptr<Poco::Data::Statement> &' for 1st argument
swap(shared_ptr<_Tp>& __x, shared_ptr<_Tp>& __y) _NOEXCEPT
^
/usr/include/c++/v1/memory:4040:1: note: candidate function [with _Tp =
Poco::Data::Statement] not viable: no known conversion from
'Poco::Data::Statement' to
      'weak_ptr<Poco::Data::Statement> &' for 1st argument
swap(weak_ptr<_Tp>& __x, weak_ptr<_Tp>& __y) _NOEXCEPT
^
/usr/include/c++/v1/__bit_reference:81:1: note: candidate function [with _C =
Poco::Data::Statement] not viable: no known conversion from
'Poco::Data::Statement' to
      '__bit_reference<Poco::Data::Statement>' for 1st argument
swap(__bit_reference<_C> __x, bool& __y) _NOEXCEPT
^
/usr/include/c++/v1/__bit_reference:91:1: note: candidate function [with _C =
Poco::Data::Statement] not viable: no known conversion from
'Poco::Data::Statement' to 'bool &'
      for 1st argument
swap(bool& __x, __bit_reference<_C> __y) _NOEXCEPT
^
/usr/include/c++/v1/__mutex_base:276:1: note: candidate function [with _Mutex =
Poco::Data::Statement] not viable: no known conversion from
'Poco::Data::Statement' to
      'unique_lock<Poco::Data::Statement> &' for 1st argument
swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) {__x.swap(__y);}
^
/usr/include/c++/v1/__functional_03:1856:1: note: candidate function [with _F =
Poco::Data::Statement] not viable: no known conversion from
'Poco::Data::Statement' to
      'function<Poco::Data::Statement> &' for 1st argument
swap(function<_F>& __x, function<_F>& __y)
^
/usr/include/c++/v1/type_traits:3021:1: note: candidate template ignored:
substitution failure [with _Tp = Poco::Data::Statement]
swap(_Tp& __x, _Tp& __y) _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value
&&
^
/usr/include/c++/v1/utility:183:1: note: candidate template ignored: failed
template argument deduction
swap(_Tp (&__a)[_N], _Tp (&__b)[_N])
_NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
^
/usr/include/c++/v1/utility:404:1: note: candidate template ignored: failed
template argument deduction
swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
^
/usr/include/c++/v1/memory:2259:1: note: candidate template ignored: failed
template argument deduction
swap(__compressed_pair<_T1, _T2>& __x, __compressed_pair<_T1, _T2>& __y)
^
/usr/include/c++/v1/memory:2682:1: note: candidate template ignored: failed
template argument deduction
swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) _NOEXCEPT
{__x.swap(__y);}
^
/usr/include/c++/v1/string:3881:1: note: candidate template ignored: failed
template argument deduction
swap(basic_string<_CharT, _Traits, _Allocator>& __lhs,
^
/usr/include/c++/v1/__bit_reference:71:1: note: candidate template ignored:
failed template argument deduction
swap(__bit_reference<_C> __x, __bit_reference<_D> __y) _NOEXCEPT
^
/usr/include/c++/v1/__split_buffer:638:1: note: candidate template ignored:
failed template argument deduction
swap(__split_buffer<_Tp, _Allocator>& __x, __split_buffer<_Tp, _Allocator>&
__y)
^
/usr/include/c++/v1/vector:2938:1: note: candidate template ignored: failed
template argument deduction
swap(vector<_Tp, _Allocator>& __x, vector<_Tp, _Allocator>& __y)
^
/usr/include/c++/v1/deque:2819:1: note: candidate template ignored: failed
template argument deduction
swap(deque<_Tp, _Allocator>& __x, deque<_Tp, _Allocator>& __y)
^
/usr/include/c++/v1/list:1655:1: note: candidate template ignored: failed
template argument deduction
swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
^
/usr/include/c++/v1/__tree:2281:1: note: candidate template ignored: failed
template argument deduction
swap(__tree<_Tp, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/set:672:1: note: candidate template ignored: failed
template argument deduction
swap(set<_Key, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/set:1005:1: note: candidate template ignored: failed
template argument deduction
swap(multiset<_Key, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/map:1406:1: note: candidate template ignored: failed
template argument deduction
swap(map<_Key, _Tp, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/map:1902:1: note: candidate template ignored: failed
template argument deduction
swap(multimap<_Key, _Tp, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/sstream:336:1: note: candidate template ignored: failed
template argument deduction
swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
^
/usr/include/c++/v1/sstream:613:1: note: candidate template ignored: failed
template argument deduction
swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x,
^
/usr/include/c++/v1/sstream:732:1: note: candidate template ignored: failed
template argument deduction
swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x,
^
/usr/include/c++/v1/sstream:851:1: note: candidate template ignored: failed
template argument deduction
swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x,
^
5 errors generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list