From befde76cfa46c766e81f74eb5ac65d3dae2dde87 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 19 Apr 2025 17:33:26 +0200 Subject: dev, LibCompiler, tooling: refactor and separate components into modules (cppdrv, cxxdrv) Signed-off-by: Amlal El Mahrouss --- dev/LibCompiler/NFC/ErrorOr.h | 61 ------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 dev/LibCompiler/NFC/ErrorOr.h (limited to 'dev/LibCompiler/NFC/ErrorOr.h') diff --git a/dev/LibCompiler/NFC/ErrorOr.h b/dev/LibCompiler/NFC/ErrorOr.h deleted file mode 100644 index 9dc607e..0000000 --- a/dev/LibCompiler/NFC/ErrorOr.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * ======================================================== - * - * LibCompiler - * Copyright (C) 2024-2025 Amlal El Mahrouss, all rights reserved. - * - * ======================================================== - */ - -#pragma once - -#include -#include - -namespace LibCompiler -{ - using ErrorT = UInt32; - - template - class ErrorOr final - { - public: - ErrorOr() = default; - ~ErrorOr() = default; - - public: - explicit ErrorOr(Int32 err) - : mId(err) - { - } - - explicit ErrorOr(nullPtr Null) - { - } - - explicit ErrorOr(T Class) - : mRef(Class) - { - } - - ErrorOr& operator=(const ErrorOr&) = default; - ErrorOr(const ErrorOr&) = default; - - Ref Leak() - { - return mRef; - } - - operator bool() - { - return mRef; - } - - private: - Ref mRef; - Int32 mId{0}; - }; - - using ErrorOrAny = ErrorOr; - -} // namespace LibCompiler -- cgit v1.2.3