Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 381
  • Last Modified:

stl sort function

Hi,

I am trying to find the stl's sort function code. Is there any available. The only one I can find is the .h files.

Thanks,
0
zizi21
Asked:
zizi21
2 Solutions
 
ZoppoCommented:
Hi zizi21,

the 'sort' function is implemented in header <algorithm>. There aren't further source files since as it's implemented as function template it has to be implemented in the header.

ZOPPO
0
 
evilrixSenior Software Engineer (Avast)Commented:
There is no standard implementation. All the C++ standard does is define what sort must do but how it's implemented is up to the vendor. More often than not sort is implemented as a quick sort (but it doesn't have to be).
0
 
zizi21Author Commented:
Thanks a million.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now