std:auto_ptr deprecated? - c++

This is a discussion on std:auto_ptr deprecated? - c++ ; Hi, I am looking at a pdf file of the standard and std::auto_ptr seems to be scratched out. Can someone please comment on the status / future plans for this class? Thanks, Ivan Novick http://www.0x4849.net -- [ See http://www.gotw.ca/resources/clcm.htm for ...

+ Reply to Thread
Results 1 to 10 of 10

std:auto_ptr deprecated?

  1. Default std:auto_ptr deprecated?

    Hi,

    I am looking at a pdf file of the standard and std::auto_ptr seems to
    be scratched out.

    Can someone please comment on the status / future plans for this
    class?

    Thanks,

    Ivan Novick
    http://www.0x4849.net


    --
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]


  2. Default Re: std:auto_ptr deprecated?

    On 20 Aug, 11:25, Ivan Novick <i...@0x4849.net> wrote:
    > Hi,
    >
    > I am looking at a pdf file of the standard and std::auto_ptr seems to
    > be scratched out.
    >


    Can you give me the link of pdf? What is that document?


    --
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]


  3. Default Re: std:auto_ptr deprecated?

    On 20 Aug, 11:25, Ivan Novick <i...@0x4849.net> wrote:

    > I am looking at a pdf file of the standard and std::auto_ptr seems to
    > be scratched out.
    >
    > Can someone please comment on the status / future plans for this
    > class?


    This says it is not deprecated
    http://groups.google.co.uk/group/com...c55659d1e01501
    Is it some later paper you are referring to?


    --
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]


  4. Default Re: std:auto_ptr deprecated?

    On Aug 20, 7:13 am, "sy8111.pub..."
    <sy8111.pub...> wrote:
    > On 20 Aug, 11:25, Ivan Novick <i...@0x4849.net> wrote:
    >
    > > Hi,

    >
    > > I am looking at a pdf file of the standard and std::auto_ptr seems to
    > > be scratched out.

    >
    > Can you give me the link of pdf? What is that document?


    On this page: http://www.open-std.org/JTC1/SC22/WG21/
    http://www.open-std.org/JTC1/SC22/WG...2007/n2315.pdf

    It is just the latest draft of the standard as of June 2007

    ---
    Ivan Novick
    http://www.0x4849.net


    --
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]


  5. Default Re: std:auto_ptr deprecated?

    Maxim Yegorushkin wrote:
    :: On 20 Aug, 11:25, Ivan Novick <i...@0x4849.net> wrote:
    ::
    ::: I am looking at a pdf file of the standard and std::auto_ptr
    ::: seems to be scratched out.
    :::
    ::: Can someone please comment on the status / future plans for this
    ::: class?
    ::
    :: This says it is not deprecated
    ::
    http://groups.google.co.uk/group/com...c55659d1e01501
    :: Is it some later paper you are referring to?
    ::

    It's not deprecated yet, but it seem like it will be in the next
    revision of the standard, C++09 or so.


    Bo Persson



    --
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]


  6. Default Re: std:auto_ptr deprecated?

    Bo Persson ha scritto:
    > Maxim Yegorushkin wrote:
    > :: On 20 Aug, 11:25, Ivan Novick <i...@0x4849.net> wrote:
    > ::
    > ::: I am looking at a pdf file of the standard and std::auto_ptr
    > ::: seems to be scratched out.
    > :::
    > ::: Can someone please comment on the status / future plans for this
    > ::: class?
    > ::
    > :: This says it is not deprecated
    > ::
    > http://groups.google.co.uk/group/com...c55659d1e01501
    > :: Is it some later paper you are referring to?
    > ::
    >
    > It's not deprecated yet, but it seem like it will be in the next
    > revision of the standard, C++09 or so.
    >


    In fact the latest publicly available draft lists auto_ptr in appendix
    D, meaning that there is clear intent to formally deprecate it in the
    next revision of C++. A new class named unique_ptr is going to provide a
    replacement for auto_ptr, the main difference being that unique_ptr uses
    rvalue-references instead of voodoo magic to properly achieve move semantic.

    Ganesh

    --
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]


  7. Default Re: std:auto_ptr deprecated?

    Alberto Ganesh Barbati <AlbertoBarbati@libero.it> wrote in
    news:75oyi.92035$%k.235144@twister2.libero.it:

    > In fact the latest publicly available draft lists auto_ptr in appendix
    > D, meaning that there is clear intent to formally deprecate it in the
    > next revision of C++. A new class named unique_ptr is going to provide
    > a replacement for auto_ptr, the main difference being that unique_ptr
    > uses rvalue-references instead of voodoo magic to properly achieve
    > move semantic.


    Is a reference implementation available? Is it too early to start using it?

    --
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]


  8. Default Re: std:auto_ptr deprecated?

    On 2007-08-21 10:21:44 -0400, Kenneth Porter
    <shiva.blacklist@sewingwitch.com> said:

    > Alberto Ganesh Barbati <AlbertoBarbati@libero.it> wrote in
    > news:75oyi.92035$%k.235144@twister2.libero.it:
    >
    >> In fact the latest publicly available draft lists auto_ptr in appendix
    >> D, meaning that there is clear intent to formally deprecate it in the
    >> next revision of C++. A new class named unique_ptr is going to provide
    >> a replacement for auto_ptr, the main difference being that unique_ptr
    >> uses rvalue-references instead of voodoo magic to properly achieve
    >> move semantic.

    >
    > Is a reference implementation available? Is it too early to start using it?


    There are no reference implementations for anything in the C++
    standard. There are proof of concept implementations and widely used
    implementations that are sometimes erroneously referred to as
    "reference implementations".

    --
    Pete
    Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The
    Standard C++ Library Extensions: a Tutorial and Reference
    (www.petebecker.com/tr1book)



    [ See http://www.gotw.ca/resources/clcm.htm for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]


  9. Default Re: std:auto_ptr deprecated?

    Kenneth Porter ha scritto:
    > Alberto Ganesh Barbati <AlbertoBarbati@libero.it> wrote in
    > news:75oyi.92035$%k.235144@twister2.libero.it:
    >
    >> In fact the latest publicly available draft lists auto_ptr in appendix
    >> D, meaning that there is clear intent to formally deprecate it in the
    >> next revision of C++. A new class named unique_ptr is going to provide
    >> a replacement for auto_ptr, the main difference being that unique_ptr
    >> uses rvalue-references instead of voodoo magic to properly achieve
    >> move semantic.

    >
    > Is a reference implementation available? Is it too early to start using it?
    >


    In order to use unique_ptr you need first to have a compiler which
    properly supports rvalue references. These can be hard to find nowadays,
    as the feature has not yet been standardized, although the situation is
    quickly improving. For example GCC has very recently added the feature
    in v4.3 (http://gcc.gnu.org/gcc-4.3/cxx0x_status.html). If you are lucky
    enough to have one of those compilers, most probably they already ship a
    version of unique_ptr (it's a sort of benchmark for the feature, you
    know). In any case, you can find reference implementations on the
    internet by just googling unique_ptr.

    HTH,

    Ganesh

    --
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]


  10. Default Re: std:auto_ptr deprecated?

    In article <Xns99935FD51B0A7shivawellcom@216.196.97.136>,
    Kenneth Porter <shiva.blacklist@sewingwitch.com> wrote:

    > Alberto Ganesh Barbati <AlbertoBarbati@libero.it> wrote in
    > news:75oyi.92035$%k.235144@twister2.libero.it:
    >
    > > In fact the latest publicly available draft lists auto_ptr in appendix
    > > D, meaning that there is clear intent to formally deprecate it in the
    > > next revision of C++. A new class named unique_ptr is going to provide
    > > a replacement for auto_ptr, the main difference being that unique_ptr
    > > uses rvalue-references instead of voodoo magic to properly achieve
    > > move semantic.

    >
    > Is a reference implementation available? Is it too early to start using it?


    Here is a reference implementation. It requires a the rvalue reference
    language feature.

    http://home.twcny.rr.com/hinnant/cpp...nique_ptr.html

    There is a C++03 approximation implementation linked off the above link.

    -Howard

    --
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]


+ Reply to Thread

Similar Threads

  1. Re: auto_ptr definition
    By Application Development in forum c++
    Replies: 0
    Last Post: 11-27-2007, 09:48 AM
  2. auto_ptr who is right?
    By Application Development in forum c++
    Replies: 18
    Last Post: 09-05-2007, 08:38 PM
  3. Replies: 0
    Last Post: 08-07-2007, 03:36 AM
  4. auto_ptr...
    By Application Development in forum c++
    Replies: 1
    Last Post: 06-12-2007, 01:47 AM
  5. Replies: 3
    Last Post: 05-11-2007, 04:33 AM