Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-474

std::mask_array fails to privatize get_array member

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.1.2, 4.1.3
    • 4.2.0
    • 26. Numerics
    • None
    • all

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              sebor Martin Sebor
              sebor Martin Sebor
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: