Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-4273

Replace variadic List constructor with one taking a initializer_list

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.27.0
    • Component/s: stout
    • Target Version/s:
    • Sprint:
      Mesosphere Sprint 26
    • Story Points:
      1

      Description

      List provides a variadic constructor currently implemented with some preprocessor magic. Given that we already require C++11 we can replace that one with a much simpler one just taking a std::initializer_list. This would change the invocations,

      auto l1 = List<int>(1, 2, 3);    // now
      auto l2 = List<int>({1, 2, 3});  // proposed
      

      This addresses an existing TODO.

        Attachments

          Activity

            People

            • Assignee:
              bbannier Benjamin Bannier
              Reporter:
              bbannier Benjamin Bannier
              Shepherd:
              Till Toenshoff
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: