simontoth,
@simontoth@hachyderm.io avatar

The std::forward is a conditional r-value (specifically x-value) cast.

std::forward is primarily designed to work in conjunction with universal references and will only cast to an r-value if the template argument isn't an l-value reference type.

Compiler Explorer link: https://compiler-explorer.com/z/E5dcPh6T3

  • All
  • Subscribed
  • Moderated
  • Favorites
  • cpp
  • rosin
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • cubers
  • Youngstown
  • slotface
  • tacticalgear
  • InstantRegret
  • cisconetworking
  • everett
  • thenastyranch
  • kavyap
  • osvaldo12
  • HellsKitchen
  • GTA5RPClips
  • ethstaker
  • Leos
  • modclub
  • tester
  • khanakhh
  • Durango
  • normalnudes
  • lostlight
  • relationshipadvice
  • anitta
  • bokunoheroacademia
  • sketchdaily
  • All magazines