
Hello Thorsten,
| It would be useful to have many more examples in documentation, | showing how to use it together with other Boost libraries.
Can you give an example of what you have in mind?
I mean snippet for each of function provided by the library, applied to more exotic containers - just to show it works with them and how. _______________________________________________________
multi_index_container? I can't remember if it fulfills the standard container requirements.
Yes, it does. _______________________________________________________
| 10. collection_traits.html, Semantics section, tables: | it doesn't make sense to me what middle column contains.
ok, would a table with
--------------Abbreviations----------- SC = std container T = the type used in arrays P = std::pair etc
help
?
Yes. _______________________________________________________
| 12. collection_traits.html, Portability section: | | bcc6 ==>> BCB 6.4
I'm just curious, did you compile the test with that compiler?
Tried now. I got error: [C++ Error] end.hpp(78): E2285 Could not find a match for 'collection_traits_detail::array_end<T,sz>(int *)' Full parser context end.hpp(77): decision to instantiate: int * int * end<int,10>(int ( &)[10]) --- Resetting parser context for instantiation... algorithm_example.cpp(1): #include C:\Temp\boost-sandbox\boost\collection_traits.hpp collection_traits.hpp(14): #include C:\Temp\boost-sandbox\boost/collection_traits/functions.hpp functions.hpp(15): #include C:\Temp\boost-sandbox\boost/collection_traits/end.hpp end.hpp(27): namespace boost end.hpp(29): namespace collection_traits end.hpp(77): parsing: int * int * end<int,10>(int ( &)[10]) fixed with: #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x564)) # undef BOOST_CT_NO_ARRAY_SUPPORT #endif in config.hpp (or something like this). ------------------ BCB doesn't like to move function via using directive. E.g. in begin.hpp: } // namespace 'collection_traits' using collection_traits::begin; <<<=== this makes BCB crash } // namespace boost Either BCB will be unsupported or the inner namespace needs to be conditionally removed for this compiler. If you want to try the port, it should maybe wait all other problems get fixed. ------------------ There are other problems with MPL and type traits I reported. | _______________________________________________________
| 16. I once thought about having typedef boost::end | and containers with overload of operator[]. | | It would allow to write: | | a_container[boost::end - 1] | | to access last element of container. | | a_container[boost::end - 2] would be one before | | the last one. Python has such feature. | | | Is there some way to have such support in Container | Traits?
so you're describing a search facility for [] containers. it will work a bit strange with map, wouldn't it? we can't use boost::end, but maybe boost::last. In some sense it correponds to
I regret boost::end is taken. I'll think about boost::last. I guess there's no way for vector<int> v; v[boost::end - 1]; to compile and give what I'd like, now.
Maybe that could justify having reverse_iterator_of<> and const_reverse_iterator_of<> + rbegin(), rend(). ?
Yes, this looks as good idea. _______________________________________________________
| 31. functions.hpp\: some commenst should be added. | The source has 21 kB. The MPL expressions here | are quite complex...
isn't that overkill?
I guess it isn't. Maybe pseudocode for the MPL expressions can be added, as it is with Serialization. | _______________________________________________________
| 32. functions.hpp: in list of types | | char, | signed char, | unsigned char, | signed short, | unsigned short, | signed int, | unsigned int, | signed long, | | shouldn't floats and long long/__int64 be there as well?
hm...I think you're looking in a file that is depricated.. detail/function.hpp is not officially part of the dist.
??? I use the zip from Boost Files section, downloaded just today. _______________________________________________________
| 35. naming conventions: maybe names as iterator_ should | be replaced with something else. Underscore is easy | to miss and is quite unusual.
_impl ?
Can be. /Pavel