first commit: echo server
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Result.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: acossari <acossari@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/08/20 20:02:19 by acossari #+# #+# */
|
||||
/* Updated: 2026/08/21 20:02:26 by acossari ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <expected>
|
||||
|
||||
#include "http/HttpStatus.hpp"
|
||||
|
||||
namespace webserv {
|
||||
|
||||
// Discarding a Result can hide a request error. Neither this alias nor
|
||||
// std::expected can enforce [[nodiscard]], so every function returning a
|
||||
// Result must declare the attribute itself.
|
||||
template <typename T>
|
||||
using Result = std::expected<T, HttpStatus>;
|
||||
|
||||
} // namespace webserv
|
||||
Reference in New Issue
Block a user