Value Categories in C++17

  • A glvalue is an expression whose evaluation determines the identity of an object, bit-field, or function.
  • A prvalue is an expression whose evaluation initializes an object or a bit-field, or computes the value of the operand of an operator, as specified by the context in which it appears.
  • An xvalue is a glvalue that denotes an object or bit-field whose resources can be reused (usually because it is near the end of its lifetime).




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium


How to install Mongo DB on Mac

DRY vs WET Principles — Php Implementation

Practice does not make perfect

Are You Still Using ‘%’ or ‘format’ for Strings in Python? Use This Instead

Generic Wildcards in Java: an introduction

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Barry Revzin

Barry Revzin

More from Medium

Point Cloud Clustering in C++

Integer-Only Inference for Deep Learning in Native C

Sharpness-Aware Minimization for Efficiently Improving Generalization

Graph Algorithms in C++