On 6/19/15 9:27 AM, Quentin Ladeveze wrote:
On Friday, 19 June 2015 at 13:26:03 UTC, Steven Schveighoffer wrote:
On 6/19/15 9:13 AM, Quentin Ladeveze wrote:
On Friday, 19 June 2015 at 13:12:08 UTC, Quentin Ladeveze wrote:
Hi,

  I have a struct with some methods int it, let's say

```
struct Example{
   int intValue(){

Hum. How can I delete a post ?

You can't. The forum is backed by a newsgroup, just post the full
corrected version :)

-Steve

Thank you :)

Here is th corrected version :

Hi,

   I have a struct with some methods int it, let's say

```
struct Example{
    int a(){
          return someValue;
    }

    float b(){
       return someOtherValue;
    }

    string stringValue(){
       return c;
    }
}

Is there any way to have a asTuple method in this struct that would
returns something like :

Tuple!(int, "a", float, "b", string, "c")

and that will contain the values of the methods of the struct ?

Does this work for you, or is there a further expectation?

auto asTuple() { return Tuple!(int, "a", ...)(a, b, stringValue);}

-Steve
  • Return types of the methods o... Quentin Ladeveze via Digitalmars-d-learn
    • Re: Return types of the ... Quentin Ladeveze via Digitalmars-d-learn
      • Re: Return types of ... Steven Schveighoffer via Digitalmars-d-learn
        • Re: Return types... Quentin Ladeveze via Digitalmars-d-learn
          • Re: Return t... Baz via Digitalmars-d-learn
          • Re: Return t... Steven Schveighoffer via Digitalmars-d-learn
            • Re: Ret... Quentin Ladeveze via Digitalmars-d-learn
              • Re:... Daniel Kozák via Digitalmars-d-learn
              • Re:... Baz via Digitalmars-d-learn
                • ... Steven Schveighoffer via Digitalmars-d-learn
              • Re:... Quentin Ladeveze via Digitalmars-d-learn
                • ... Steven Schveighoffer via Digitalmars-d-learn
                • ... Quentin Ladeveze via Digitalmars-d-learn
                • ... Steven Schveighoffer via Digitalmars-d-learn
                • ... ZombineDev via Digitalmars-d-learn
                • ... Quentin Ladeveze via Digitalmars-d-learn

Reply via email to