C2004: Non-volatile reference initialization with volatile illegal

[ERROR]

Description

The reference type is not volatile, the assigned type is.

Example
  volatile i;

  
  const int &r=i;  // illegal

  
Tips

Either both are volatile or both are not volatile.