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

Martin Sebor updated STDCXX-172:
--------------------------------

    Fix Version: 4.2
                     (was: 4.1.4)

> 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

Reply via email to