私は何を理解し、以下を行いたいfetch().text
とassert(0)
思います。私はfetch()
、returnタイプのメンバーを参照できるような関数に精通していませんfetch().text
。これはどういうわけかの使用によって可能になりますassert(0)
か?
class SimpleS{
struct internal_element {
const char *text;
};
class SimpleE {
public:
SimpleE() {
}
const char* text() const {
return fetch().text;
}
void set_text(const char *text) {
fetch().text = text;
}
private:
internal_element& fetch() const {
... // some code
assert(0);
}
}