#pragma once

/// @file result.h
/// @brief result<T, E> type alias for fl::expected (Rust-style naming)
///
/// This file provides a Rust-style naming alias for the C++23-style expected type.
/// The underlying implementation is in fl/stl/expected.h.
///
/// Example usage:
/// @code
/// result<int> divide(int a, int b) {
///     if (b == 0) {
///         return result<int>::failure(ResultError::INVALID_ARGUMENT, "Division by zero");
///     }
///     return result<int>::success(a / b);
/// }
///
/// auto r = divide(10, 2);
/// if (r.ok()) {
///     int value = r.value();
/// }
/// @endcode

#include "fl/stl/expected.h"

namespace fl {

/// @brief Alias for expected (Rust-style naming)
/// @details Provides familiar result naming while using fl::expected implementation
template<typename T, typename E = ResultError>
using result = expected<T, E>;

} // namespace fl
