Updated specific locations to be searchable, take a look at Las Vegas as an example.

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Ensuring references do not change (std::variant)
Post Flair (click to view more posts with a particular flair)
Post Body

So, I have an std::variant containing a number of different types. In my code I'm trying to (1) retrieve a type from the std::variant via std::get; (2) copy the item; and (3) store it in an std::vector as a std::string_view. I discovered earlier the (very) surprising and annoying behavior that std::get returns references, not copies. Which is all nice until you go to store said references somewhere, and then they start changing on you and causing unexpected program behavior. I'm unsure if declaring the vector as std::vector<const std::string_view> would solve the problem, particularly since std::string_view is already a read-only view of a string, and I don't want my vector storing references like this. Is there a way I can force std::get to copy items it retrieves, or a way I can do it myself?

Author
Account Strength
60%
Account Age
3 years
Verified Email
Yes
Verified Flair
No
Total Karma
113
Link Karma
84
Comment Karma
29
Profile updated: 1 day ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago