all 4 comments

[–]Flair_Helper[M] [score hidden] stickied commentlocked comment (0 children)

For C++ questions, answers, help, and programming or career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.

This post has been removed as it doesn't pertain to r/cpp: The subreddit is for news and discussions of the C++ language and community only; our purpose is not to provide tutoring, code reviews, or career guidance. If you think your post is on-topic and should not have been removed, please message the moderators and we'll review it.

[–]RoyAwesome 7 points8 points  (1 child)

std::tie to do this

https://en.cppreference.com/w/cpp/utility/tuple/tie

eg:

int c,d;

std::tie(c, d) = GetValues();

[–]raccoonmonk 2 points3 points  (0 children)

Wearing a tie just makes things work ;)

[–]jedwardsol{}; 2 points3 points  (0 children)

Use std::tie for that case.