summaryrefslogtreecommitdiffhomepage
path: root/dev/lib/net
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-08-14 19:15:53 +0200
committerAmlal <amlal@nekernel.org>2025-08-14 19:21:05 +0200
commit37bc0133c137cdf7fe62e79ac8208ec46096316e (patch)
treef1f52c6ec2cb021f60a8ce94e7af267b65f1e7e1 /dev/lib/net
parent4522b12ee7929f6ba195de9c0b3111802e8e0100 (diff)
feat: mk.test tool, test a header file with static asserts.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/lib/net')
-rw-r--r--dev/lib/net/url.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/dev/lib/net/url.hpp b/dev/lib/net/url.hpp
index 9a28f9b..496889c 100644
--- a/dev/lib/net/url.hpp
+++ b/dev/lib/net/url.hpp
@@ -50,5 +50,15 @@ namespace snu::net
ss_ += in;
return *this;
}
+
+ explicit operator bool()
+ {
+ return this->is_valid();
+ }
+
+ bool is_valid()
+ {
+ return ss_.size() > 0;
+ }
};
} // namespace snu::net