diff options
Diffstat (limited to 'indra/llcommon/llstring.h')
-rw-r--r-- | indra/llcommon/llstring.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index f2741a0e1f..6893b8ebff 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -28,8 +28,9 @@ #define LL_LLSTRING_H #include <boost/call_traits.hpp> -#include <boost/optional/optional.hpp> +#include <optional> #include <string> +#include <string_view> #include <cstdio> #include <cwchar> // std::wcslen() //#include <locale> @@ -345,7 +346,7 @@ public: * (key is always UTF-8) * detect absence by (! return value) */ - static boost::optional<string_type> getoptenv(const std::string& key); + static std::optional<string_type> getoptenv(const std::string& key); static void addCRLF(string_type& string); static void removeCRLF(string_type& string); @@ -819,11 +820,11 @@ STRING windows_message() { return windows_message<STRING>(GetLastError()); } //@} -LL_COMMON_API boost::optional<std::wstring> llstring_getoptenv(const std::string& key); +LL_COMMON_API std::optional<std::wstring> llstring_getoptenv(const std::string& key); #else // ! LL_WINDOWS -LL_COMMON_API boost::optional<std::string> llstring_getoptenv(const std::string& key); +LL_COMMON_API std::optional<std::string> llstring_getoptenv(const std::string& key); #endif // ! LL_WINDOWS @@ -1773,17 +1774,17 @@ bool LLStringUtilBase<T>::endsWith( // static template<class T> -auto LLStringUtilBase<T>::getoptenv(const std::string& key) -> boost::optional<string_type> +auto LLStringUtilBase<T>::getoptenv(const std::string& key) -> std::optional<string_type> { auto found(llstring_getoptenv(key)); if (found) { - // return populated boost::optional + // return populated std::optional return { ll_convert<string_type>(*found) }; } else { - // empty boost::optional + // empty std::optional return {}; } } |