Background:
I tried to answer the question Why isn't my overloading < operator not working for STL sort. One of my suggestion (apart from using predicate) was to move the custom operator <
for std::string
in namespace std so that it can be preferred by the compiler over templated version.
At lightening speed the answer was down-voted with following comment from a highly reputed user:
This is undefined behaviour, you are not allowed to add declarations to namespace std because it can change the behaviour of the standard library componens
My Question:
Is it okay to add template specialization for stl types even if the declaration of this specialization doesn't contain user defined data type?
p.s. I have deleted my answer as I am afraid it may be possibly wrong