www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Comma operator overloading

reply "Jay Norwood" <jayn prismnet.com> writes:
I'm reading a SystemC lecture which describes use of operator 
overloading of comma in their syntax to support concatenation.

So, for example, they support the data operations below

sc_uint<4> a, b, d, e;
sc_unit<8> c;
c = (a, b);
(d, e) = c;

As I understand it, SystemC is C++.

I didn't find commas among the overloadable D operators.   Is 
that correct?
Nov 17 2013
parent =?UTF-8?B?U2ltZW4gS2rDpnLDpXM=?= <simen.kjaras gmail.com> writes:
On 17.11.2013 21:29, Jay Norwood wrote:
 I'm reading a SystemC lecture which describes use of operator
 overloading of comma in their syntax to support concatenation.

 So, for example, they support the data operations below

 sc_uint<4> a, b, d, e;
 sc_unit<8> c;
 c = (a, b);
 (d, e) = c;

 As I understand it, SystemC is C++.

 I didn't find commas among the overloadable D operators.   Is that correct?
That is correct. -- Simen
Nov 17 2013