Author Topic: Edit Doc Comment Broken C++11 perfect forwarding  (Read 2240 times)

Johnco3

  • Community Member
  • Posts: 53
  • Hero Points: 1
Edit Doc Comment Broken C++11 perfect forwarding
« on: July 24, 2014, 03:27:19 pm »
The following breaks when I attempt to edit the comments:

I was expecting the  template argument @param hrFileInfo to appear rather than the unnamed @param T with the comments dropped.

Code: [Select]
   
  /**
    * Adds loadable files associated with a HR file (potentially a
    * HR also) to the LoadableFileInfo.
    *
    * @param rFileAttr [in]
    * @param hrFileInfo
    *                  [in] command triplet with the associated
    *                  loadable files from the HR
    */
    template<typename T>
    inline void addLoadableFiles(
        const FileAttr& rFileAttr,
        T&& hrFileInfo) {
        // perfect forward fileAttrInfo moving
        // temporaries if possible
        mLoadableFileInfo[rFileAttr] =
            std::forward<T>(hrFileInfo);
    }

which becomes:
Code: [Select]
    /**
     * Adds loadable files associated with a HR file (potentially a
     * HR also) to the LoadableFileInfo.
     *
     * @param T
     * @param rFileAttr [in]
     */
    template<typename T>
    inline void addLoadableFiles(
        const FileAttr& rFileAttr,
        T&& hrFileInfo) {
        // perfect forward fileAttrInfo moving
        // temporaries if possible
        mLoadableFileInfo[rFileAttr] =
            std::forward<T>(hrFileInfo);
    }

Same thing goes for the perfect forwarding setters in C++11

so the following

Code: [Select]
   
    // setter for the options file info - optimized for perfect forwarding
    template<typename T>
    inline void setOptionFileInfo(T&& optionFileInfo) {
        mOptionFileInfo = std::forward<T>(optionFileInfo);
    }

becomes

Code: [Select]
   
   /**
     * setter for the options file info - optimized for perfect forwarding
     *
     * @param T
     */
    template<typename T>
    inline void setOptionFileInfo(T&& optionFileInfo) {
        mOptionFileInfo = std::forward<T>(optionFileInfo);
    }

After invoking the comment editor