構築しようとしているスクリプトに次のコードがあります。
typedef std::vector< typename Sphere::vec_type > VV;
typedef typename Sphere::vec_type vec_type;
VV v( count , s.dimension() );
for ( int ii=0; ii<count; ++ii ) {
v[ii] = randomPointOnSurface( s );
次のエラーが発生します。
error: no matching function for call to 'std::vector<std::vector<float, std::allocator<float> >, std::allocator<std::vector<float, std::allocator<float> > > >::_M_fill_initialize(size_t, int&)'
/usr/include/c++/4.4/bits/stl_vector.h:1033: note: candidates are: void std::vector<_Tp, _Alloc>::_M_fill_initialize(size_t, const _Tp&) [with _Tp = std::vector<float, std::allocator<float> >, _Alloc = std::allocator<std::vector<float, std::allocator<float> > >]
回避策は s.dimension() を削除することですが、これを修正できる他の方法はありますか?