Closed arguiot closed 2 years ago
Hellow,
The StringRef adapter is declared as:
/// @brief An adapter. Own or reference a constant string. For convenience, this
/// class convert multiple mutable string toward a shared representation.
class StringRef {
public:
StringRef(std::string* ref) : address_(ref) {}
StringRef(std::string ref) : owned_(std::move(ref)) {}
StringRef(const wchar_t* ref) : StringRef(to_string(std::wstring(ref))) {}
StringRef(const char* ref) : StringRef(std::string(ref)) {}
std::string& operator*() { return address_ ? *address_ : owned_; }
std::string* operator->() { return address_ ? address_ : &owned_; }
private:
std::string owned_;
std::string* address_ = nullptr;
};
Since there is:
StringRef(std::string* ref)
I expect conversion from string*
to work.
I don't expect this error message. Could you provide instructions about how to reproduce this?
Hmmm, not sure it's working... I just used the starter project, and replaced the content of main.cpp with your example, input.cpp. And I get this error. Very strange...
Can you copy the file you want to compile?
Le ven. 5 nov. 2021, 15:20, Arthur Guiot @.***> a écrit :
Hmmm, not sure it's working... I just used the starter project, and replaced the content of main.cpp with your example, input.cpp. And I get this error. Very strange...
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ArthurSonzogni/FTXUI/issues/250#issuecomment-961934227, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEJ4QUWQLYEQ32ECEEYJPDUKPY3DANCNFSM5HMKSMQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Closed. Does it still reproduce? If yes, please reopen and reply to https://github.com/ArthurSonzogni/FTXUI/issues/250#issuecomment-962009519
I keep getting theses errors: