Repository: mesos
Updated Branches:
  refs/heads/master 3515cd0a9 -> b722466cc


Fixed the clang complation problem for the executor tests.

It appears that g++ throws away the cv-qualifiers when doing the
lvalue-to-rvalue conversion for lambdas returning strings but clang does
not, so we make `f3` in `THREADSAFE_Executor_Execute` return a
non-constant string.

Review: https://reviews.apache.org/r/62698/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b722466c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b722466c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b722466c

Branch: refs/heads/master
Commit: b722466ccb453a80e88424662ee25281d47f861e
Parents: 3515cd0
Author: Chun-Hung Hsiao <[email protected]>
Authored: Fri Sep 29 16:26:00 2017 -0700
Committer: Benjamin Hindman <[email protected]>
Committed: Fri Sep 29 16:26:00 2017 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/tests/process_tests.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b722466c/3rdparty/libprocess/src/tests/process_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/process_tests.cpp 
b/3rdparty/libprocess/src/tests/process_tests.cpp
index e494318..952c92c 100644
--- a/3rdparty/libprocess/src/tests/process_tests.cpp
+++ b/3rdparty/libprocess/src/tests/process_tests.cpp
@@ -1273,7 +1273,10 @@ TEST(ProcessTest, THREADSAFE_Executor_Execute)
   AWAIT_READY(f2Result.triggered());
 
   // A non-void immutable lambda.
-  const string f3Result = "f3";
+  // NOTE: It appears that g++ throws away the cv-qualifiers when doing
+  // the lvalue-to-rvalue conversion for the returned string but clang
+  // does not, so `f3` should return a non-constant string.
+  string f3Result = "f3";
   auto f3 = [&f3Result] {
     return f3Result;
   };

Reply via email to