Given the speed at which technology evolves, I do not think that just because the question was already asked 9 years ago there's enough justification to mark it as a duplicate
That is essentially irrelevant. If they are duplicates, then they're still duplicates. If technology has evolved in a way to change the answer, then the correct solution is to provide an answer on the target question.
That having been said, these questions are not duplicates. The old question is asking for a method to print the call stack. The new question is asking about a specific implementation of a tool that would result in printing a call stack.
It's the difference between asking for "How do I sort an array" and "How do I swap two items in the array so that I can sort it". They're not the same question, since the answer to the former question (call std::sort
) won't actually tell you anything about how to properly swap items.
std::experimental::source_location
behaves exactly similar to__LINE__
and__LINE__
. That's not what you need and is not mentioned in the duplicate because it wouldn't help. Even if there would be a new approach to your problem, it should still be added as a new answer to the original post to keep all the information in one place.