You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/03/16 23:37:33 UTC

[jira] [Commented] (QPID-7147) When compiling with C++11/14 bind() use gets found as std::bind()

    [ https://issues.apache.org/jira/browse/QPID-7147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15198337#comment-15198337 ] 

ASF subversion and git services commented on QPID-7147:
-------------------------------------------------------

Commit 1735329 from [~astitcher] in branch 'qpid/trunk'
[ https://svn.apache.org/r1735329 ]

QPID-7147: Renamed bind to avoid clash with (new for C++11/14) std::bind - The compiler was finding std::bind in preference due to argument dependent lookup.

> When compiling with C++11/14 bind() use gets found as std::bind()
> -----------------------------------------------------------------
>
>                 Key: QPID-7147
>                 URL: https://issues.apache.org/jira/browse/QPID-7147
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>            Reporter: Andrew Stitcher
>            Assignee: Andrew Stitcher
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org