![]() |
Blitz Support : |
From: Patrik Jonsson (patrik_at_[hidden])
Date: 2004-06-10 19:22:52
Hello,
I'm trying to construct a vector from an array using:
Array<double,1> a;
vector<double> v(a.begin(),a.end());
but it doesn't work. I'm getting compiler errors saying that the array
iterator class is lacking typedefs (see below). Is this a problem with the
blitz iterators, or am I doing something wrong?
Regards,
/Patrik
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/iterator", line 43: error: class
"blitz::ArrayIterator<blitz::Array<mcrx::T_float, 1>::T_numtype, 1>"
has no member "value_type"
typedef typename Iterator::value_type value_type;
^
detected during:
instantiation of class "std::iterator_traits<Iterator> [with
Iterator=blitz::ArrayIterator<blitz::Array<mcrx::T_float,
1>::T_numtype, 1>]" at line 69 of
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/vector"
instantiation of "void std::vector<T,
Allocator>::_initialize(InputIterator, InputIterator,
std::vector<T, Allocator>::_Helper<false> *) [with
T=mcrx::T_float,
Allocator=std::allocator<mcrx::T_float>,
InputIterator=blitz::ArrayIterator<blitz::Array<mcrx::T_f
loat, 1>::T_numtype, 1>]" at line 128 of
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/vector"
instantiation of "std::vector<T, Allocator>::vector(InputIterator,
InputIterator, const Allocator &) [with T=mcrx::T_float,
Allocator=std::allocator<mcrx::T_float>,
InputIterator=blitz::ArrayIterator<blitz::Array<mcrx::T_f
loat, 1>::T_numtype, 1>]" at line 994 of
"mcrx-extras.cc"
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/iterator", line 44: error: class
"blitz::ArrayIterator<blitz::Array<mcrx::T_float, 1>::T_numtype, 1>"
has no member "difference_type"
typedef typename Iterator::difference_type difference_type;
^
detected during:
instantiation of class "std::iterator_traits<Iterator> [with
Iterator=blitz::ArrayIterator<blitz::Array<mcrx::T_float,
1>::T_numtype, 1>]" at line 69 of
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/vector"
instantiation of "void std::vector<T,
Allocator>::_initialize(InputIterator, InputIterator,
std::vector<T, Allocator>::_Helper<false> *) [with
T=mcrx::T_float,
Allocator=std::allocator<mcrx::T_float>,
InputIterator=blitz::ArrayIterator<blitz::Array<mcrx::T_f
loat, 1>::T_numtype, 1>]" at line 128 of
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/vector"
instantiation of "std::vector<T, Allocator>::vector(InputIterator,
InputIterator, const Allocator &) [with T=mcrx::T_float,
Allocator=std::allocator<mcrx::T_float>,
InputIterator=blitz::ArrayIterator<blitz::Array<mcrx::T_f
loat, 1>::T_numtype, 1>]" at line 994 of
"mcrx-extras.cc"
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/iterator", line 45: error: class
"blitz::ArrayIterator<blitz::Array<mcrx::T_float, 1>::T_numtype, 1>"
has no member "pointer"
typedef typename Iterator::pointer pointer;
^
detected during:
instantiation of class "std::iterator_traits<Iterator> [with
Iterator=blitz::ArrayIterator<blitz::Array<mcrx::T_float,
1>::T_numtype, 1>]" at line 69 of
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/vector"
instantiation of "void std::vector<T,
Allocator>::_initialize(InputIterator, InputIterator,
std::vector<T, Allocator>::_Helper<false> *) [with
T=mcrx::T_float,
Allocator=std::allocator<mcrx::T_float>,
InputIterator=blitz::ArrayIterator<blitz::Array<mcrx::T_f
loat, 1>::T_numtype, 1>]" at line 128 of
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/vector"
instantiation of "std::vector<T, Allocator>::vector(InputIterator,
InputIterator, const Allocator &) [with T=mcrx::T_float,
Allocator=std::allocator<mcrx::T_float>,
InputIterator=blitz::ArrayIterator<blitz::Array<mcrx::T_f
loat, 1>::T_numtype, 1>]" at line 994 of
"mcrx-extras.cc"
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/iterator", line 46: error: class
"blitz::ArrayIterator<blitz::Array<mcrx::T_float, 1>::T_numtype, 1>"
has no member "reference"
typedef typename Iterator::reference reference;
^
detected during:
instantiation of class "std::iterator_traits<Iterator> [with
Iterator=blitz::ArrayIterator<blitz::Array<mcrx::T_float,
1>::T_numtype, 1>]" at line 69 of
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/vector"
instantiation of "void std::vector<T,
Allocator>::_initialize(InputIterator, InputIterator,
std::vector<T, Allocator>::_Helper<false> *) [with
T=mcrx::T_float,
Allocator=std::allocator<mcrx::T_float>,
InputIterator=blitz::ArrayIterator<blitz::Array<mcrx::T_f
loat, 1>::T_numtype, 1>]" at line 128 of
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/vector"
instantiation of "std::vector<T, Allocator>::vector(InputIterator,
InputIterator, const Allocator &) [with T=mcrx::T_float,
Allocator=std::allocator<mcrx::T_float>,
InputIterator=blitz::ArrayIterator<blitz::Array<mcrx::T_f
loat, 1>::T_numtype, 1>]" at line 994 of
"mcrx-extras.cc"
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/iterator", line 47: error: class
"blitz::ArrayIterator<blitz::Array<mcrx::T_float, 1>::T_numtype, 1>"
has no member "iterator_category"
typedef typename Iterator::iterator_category iterator_category;
^
detected during:
instantiation of class "std::iterator_traits<Iterator> [with
Iterator=blitz::ArrayIterator<blitz::Array<mcrx::T_float,
1>::T_numtype, 1>]" at line 69 of
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/vector"
instantiation of "void std::vector<T,
Allocator>::_initialize(InputIterator, InputIterator,
std::vector<T, Allocator>::_Helper<false> *) [with
T=mcrx::T_float,
Allocator=std::allocator<mcrx::T_float>,
InputIterator=blitz::ArrayIterator<blitz::Array<mcrx::T_f
loat, 1>::T_numtype, 1>]" at line 128 of
"/usr/common/usg/KCC/4.0f9/KCC_BASE/include/vector"
instantiation of "std::vector<T, Allocator>::vector(InputIterator,
InputIterator, const Allocator &) [with T=mcrx::T_float,
Allocator=std::allocator<mcrx::T_float>,
InputIterator=blitz::ArrayIterator<blitz::Array<mcrx::T_f
loat, 1>::T_numtype, 1>]" at line 994 of
"mcrx-extras.cc"
============================================================
Patrik Jonsson (831) 459-3809
Department of Astronomy & Astrophysics
University of California, Santa Cruz, CA 95064
This message has been written using a voice recognition system.
Words that don't make sense or not the fault of the author...