Use an enum class.
[oota-llvm.git] / include / llvm / Object / Error.h
index 779c747461a898224d83a2c0e53102f2e09a6ad6..5359f498b2e828981b37fa9caf6427c8c2434455 100644 (file)
@@ -21,18 +21,12 @@ namespace object {
 
 const error_category &object_category();
 
-struct object_error {
-  enum Impl {
-    success = 0,
-    arch_not_found,
-    invalid_file_type,
-    parse_failed,
-    unexpected_eof
-  };
-  Impl V;
-
-  object_error(Impl V) : V(V) {}
-  operator Impl() const { return V; }
+enum class object_error {
+  success = 0,
+  arch_not_found,
+  invalid_file_type,
+  parse_failed,
+  unexpected_eof
 };
 
 inline error_code make_error_code(object_error e) {
@@ -43,9 +37,6 @@ inline error_code make_error_code(object_error e) {
 
 template <> struct is_error_code_enum<object::object_error> : std::true_type {};
 
-template <>
-struct is_error_code_enum<object::object_error::Impl> : std::true_type {};
-
 } // end namespace llvm.
 
 #endif