C2007: Cannot create temporary for reference in class/struct

[ERROR]

Description

A member initializer for a reference was constant, though the member was non-constant

Example
  struct A {

  
    int &i;

  
    A();

  
  };

  
  A::A() : i(3) {  // error

  
  }

  
Tips

Initialize the reference with a non-constant variable.