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

std::mask_array copy assignment inaccessible

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1
    • 4.3.0
    • 26. Numerics
    • None
    • All.

    • Patch Available
    • Compiler Error

    Description

      The well-formed program below fails to compile because the mask_array copy assignment operator is declared private:

      $ cat z.cpp && make z
      #include <valarray>

      int main ()
      {
      std::valarray<int> va (10);
      std::mask_array<int> ma (va [std::valarray<bool>(1)]);
      ma = ma;
      }
      gcc -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include -I/build/sebor/gcc-4.1.0-11s/include -I/build/sebor/dev/stdlib/examples/include -pedantic -nostdinc++ -g -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long z.cpp
      /build/sebor/dev/stdlib/include/valarray: In function 'int main()':
      /build/sebor/dev/stdlib/include/valarray:1079: error: 'std::mask_array<_TypeT>& std::mask_array<_TypeT>::operator=(const std::mask_array<_TypeT>&) [with _TypeT = int]' is private
      z.cpp:7: error: within this context
      make: *** [z.o] Error 1

      Attachments

        1. stdcxx-311.patch
          2 kB
          Martin Sebor
        2. 26.mask.array.assign.stdcxx-311.cpp
          1 kB
          Martin Sebor

        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:

                Time Tracking

                  Estimated:
                  Original Estimate - 4h
                  4h
                  Remaining:
                  Time Spent - 3h Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - 3h Remaining Estimate - 1h
                  3h