However, when I first saw it I thought it must be wrong because I assumed that add_const on a reference would would return a const reference. In other words, the code below would be false:
bool a = is_same
::type, int &>::value; However! bool "a" is true. So my question is why is "a" true? Why isn't add_const
::type == int const &?
I thought the same thing at first but it makes senses when we compare
a reference to a constant pointer.
add_const
Thanks,
Chris
Philippe