I need to define a template struct such that:
element<T>::type
is of type:
T::element_type
if T contains a (public) typedef named element_type, otherwise (if it does not contain such typedef)
element<T>::type
is of type
T::value_type
if T is mutable and of type
const T::value_type
if T is constant.
I am really struggling with this, any suggestion is very appreciated! 🙂
Thank you very much for your help in advance!
Maybe something like:
This should of course be split up and organized.