+enum class ColorErrorCode { INVALID_COLOR };
+
+struct ColorError : std::runtime_error {
+ using std::runtime_error::runtime_error;
+};
+
+ColorError makeConversionError(ColorErrorCode, StringPiece sp) {
+ return ColorError("Invalid my::Color representation : " + sp.str());
+}
+
+Expected<StringPiece, ColorErrorCode> parseTo(
+ StringPiece in,
+ Color& out) noexcept {