Are Tuples as lvalues supposed to be supported?

Russell Lewis webmaster at villagersonline.com
Tue Jul 31 11:03:30 PDT 2007


I thought that I was supposed to be able to use a Tuple as an lvalue in 
a struct, such as:

   struct Encapsulate(U...) { U val; }

   void Foo(U...)(U args) {
     Encapsulate!(U) temp;
     temp.val = args;
   }

However, when I instantiate Foo, I get the error:
   Error: temp.val is not an lvalue.


So, I looked on the website, and didn't find a statement that I could do 
this.  So I'm asking: is this a 2.0 feature, or is the lack of it a bug?

Russ



P.S. The lack of this is going to make it rather annoying to build a 
Curry() template which takes multiple arguments.  I will have to either 
implement many different Curry templates with different numbers of 
arguments, or else nest them...



More information about the Digitalmars-d mailing list