That can be easily made to work in C++95.<p>x can be of a smart pointer type (let&#x27;s call it &quot;var&quot;) which acts as reference to an anyobject class instance, which comes in varieties like string_anyobject, integer_anyobject and so on.<p>The smart pointer class can have a few assignment operators and conversion constructors for usage like  var x = &quot;lit&quot;;  or  x = 5.