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

ASF subversion and git services commented on IMPALA-13976:
----------------------------------------------------------

Commit de10c584d144fa6459813a792da00abe784f8f5b in impala's branch 
refs/heads/master from Joe McDonnell
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=de10c584d ]

IMPALA-13976: Switch from boost::function/bind/mem_fn to std

Impala's code uses boost::function/bind/mem_fn in several places, but
all of this has been incorporated into the standard library. When
trying to upgrade to newer Boost (1.91.0), the use of boost::bind
and other functionality created conflicts with the standard library.
Given that there is no real advantage to staying with the Boost
version of these, this switches all locations to the standard
library.

One difference is that boost::function has a different API from
std::function. boost::function uses empty() to determine if it is
null whereas std::function can simply be compared to null. Overall,
these differences are minor and this is simply a boilerplate change.

This leaves some uses of boost::function in udf-test-harness.h,
as that file claims to support C++98. These can be removed when
we move that to a more recent C++ version.

Testing:
 - Ran a core job

Change-Id: I769d84b02fbe691b3bf2a6d3f52836d5b684bae0
Reviewed-on: http://gerrit.cloudera.org:8080/21967
Reviewed-by: Michael Smith <[email protected]>
Reviewed-by: Yida Wu <[email protected]>
Tested-by: Michael Smith <[email protected]>


> Replace boost::function/bind/mem_fn with the standard library
> -------------------------------------------------------------
>
>                 Key: IMPALA-13976
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13976
>             Project: IMPALA
>          Issue Type: Task
>          Components: Backend
>    Affects Versions: Impala 5.0.0
>            Reporter: Joe McDonnell
>            Priority: Major
>             Fix For: Impala 5.0.0
>
>
> The standard library now supports std::function/bind/mem_fn that is 
> equivalent to boost's functionality. There are a few minor differences, but 
> it is mostly a drop-in replacement. 
> Some differences:
>  # Placeholders _1 and _2 are in the std placeholders namespace
>  # boost::function uses an empty() method to tell if it is unset. Instead, 
> std::function can be compared to nullptr.
> One upside of switching is that std::function properly supports nullptr where 
> boost requires NULL. It is one of the few locations where using nullptr 
> instead of NULL matters.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to