I am curious to know how an auto_ptr is implemented in c++. And i tried to find out where the source of it is located in ubuntu 10.04. I could only find the .h file but couldn't find its implementation. where can i find it?
The .h file is almost certainly its implementation. auto_ptr
is a template. Since template implementations need to be included in full, they're normally in the .h files.
The auto_ptr
is a template, and the whole code is most likely in the header file.
You can check on libstdc++ 4.4 implementation here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With