constexpr and bizzare error
问题 I'm having: constexpr bool is_concurrency_selected()const { return ConcurrentGBx->isChecked();//GBx is a groupbox with checkbox } and I'm getting error: C:\...\Options_Dialog.hpp:129: error: enclosing class of 'bool Options_Dialog::is_concurrency_selected() const' is not a literal type Any thoughts on why? 回答1: It means your class is not a literal type... This program is invalid, because Options is not a literal class type. But Checker is a literal type. struct Checker { constexpr bool