std::logic_error
cppreference.com
<tbody>
</tbody>
class logic_error; |
||
, . , , , .
, std::invalid_argument, std::domain_error, std::length_error, std::out_of_range, std::future_error std::experimental::bad_optional_access std::logic_error.
-
() |
logic_error (public -) |
operator= |
logic_error (public -) |
std::logic_error::logic_error
<tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> logic_error( const std::string& what_arg ); |
(1) | |
logic_error( const char* what_arg ); |
(2) | |
| (3) | ||
logic_error( const logic_error& other ); |
( C++11) | |
logic_error( const logic_error& 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::logic_error, std::strcmp(what(), other.what()) == 0. . ( C++11)| what_arg | ||
| other |
1,2) std::bad_alloc.
std::logic_error , . , std::string&&: .
LWG 254, std::string. std::string.
LWG 471, . , , what(), .
std::logic_error::operator=
<tbody> </tbody> <tbody class="t-dcl-rev "> </tbody><tbody> </tbody> logic_error& operator=( const logic_error& other ); |
( C++11) | |
logic_error& operator=( const logic_error& other ) noexcept; |
( C++11) | |
other. *this other std::logic_error, 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 -)
|
C++:
| LWG 254 | C++98 | , const char*,
|
|
| LWG 471 | C++98 | std::logic_error
|
, std::logic_error
|