std::out_of_range
cppreference.com
<tbody>
</tbody>
class out_of_range; |
||
, . , .
- std::bitset std::basic_string, std::stoi std::stod, (, std::vector::at std::map::at).
-
() |
out_of_range (public -) |
operator= |
out_of_range (public -) |
std::out_of_range::out_of_range
<tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> out_of_range( const std::string& what_arg ); |
(1) | |
out_of_range( const char* what_arg ); |
(2) | |
| (3) | ||
out_of_range( const out_of_range& other ); |
( C++11) | |
out_of_range( const out_of_range& other ) noexcept; |
( C++11) | |
1)
what_arg . std::strcmp(what(), what_arg.c_str()) == 0.2)
what_arg . std::strcmp(what(), what_arg) == 0.3) .
*this other std::out_of_range, std::strcmp(what(), other.what()) == 0. . ( C++11)| what_arg | ||
| other |
1,2) std::bad_alloc.
std::out_of_range , . , std::string&&: .
LWG 254, std::string. std::string.
LWG 471, . , , what(), .
std::out_of_range::operator=
<tbody> </tbody> <tbody class="t-dcl-rev "> </tbody><tbody> </tbody> out_of_range& operator=( const out_of_range& other ); |
( C++11) | |
out_of_range& operator=( const out_of_range& other ) noexcept; |
( C++11) | |
other. *this other std::out_of_range, std::strcmp(what(), other.what()) == 0 . . ( C++11)
| other |
*this
LWG 471, . , , what(), .
std::exception
-
[virtual] |
(virtual public of std::exception -)
|
[virtual] |
(virtual public of std::exception -)
|
std::errc::result_out_of_range , , , , std::range_error ERANGE.
C++:
| LWG 254 | C++98 | , const char*,
|
|
| LWG 471 | C++98 | std::out_of_range |
, std::out_of_range
|
| (public - std::basic_string<CharT,Traits,Allocator>)
| |
(C++17) |
(public - std::basic_string_view<CharT,Traits>)
|
| (public - std::deque)
| |
| (public - std::vector)
| |
(C++11) |
(public - std::array)
|