Porytiles
Loading...
Searching...
No Matches
porytiles::StringViewSourceLoc Struct Reference

A wrapper for std::string_view with a taggable std::source_location. More...

#include <panic.hpp>

Collaboration diagram for porytiles::StringViewSourceLoc:
[legend]

Public Member Functions

template<class T >
requires std::constructible_from<std::string_view, T>
 StringViewSourceLoc (const T &msg, std::source_location loc=std::source_location::current()) noexcept
 

Public Attributes

std::string_view msg_
 
std::source_location loc_
 

Detailed Description

A wrapper for std::string_view with a taggable std::source_location.

Inspired by: https://buildingblock.ai/panic

Definition at line 19 of file panic.hpp.

Constructor & Destructor Documentation

◆ StringViewSourceLoc()

template<class T >
requires std::constructible_from<std::string_view, T>
porytiles::StringViewSourceLoc::StringViewSourceLoc ( const T &  msg,
std::source_location  loc = std::source_location::current() 
)
inlinenoexcept

Definition at line 22 of file panic.hpp.

Member Data Documentation

◆ loc_

std::source_location porytiles::StringViewSourceLoc::loc_

Definition at line 26 of file panic.hpp.

◆ msg_

std::string_view porytiles::StringViewSourceLoc::msg_

Definition at line 25 of file panic.hpp.


The documentation for this struct was generated from the following file: