A simple string class that manages a static storage size C-style string.
More...
A simple string class that manages a static storage size C-style string.
- Warning
- This class is intended only for the narrow usecase of being used inside an exception type, where it is guaranteed there will always be some message to store. It does not handle construction from nullptr.
◆ simple_string() [1/3]
| std::stdexcept_detail::simple_string::simple_string |
( |
arene::base::detail::raw_c_string const | str | ) |
|
|
inlineexplicitnoexcept |
Construct a new simple string object.
- Parameters
-
| str | The data to initialize the string with. It will be copied into this string. |
- Postcondition
c_str() will return a cstring for which strcmp(c_str(),str)==0 .
◆ ~simple_string()
| std::stdexcept_detail::simple_string::~simple_string |
( |
| ) |
|
|
defaultnoexcept |
◆ simple_string() [2/3]
| std::stdexcept_detail::simple_string::simple_string |
( |
simple_string const & | other | ) |
|
|
defaultnoexcept |
copy ctor
- Parameters
-
| other | The other string to copy from |
- Postcondition
c_str() will return a cstring for which strcmp(c_str(),other.c_str())==0 .
◆ simple_string() [3/3]
| std::stdexcept_detail::simple_string::simple_string |
( |
simple_string && | other | ) |
|
|
defaultnoexcept |
move ctor
- Parameters
-
| other | The other string to move from |
- Postcondition
c_str() will return a cstring for which strcmp(c_str(),other.c_str())==0 with other 's state before move. other 's state post-move is unspecified.
◆ c_str()
| auto std::stdexcept_detail::simple_string::c_str |
( |
| ) |
const -> arene::base::detail::raw_c_string |
|
inlinenoexcept |
Returns a pointer to the internal C-style string.
- Returns
- arene::base::detail::raw_c_string A pointer to the internal C-style string.
◆ operator=() [1/2]
move assignment
- Parameters
-
| other | The other string to move from |
- Returns
- simple_string&
*this post assignment
- Postcondition
c_str() will return a cstring for which strcmp(c_str(),other.c_str())==0 with other 's state before move. other 's state post-move is unspecified.
◆ operator=() [2/2]
copy assignment
- Parameters
-
| other | The other string to copy from |
- Returns
- simple_string&
*this post assignment
- Postcondition
c_str() will return a cstring for which strcmp(c_str(),other.c_str())==0 .
The documentation for this class was generated from the following file: