Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-7147

When compiling with C++11/14 bind() use gets found as std::bind()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • qpid-cpp-1.35.0
    • C++ Broker
    • None

    Description

      This is a poor naming issue that wasn't a problem before.

      In qpid/messaging/amqp/AddressHelper.cpp there are a number of anonymous functions called bind() which take std::string as one of their argument types. Additionally the include chain indirectly includes <functional>.

      Because of C++ argument dependent lookup the compiler is finding/using std::bind in preference to the locally declared bind. This is only an issue when compiling with C++11/14 because std::bind did not exist before.

      This issue might have gone undetected except that the compiler noted that one of the overloads of the local bind() was unused.

      A most pernicious problem and hard to detect.

      Attachments

        Issue Links

          Activity

            People

              astitcher Andrew Stitcher
              astitcher Andrew Stitcher
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: