You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2007/03/02 00:29:50 UTC

[jira] Closed: (STDCXX-172) error on std::auto_ptr::operator=()

     [ https://issues.apache.org/jira/browse/STDCXX-172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor closed STDCXX-172.
-------------------------------

    Resolution: Invalid

Issue 541 has been resolved so as to remove most of the definition of the specialization:

http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541

That makes the code in the original test case ill-formed. We need to implement the resolution.

> error on std::auto_ptr<void>::operator=<void>()
> -----------------------------------------------
>
>                 Key: STDCXX-172
>                 URL: https://issues.apache.org/jira/browse/STDCXX-172
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 20. General Utilities
>    Affects Versions: 4.1.3
>         Environment: all
>            Reporter: Martin Sebor
>         Assigned To: Martin Sebor
>            Priority: Trivial
>             Fix For: 4.2
>
>
> The program below fails to compile. There is no restriction on the template argument to the assignment operator (other than 17.4.3.6, p2, bullet 5) so the code should compile at least as a matter of QoI.
> $ cat t.cpp && gmake t 
> #include <memory>
> void foo ()
> {
>     std::auto_ptr<void> ap;
>     ap = ap;
>     ap.operator=<void>(ap);
> }
> int main () { }
> CC -c -D_RWSTDDEBUG   -mt -D_RWSTD_USE_CONFIG -I/build/sebor/sunpro-5.8-15S/include -I/amd/devco/sebor/dev/stdlib/include -I/amd/devco/sebor/dev/stdlib/../rwtest -I/amd/devco/sebor/dev/stdlib/../rwtest/include -I/amd/devco/sebor/dev/stdlib/tests/include  -library=%none -g  -xarch=v9 +w  t.cpp
> "/amd/devco/sebor/dev/stdlib/include/rw/_autoptr.h", line 136: Error: Cannot declare a reference to void.
> "t.cpp", line 5:     Where: While specializing "std::auto_ptr<void>".
> "t.cpp", line 5:     Where: Specialized in non-template code.
> 1 Error(s) detected.
> gmake: *** [t.o] Error 1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.