Re: equivalent of C++ implicit constructors and conversion operators

2010-04-23 Thread Robert Clipsham
On 23/04/10 17:22, #ponce wrote: In C++ implicit constructors and conversion operators allow a user-defined type to act quite like a builtin-type. struct half { half(float x);l inline operator float() const; } allows to write: half x = 1.f; float f = x; and this

Re: equivalent of C++ implicit constructors and conversion operators

2010-04-23 Thread Philippe Sigaud
On Fri, Apr 23, 2010 at 18:46, Robert Clipsham rob...@octarineparrot.comwrote: On 23/04/10 17:22, #ponce wrote: In C++ implicit constructors and conversion operators allow a user-defined type to act quite like a builtin-type. struct half { half(float x);l inline operator