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 2006/07/05 00:34:32 UTC

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

    [ http://issues.apache.org/jira/browse/STDCXX-172?page=comments#action_12419189 ] 

Martin Sebor commented on STDCXX-172:
-------------------------------------

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

> error on std::auto_ptr<void>::operator=<void>()
> -----------------------------------------------
>
>          Key: STDCXX-172
>          URL: http://issues.apache.org/jira/browse/STDCXX-172
>      Project: C++ Standard Library
>         Type: Bug

>   Components: 20. General Utilities
>     Versions: 4.1.3
>  Environment: all
>     Reporter: Martin Sebor
>     Assignee: 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira