From 2c62c89b4784c8e596de61b140704875cfedb6c9 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Sun, 18 Dec 2022 13:22:46 -0800 Subject: [PATCH] :bulb: clarifying comment --- include/str_intrusion.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/str_intrusion.h b/include/str_intrusion.h index 0d30fe4..2319071 100644 --- a/include/str_intrusion.h +++ b/include/str_intrusion.h @@ -1,6 +1,11 @@ #pragma once #include +/* +The intended use of this cursed class is in violating the encapsulation of std::string this class acts like std::string_view even though its stored in a std::string. +The reason this was needed is because sometimes we have a std::string_view instance and another library requires a const std::string& argument, forcing us to copy to a string before passing it, this copying is unnecessary. +*/ + struct StrFromSV_Wrapper { std::string str;