Re: [Boost-bugs] [Boost C++ Libraries] #1974: ambiguous call to ref in vector_of_vector.hpp when using bind.hpp

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1974: ambiguous call to ref in vector_of_vector.hpp when using bind.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-09-22 07:37:58


#1974: ambiguous call to ref in vector_of_vector.hpp when using bind.hpp
----------------------------------+----------------------
  Reporter: Will Moss <wmoss@…> | Owner: guwi17
      Type: Bugs | Status: reopened
 Milestone: To Be Determined | Component: uBLAS
   Version: Boost 1.56.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------+----------------------
Changes (by harrysummerxr@…):

 * version: Boost 1.54.0 => Boost 1.56.0

Comment:

 I'm using Boost 1.56 + MSVC2013. I also this problem, even without
 including bind.hpp. The patch vector_of_vector.patch works like a charm.
 Here is my test code:

 {{{
 #!cpp
 #include "boost/numeric/ublas/matrix.hpp"
 #include "boost/numeric/ublas/matrix_sparse.hpp"
 #include "boost/numeric/ublas/vector_of_vector.hpp"

 int main(int argc, char** argv)
 {
     boost::numeric::ublas::generalized_vector_of_vector<double,
 boost::numeric::ublas::row_major,
 boost::numeric::ublas::vector<boost::numeric::ublas::compressed_vector<double>
> > gvov(10, 10);
     gvov.clear();
     return 0;
 }
 }}}

 My first compile error:
 {{{
 C:\Boost\include\boost-1_56\boost/numeric/ublas/vector_of_vector.hpp(326)
 : error C2668: 'boost::numeric::ublas::ref' : ambiguous call to overloaded
 function
         C:\Boost\include\boost-
 1_56\boost/numeric/ublas/vector_sparse.hpp(178): could be
 'boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>
 &boost::numeric::ublas::ref<boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<T,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>>(const
 VER &)'
         with
         [
             T=size_t
 ,
 VER=boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<size_t>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>
         ]
         C:\Boost\include\boost-
 1_56\boost/numeric/ublas/vector_sparse.hpp(174): or
 'boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>
 &boost::numeric::ublas::ref<boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<T,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>>(VER
 &)'
         with
         [
             T=size_t
 ,
 VER=boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<size_t>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>
         ]
         C:\Program Files (x86)\Microsoft Visual Studio
 12.0\VC\INCLUDE\xrefwrap(697): or 'void std::ref<T>(const _Ty &&)'
 [found using argument-dependent lookup]
         with
         [
 T=boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<size_t>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>
 ,
 _Ty=boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<size_t>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>
         ]
         C:\Program Files (x86)\Microsoft Visual Studio
 12.0\VC\INCLUDE\xrefwrap(691): or 'std::reference_wrapper<T>
 std::ref<T>(_Ty &) throw()' [found using argument-dependent lookup]
         with
         [
 T=boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<size_t>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>
 ,
 _Ty=boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<size_t>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>
         ]
         while trying to match the argument list
 '(boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>)'
         with
         [
             T=size_t
         ]
         C:\Boost\include\boost-
 1_56\boost/numeric/ublas/vector_of_vector.hpp(322) : while compiling class
 template member function 'void
 boost::numeric::ublas::generalized_vector_of_vector<double,boost::numeric::ublas::row_major,boost::numeric::ublas::vector<boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>,boost::numeric::ublas::unbounded_array<boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<T,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>,std::allocator<boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<T,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>>>>>::clear(void)'
         with
         [
             T=size_t
         ]
         D:\test\main.cpp(10) : see reference to function template
 instantiation 'void
 boost::numeric::ublas::generalized_vector_of_vector<double,boost::numeric::ublas::row_major,boost::numeric::ublas::vector<boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>,boost::numeric::ublas::unbounded_array<boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<T,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>,std::allocator<boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<T,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>>>>>::clear(void)'
 being compiled
         with
         [
             T=size_t
         ]
         D:\test\main.cpp(9) : see reference to class template
 instantiation
 'boost::numeric::ublas::generalized_vector_of_vector<double,boost::numeric::ublas::row_major,boost::numeric::ublas::vector<boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<size_t,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>,boost::numeric::ublas::unbounded_array<boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<T,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>,std::allocator<boost::numeric::ublas::compressed_vector<double,0x00,boost::numeric::ublas::unbounded_array<T,std::allocator<T>>,boost::numeric::ublas::unbounded_array<double,std::allocator<double>>>>>>>'
 being compiled
         with
         [
             T=size_t
         ]
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/1974#comment:6>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC