1

I realized there exists another constructor besides normal QString::QString(QString &other). What is it used for? I cannot understand the type QString &&. Does it mean the reference to a reference variable? But the following code could not compile:

QString s1("abc");
QString &s3=s1;
QString &&s4=s3;

It complains "You cannot bind an lvalue to an rvalue reference"

scopchanov
  • 7,966
  • 10
  • 40
  • 68
William
  • 761
  • 2
  • 10
  • 27

0 Answers0