Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10291

Structured binding fails on prompt

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Medium
    • Resolution: Unresolved
    • master
    • None
    • Cling
    • None
    • Any

    Description

      See https://root-forum.cern.ch/t/c-17-structured-binding-not-working-in-root-prompt/35446/3 :

      root [0] auto [a, b] = tuple(1, 2)
      (std::tuple<int, int> &) { 1, 2 }
      root [1] a
      input_line_11:2:3: error: use of undeclared identifier 'a'
       (a)
        ^
      Error in <HandleInterpreterException>: Error evaluating expression (a).
      Execution of your code was aborted.
      

      The same works fine in a script. Is this an issue with the DeclExtractor?

      Attachments

        Activity

          People

            axel Axel Naumann
            axel Axel Naumann
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: