.TH "std::logic_error" 3cxx "Tue Jul 2 2019" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::logic_error \- One of two subclasses of exception\&. .SH SYNOPSIS .br .PP .PP Inherits \fBstd::exception\fP\&. .PP Inherited by \fB__gnu_pbds::container_error\fP, \fBstd::domain_error\fP, \fBstd::experimental::fundamentals_v1::bad_optional_access\fP, \fBstd::future_error\fP, \fBstd::invalid_argument\fP, \fBstd::length_error\fP, and \fBstd::out_of_range\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBlogic_error\fP (const \fBstring\fP &__arg) _GLIBCXX_TXN_SAFE" .br .ti -1c .RI "\fBlogic_error\fP (const char *) _GLIBCXX_TXN_SAFE" .br .ti -1c .RI "virtual const char * \fBwhat\fP () const _GLIBCXX_TXN_SAFE_DYN noexcept" .br .in -1c .SH "Detailed Description" .PP One of two subclasses of exception\&. Logic errors represent problems in the internal logic of a program; in theory, these are preventable, and even detectable before the program runs (e\&.g\&., violations of class invariants)\&. .PP Definition at line 113 of file stdexcept\&. .SH "Constructor & Destructor Documentation" .PP .SS "std::logic_error::logic_error (const \fBstring\fP & __arg)\fC [explicit]\fP" Takes a character string describing the error\&. .SH "Member Function Documentation" .PP .SS "virtual const char* std::logic_error::what () const\fC [virtual]\fP, \fC [noexcept]\fP" Returns a C-style character string describing the general cause of the current error (the same string passed to the ctor)\&. .PP Reimplemented from \fBstd::exception\fP\&. .PP Reimplemented in \fBstd::future_error\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.