STX  1.0.0
Namespaces | Functions
panic_helpers.h File Reference
#include "stx/panic.h"
Include dependency graph for panic_helpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 stx
 
 stx::internal
 
 stx::internal::option
 
 stx::internal::result
 

Functions

STX_FORCE_INLINE void stx::internal::option::expect_value_failed (std::string_view const &msg, SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Option<T>::expect() when no value is present More...
 
STX_FORCE_INLINE void stx::internal::option::expect_none_failed (std::string_view const &msg, SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Option<T>::expect_none() when a value is present More...
 
STX_FORCE_INLINE void stx::internal::option::no_value (SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Option<T>::unwrap() when no value is present More...
 
STX_FORCE_INLINE void stx::internal::option::no_lref (SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Option<T>::value() when no value is present More...
 
STX_FORCE_INLINE void stx::internal::option::no_none (SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Option<T>::unwrap_none() when a value is present More...
 
template<typename T >
STX_FORCE_INLINE void stx::internal::result::expect_value_failed (std::string_view const &msg, T const &err, SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::expect() when no value is present More...
 
STX_FORCE_INLINE void stx::internal::result::expect_err_failed (std::string_view const &msg, SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::expect_err() when a value is present More...
 
template<typename T >
STX_FORCE_INLINE void stx::internal::result::no_value (T const &err, SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::unwrap() when no value is present More...
 
template<typename T >
STX_FORCE_INLINE void stx::internal::result::no_lref (T const &err, SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::value() when no value is present More...
 
STX_FORCE_INLINE void stx::internal::result::no_err (SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::unwrap_err() when a value is present More...
 
STX_FORCE_INLINE void stx::internal::result::no_err_lref (SourceLocation const &location=SourceLocation::current()) noexcept
 panic helper for Result<T, E>::err_value() when no value is present More...
 

Detailed Description

Author
Basit Ayantunde rlama.nosp@m.rrr@.nosp@m.gmail.nosp@m..com
Date
2020-04-22

Copyright (c) 2020 Basit Ayantunde

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.