On Monday, 11 January 2021 at 14:51:29 UTC, Ola Fosheim Grøstad wrote:
On Monday, 11 January 2021 at 14:03:39 UTC, Paul Backus wrote:
    alias expand this;

Hm... this does not allow me protect the fields from being changed. I also cannot use const since it is transitive and would make it impossible to return two references to mutable objects?

Basically, the tuple itself should be immutable, but not the objects being referenced. I guess I could run over the types and add const if they are not references?

But that would leave references mutable... so not the best solution. I kinda like the flexibility of __0, __1 and that it maps nicely to a regular struct.
  • I want to create my own Tuple... Ola Fosheim Grøstad via Digitalmars-d-learn
    • Re: I want to create my ... Paul Backus via Digitalmars-d-learn
      • Re: I want to create... Ola Fosheim Grostad via Digitalmars-d-learn
        • Re: I want to cr... Paul Backus via Digitalmars-d-learn
          • Re: I want t... Ola Fosheim Grøstad via Digitalmars-d-learn
            • Re: I w... Ola Fosheim Grøstad via Digitalmars-d-learn
            • Re: I w... Paul Backus via Digitalmars-d-learn
              • Re:... Ola Fosheim Grøstad via Digitalmars-d-learn
              • Re:... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Paul Backus via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Paul Backus via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Paul Backus via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... sighoya via Digitalmars-d-learn

Reply via email to