What is the complexity of std::sort() in the C++ Standard Library? Which sort is applied? Is there any rule of applying any particular sorting algorithm there?<
The C++ standard specifies that the worst-case runtime of std::sort() is in O(n log n) - where n is number of sorted elements (cf. C++11, Section 25.4.1.1).
The standard doesn't specify a particular sorting algorithm.
Thus, a conforming std::sort() implementation is free to choose any algorithm that satisfies the above runtime requirement.
Note that C++ standard revisions before C++11 just required that the average runtime of std::sort() is in O(n log n).
See also the stackoverflow question What algorithms are used in C++11 std::sort in different STL implementations? to get an idea what actual sorting algorithms are used in real-world STL implementations.