1

Given some expression exp I'd like to differentiate whether that expression results in an xvalue or an prvalue. In order to do so, I'd like to find a context in which evaluating the expression results in a compiler error if it's one of these value types, and compiles fine if it's the other.

Is there such a context that works ideally for fundamental, pod as well as non-pod types?

Alternatively a context which yields different results based on the value type would be sufficient, too.

Background: For an answer of mine I'd like to check whether an expression is an xvalue or not.

Community
  • 1
  • 1
Daniel Jour
  • 15,896
  • 2
  • 36
  • 63

0 Answers0