От: | dmitry_npi | ||
Дата: | 21.01.09 09:55 | ||
Оценка: |
struct My
{
int t;
};
typedef ptr_list<My> MyList;
MyList x;
BOOST_FOREACH(My* p, x)
{
cout << "My: " << p->t << endl;
}
d:\TEST\boost_test\boost_test\boost_test.cpp(28) : error C2440: 'initializing' : cannot convert from 'boost::ptr_container_detail::sequence_config<T,VoidPtrSeq>::U' to 'My *'
with
[
T=My,
VoidPtrSeq=std::list<void *,std::allocator<void *>>
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called