Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9164 Analysis tools upgrade for release 6.14
  3. ROOT-9350

[TDF] Make TResultProxy a real smart pointer (and rename it TResultPtr)

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Completed
    • None
    • None
    • None
    • None

    Description

      Problem: users do not know what to do with a “proxy” – the name does not suggest any specific semantics or API.

      Before leaving the Experimental namespace we'll add to TResultProxy what is missing to behave similarly to a std::shared_ptr (namely default ctor and assignment operators) and change its name to TDF::TResultPtr.

      Rationale is better teachability and adherence to the principle of least surprise:
      TResultPtr instantly indicates the semantics of the object, that the value is accessible via -> and C++ users won’t find it weird to declare a vector<TResultPtr<TH1D>>, while a vector<TResultProxy<TH1D>> sounds scarier (what is a proxy? how does it behave?).

      TResultProxy can be left as an alias for backwards compatibility if we wish so.

      Attachments

        Activity

          People

            dpiparo Danilo Piparo
            eguiraud Enrico Guiraud
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual Start: