Boost logo

Boost Users :

From: abir basak (abirbasak_at_[hidden])
Date: 2007-02-07 06:06:42


Hi,
   Is there any boost utility which statically determines if a template
parameter is const or not? ( MPL library ?)

I need to design something like boost::sub_range, but little different
(It will iterate over arbitrary sequence stored in a vector form, rather
than a sequence stored in pair form).
like,
template<typename C>
class index_range{
private:
   C* container_;
   std::vector<size_type> index_;
};
container & index will be passed through constructor.
Now if C is const container it will return const_reference etc.

Thus what is needed is something like,
container_traits<const std::vector>::iterator is a const_iterator
while container_traits<std::vector>::iterator is a iterator etc.

Thank you for any kind of help.

-- 
Abir Basak, Member IEEE
Software Engineer, Read Ink Technologies
B. Tech, IIT Kharagpur
email: abir_at_[hidden]
homepage: www.abirbasak.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net