[Lldb-commits] [PATCH] D48295: [WIP] Implement new ReturnMIStatus method of CMICmdBase class.

Alexander Polyakov via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 20 14:08:43 PDT 2018


apolyakov added a comment.

With such overloads we'll get compile time error. If we have overload:

  bool HandleSBError(SBError error, std::function<bool()> successHandler = [] {some func}, std::function<void()> errorHandler = [] {some func});
  bool HandleSBError(SBError error, std::function<void()> errorHandler);

and call it like:

  auto successCase = [] {
    ...
    return MIstatus::failure;
  }
  
  bool status = HandleSBError(error, successCase);

we get compile error: call of HandleSBError is ambiguous.


https://reviews.llvm.org/D48295





More information about the lldb-commits mailing list