Auto pointer in C ++

I am curious to know how auto_ptr is implemented in C ++. And I tried to figure out where the source is in ubuntu 10.04. I could find the .h file, but could not find its implementation. where can i find it?

+4
source share
5 answers

auto_ptr is a template, and all the code is most likely in the header file.

You can check the implementation of libstdc ++ 4.4 here .

+4
source

The .h file is almost certainly its implementation. auto_ptr is a template. Since the implementation of the templates must be fully included, they are usually found in .h files.

+7
source

This is a template class, so the details are displayed in the header file: take a look.

0
source

This is a template, so everything is in the title.

0
source

Here is a link to Scott Meyers auto_ptr

0
source

Source: https://habr.com/ru/post/1336182/


All Articles