Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-788

Number of 'const' qualifiers in return values

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Fixed
    • Affects Version/s: 0.2.0
    • Fix Version/s: 3.0.0-rc0
    • Component/s: API
    • Labels:
      None
    • Sprint:
      Platforms E (01/08/16)

      Description

      In current master branch (currently checking cdf412bb6ea4692add71e00d39db60a9d5a61f97 commit) there is a number of const qualifiers on API functions which produces compilation warnings/errors

      /usr/include/mongocxx/v0.3/mongocxx/options/index.hpp:48:34: error: 'const' type qualifier on return type has no effect [-Werror,-Wignored-qualifiers]
              MONGOCXX_PRIVATE virtual const int type() const = 0;
                                       ^~~~~~
      /usr/include/mongocxx/v0.3/mongocxx/options/index.hpp:75:26: error: 'const' type qualifier on return type has no effect [-Werror,-Wignored-qualifiers]
              MONGOCXX_PRIVATE const int type() const override;
                               ^~~~~~
      

      I think the check for ignored qualifiers should be added to CI also since current version breaks application build with -Wall -Wextra -Werror flags.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: