
28 Aug
2008
28 Aug
'08
7:07 p.m.
Andrew Hain skrev:
Two quick queries.
Would it make sense to have the iterator increment and decrement operators and begin() member function of ptr_vector< nullable<> > skip missing records so that applications have no need to check?
Well, it is always a design trade-off. If we did that, then people who need to know the index of the null value is in trouble. I do think it would make sense to add some utility iterator/range: boost::ptr_vector<T> vec; ... BOOST_FOREACH( T& e, boost::filter_nulls(vec) ) or something. I'm open to naming ideas :-)
What is stopping pointer container classes from being used with opaque types as a compilation firewall?
Can you be more specific? I have some trouble knowing the precise problem. Thanks -Thorsten