Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-870

IChannel operator >>() should not have const parameter.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5 Final
    • 1.6 Alpha
    • Transport (axis3)
    • None

    Description

      The function signature

      virtual const IChannel& operator >> (const char * msg)=0;

      from IChannel.h should not have the parameter be const. The correct signature should be:

      virtual const IChannel& operator >> (char * msg)=0;

      Input streaming operators are non-const. The value of msg will be overwritten by the operator by definition. This function is implemented by casting away const.

      Note: this functions signature is also used in the axis2 IChannel interface.

      Note: that this function is inherently dangerous as it assumes that msg points to at least BUF_SIZE storage. Using a std::string or std::vector<char> would be a better choice.

      Attachments

        Activity

          People

            nadiramra Nadir K. Amra
            duane Duane Murphy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: