D26438: Runners: Convert foreach to for

Ivan Čukić noreply at phabricator.kde.org
Mon Jan 6 10:47:55 GMT 2020


ivan added a comment.


  Something like this:
  
    template <typename T>
    class asRangeImpl
    {
    public:
        asRange(const T &data)
            : m_data{data}
        {
        }
    
        auto begin() const { return m_data.keyValueBegin(); }
        auto end() const { return m_data.keyValueEnd(); }
    
    private:
        const T &m_data;
    };
    
    template <typename T>
    class asRange(const T& map)
    {
        return asRangeImpl<T>(map);
    }

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D26438

To: meven, #plasma, davidedmundson, ivan
Cc: ivan, davidedmundson, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200106/932f706d/attachment-0001.html>


More information about the Plasma-devel mailing list