Boost logo

Boost Users :

Subject: [Boost-users] [Range] Extending the library for a base class and all its derived - enable_if
From: Albert Yiamakis (vkicefire_at_[hidden])
Date: 2014-04-23 09:13:22


Hello,

I am looking to make a class, whose definition I cannot touch, model a
Range concept. To that end I use method 2,

http://www.boost.org/doc/libs/1_55_0/libs/range/doc/html/range/reference/extending/method_2.html

However, I am unable to specialize the relevant metafunctions
(range_const_iterator, range_mutable_iterator, range_iterator) since
they do not have an additional template parameter that would permit me
to employ enable_if.

I have found this impossible without touching either the class'
definition or the metafunctions. Perhaps there is some other trick I am
not aware of, in which case I would greatly appreciate hearing about it.

If such a trick does not exist, then should these metafunctions feature
an additional template parameter? Given that this is one of the methods
to extend the library, it would make sense that one wishes to do so on
conditions that enable_if can check.

Albert


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