Skip to content

Instantly share code, notes, and snippets.

Last active June 17, 2020 23:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
class AssociatedFrobnicator : public base::SupportsUserData::Data {
Frobnicator* frobnicator() const { return frobnicator_; }
void set_frobnicator(Frobnicator* frobnicator) const { frobnicator_ = frobnicator; }
Frobnicator* frobnicator_;
base::SupportsUserData::Data* data;
std::any& data;
any_cast<Frobnicator*&>(data) = new_frobnicator;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment