Quote:
--------------------------------------------------
Phone Call 1:
Support: "Hello, Pacific Group C++ tech support. How may we help you".
C++ Coder: "I have a problem with your implementation of std::sort. I sent you an email with the code attached. I'm attempting to sort this class, but std::sort is not working".
Support: "Yes, we saw your e-mail, and according to ANSI C++ specs, it should work. We'll report this to the engineers right away."
C++ Coder: "Thank you"
-------------------------------------------------
Phone Call 2:
Support: "Hello, Pacific Group C++ tech support. How may we help you".
C++ Coder: "I have a problem with your implementation of qsort. I sent you an email with the code attached. I'm attempting to sort this class, but qsort is not working".
Support: "Yes, we saw your e-mail, and according to ANSI C++ specs, the standard library qsort() is not guaranteed to sort these types of classes."
C++ Coder: "Yes, but, it works on VC++..."
Support: "Sorry sir, but qsort is not required to sort these types of classes correctly. If you have a problem with qsort sorting integers, doubles, etc. then we will fix it right away."
C++ Coder: "What do you mean? Are you stupid?"
Support: "Sir, if you have a complaint, I can have other engineers explain that qsort is not guaranteed to work correctly for these classes as the ANSI C++ specification makes no guarantees that qsort work for these classes."
C++ Coder: "What do you mean? I can't believe this! You people there know nothing about...Hello...Hello.."
--------------------------------------------------
So the bottom line is whether the compiler vendor is required to fix qsort if it can't sort a non-POD class for the compiler to be compliant. The answer is an emphatic