Is there a way to write a BSTR literal?
When calling a function that expects a BSTR it'd be nice to be able to write something like: iFoo->function( bs"HELLO" ); However the only workaround I'm aware of is to use a wrapper that calls SysAllocString etc., e.g.: iFoo->function( WideString(L"HELLO").c_bstr() ); which is kind of ugly. Is there actually such an option to create a BSTR literal? Motivation: easier-to-read code, and faster runtime performance by avoiding an allocation and deallocation. Clarification: I am only talking about situations where the caller (i.e. us) has ownership of the BSTR, for example: calling a function that