[ORC] Remove the 'const' qualifier from the member function wrapper, make the
authorLang Hames <lhames@gmail.com>
Sat, 12 Nov 2016 23:12:41 +0000 (23:12 +0000)
committerLang Hames <lhames@gmail.com>
Sat, 12 Nov 2016 23:12:41 +0000 (23:12 +0000)
lambda in wrapHandler mutable to allow it to pass the handler through as a
non-const value.

llvm-svn: 286732

llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h

index e306517..f616057 100644 (file)
@@ -554,7 +554,7 @@ public:
   using MethodT = RetT(ClassT::*)(ArgTs...);
   MemberFnWrapper(ClassT &Instance, MethodT Method)
       : Instance(Instance), Method(Method) {}
-  RetT operator()(ArgTs &&... Args) const {
+  RetT operator()(ArgTs &&... Args) {
     return (Instance.*Method)(std::move(Args)...);
   }
 private:
@@ -856,7 +856,8 @@ protected:
   template <typename Func, typename HandlerT>
   WrappedHandlerFn wrapHandler(HandlerT Handler, LaunchPolicy Launch) {
     return
-      [this, Handler, Launch](ChannelT &Channel, SequenceNumberT SeqNo) -> Error {
+      [this, Handler, Launch](ChannelT &Channel, SequenceNumberT SeqNo) mutable
+          -> Error {
         // Start by deserializing the arguments.
         auto Args =
           std::make_shared<typename detail::HandlerTraits<HandlerT>::ArgStorage>();