diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-04-11 02:20:31 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-04-11 02:20:31 +0800 |
| commit | 98e88c01eb0e6404d1c5f49a22165d0861e6b924 (patch) | |
| tree | d016d445fe476f747eea9030896214adeaacf51f /include/ricochet/net/sys/string_view_range.hh | |
| parent | 44ad3c8b36540c6b0b3144a21ac40310e163bb19 (diff) | |
| download | rwebbrowser-98e88c01eb0e6404d1c5f49a22165d0861e6b924.tar.gz rwebbrowser-98e88c01eb0e6404d1c5f49a22165d0861e6b924.tar.xz | |
feat: implement basic HTTP client with socket and address networking utilities
Diffstat (limited to 'include/ricochet/net/sys/string_view_range.hh')
| -rw-r--r-- | include/ricochet/net/sys/string_view_range.hh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/ricochet/net/sys/string_view_range.hh b/include/ricochet/net/sys/string_view_range.hh new file mode 100644 index 0000000..84be394 --- /dev/null +++ b/include/ricochet/net/sys/string_view_range.hh @@ -0,0 +1,18 @@ +/** + * --------------------------------------------------------------------------- + * @notice This file was adapted from the Minnow networking framework, + * originally developed for Stanford University's CS144 course. + * It has been incorporated into the Ricochet project as foundational + * system utility code. + * --------------------------------------------------------------------------- + */ + +#pragma once + +#include <ranges> +#include <type_traits> + +// This concept represents any range (e.g. vector) whose elements can be converted to string_view. +template<typename R> +concept StringViewRange + = std::ranges::sized_range<R> && std::is_constructible_v<std::string_view, std::ranges::range_value_t<R>>; |
