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/04/18 22:03:20 UTC

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

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
 Assigned to: Martin Sebor 
    Priority: Trivial
     Fix For: 4.1.4


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


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

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ 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


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

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ 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


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

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ 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.