nridge added a comment.

Making the default argument a non-lambda seems to be sufficient to avoid the 
error:

  template <typename>
  class function {
  public:
    template <typename F>
    function(F) {}
  };
  
  void DefaultFunc();
  
  template <typename M>
  void Foo(M, function<void()> = DefaultFunc);
  
  void Bar() {
    Foo(42);
    Foo(42.0);
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105457/new/

https://reviews.llvm.org/D105457

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to