[PATCH] D51490: [Error] Fix template deduction in createFileError

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 6 17:08:08 PDT 2018


zturner added inline comments.


================
Comment at: include/llvm/Support/Error.h:1210-1216
+template <class Err, typename = typename std::enable_if<
+                         std::is_base_of<Error, Err>::value &&
+                             !std::is_base_of<ErrorSuccess, Err>::value,
+                         Err>::type>
 inline Error createFileError(std::string F, Err E) {
   return FileError::build(F, std::move(E));
 }
----------------
What if you just write:

`Error createFileError(std::string F, ErrorSuccess) = delete;`

Does that also solve the problem?


Repository:
  rL LLVM

https://reviews.llvm.org/D51490





More information about the llvm-commits mailing list