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/07/08 20:31:04 UTC

[jira] Created: (STDCXX-474) std::mask_array fails to privatize get_array member

std::mask_array fails to privatize get_array member
---------------------------------------------------

                 Key: STDCXX-474
                 URL: https://issues.apache.org/jira/browse/STDCXX-474
             Project: C++ Standard Library
          Issue Type: Bug
          Components: 26. Numerics
    Affects Versions: 4.1.2, 4.1.3
         Environment: all
            Reporter: Martin Sebor
            Assignee: Martin Sebor
            Priority: Minor
             Fix For: 4.2


The well-formed program below fails to compile with stdcxx 4.1.3 because the user-defined name get_array is being used by std::mask_array:

$ cat t.cpp && make t
#define get_array()   "error"

#include <valarray>

int main ()
{
    std::valarray<int> v;
}
gcc -c -I/home/sebor/stdcxx-4.1.3/include/ansi -D_RWSTDDEBUG    -D_RWSTD_USE_CONFIG -I/build/sebor/stdcxx-4.1.3-gcc-4.1.1-11S/include -I/home/sebor/stdcxx-4.1.3/include -I/home/sebor/stdcxx-4.1.3/examples/include  -pedantic -nostdinc++ -g  -m64 -Wall -W -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align  t.cpp
/home/sebor/stdcxx-4.1.3/include/valarray:1525: error: expected unqualified-id before string constant
/home/sebor/stdcxx-4.1.3/include/valarray: In copy constructor 'std::mask_array<_TypeT>::mask_array(const std::mask_array<_TypeT>&)':
/home/sebor/stdcxx-4.1.3/include/valarray:1513: error: expected unqualified-id before string constant
/home/sebor/stdcxx-4.1.3/include/valarray: At global scope:
/home/sebor/stdcxx-4.1.3/include/valarray:1633: error: expected unqualified-id before string constant
/home/sebor/stdcxx-4.1.3/include/valarray: In copy constructor 'std::indirect_array<_TypeT>::indirect_array(const std::indirect_array<_TypeT>&)':
/home/sebor/stdcxx-4.1.3/include/valarray:1620: error: expected unqualified-id before string constant
make: *** [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.


[jira] Closed: (STDCXX-474) std::mask_array fails to privatize get_array member

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor closed STDCXX-474.
-------------------------------

    Resolution: Fixed

Fixed. Tested by tests/intro/17.names.cpp.

> std::mask_array fails to privatize get_array member
> ---------------------------------------------------
>
>                 Key: STDCXX-474
>                 URL: https://issues.apache.org/jira/browse/STDCXX-474
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 26. Numerics
>    Affects Versions: 4.1.3, 4.1.2
>         Environment: all
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>            Priority: Minor
>             Fix For: 4.2
>
>
> The well-formed program below fails to compile with stdcxx 4.1.3 because the user-defined name get_array is being used by std::mask_array:
> $ cat t.cpp && make t
> #define get_array()   "error"
> #include <valarray>
> int main ()
> {
>     std::valarray<int> v;
> }
> gcc -c -I/home/sebor/stdcxx-4.1.3/include/ansi -D_RWSTDDEBUG    -D_RWSTD_USE_CONFIG -I/build/sebor/stdcxx-4.1.3-gcc-4.1.1-11S/include -I/home/sebor/stdcxx-4.1.3/include -I/home/sebor/stdcxx-4.1.3/examples/include  -pedantic -nostdinc++ -g  -m64 -Wall -W -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align  t.cpp
> /home/sebor/stdcxx-4.1.3/include/valarray:1525: error: expected unqualified-id before string constant
> /home/sebor/stdcxx-4.1.3/include/valarray: In copy constructor 'std::mask_array<_TypeT>::mask_array(const std::mask_array<_TypeT>&)':
> /home/sebor/stdcxx-4.1.3/include/valarray:1513: error: expected unqualified-id before string constant
> /home/sebor/stdcxx-4.1.3/include/valarray: At global scope:
> /home/sebor/stdcxx-4.1.3/include/valarray:1633: error: expected unqualified-id before string constant
> /home/sebor/stdcxx-4.1.3/include/valarray: In copy constructor 'std::indirect_array<_TypeT>::indirect_array(const std::indirect_array<_TypeT>&)':
> /home/sebor/stdcxx-4.1.3/include/valarray:1620: error: expected unqualified-id before string constant
> make: *** [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.