Home Difference between add_lvalue_reference_t<T> and T&
Reply: 0

Difference between add_lvalue_reference_t<T> and T&

user4128 Published in September 19, 2018, 9:21 am

Suppose you have a template argument T.

What are the differences between

  • add_cv_t<T> and const volatile T
  • add_const_t<T> and const T
  • add_volatile_t<T> and volatile T
  • add_lvalue_reference_t<T> and T&
  • add_rvalue_reference_t<T> and T&&
  • add_pointer_t<T> and T*?

Why should I use add_rvalue_reference_t<T> instead of T&& for example. Are there any rules when to choose which?

share|improve this question

3 Answers 3

active oldest votes
up vote 11 down vote accepted
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.391527 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO