LINUX.ORG.RU

История изменений

Исправление intelfx, (текущая версия) :

Годно, получай звезду.

А... почему у тебя пробелы, а не indent with tabs, align with spaces? Судя по коду, ты задумывался насчёт стиля ведь.

Алсо, почему

    template <typename Rep2 = Rep>
    typename std::enable_if<!std::is_floating_point<Rep2>::value, Units&>::type
    operator%=(const Rep& rhs)
    {
        mCount %= rhs;
        return *this;
    }

, а не

    template <typename Rep2 = Rep,
              typename = std::enable_if<!std::is_floating_point<Rep2>::value>::type>
    Units& operator%=(const Rep& rhs)
    {
        mCount %= rhs;
        return *this;
    }
?

И зачем в обоих operator%= Rep2?

Исправление intelfx, :

Годно, получай звезду.

А... почему у тебя пробелы, а не indent with tabs, align with spaces? Судя по коду, ты задумывался насчёт стиля ведь.

Алсо, почему

    template <typename Rep2 = Rep>
    typename std::enable_if<!std::is_floating_point<Rep2>::value, Units&>::type
    operator%=(const Rep& rhs)
    {
        mCount %= rhs;
        return *this;
    }

, а не

    template <typename Rep2 = Rep,
              typename = std::enable_if<!std::is_floating_point<Rep2>::value>::type>
    Units& operator%=(const Rep& rhs)
    {
        mCount %= rhs;
        return *this;
    }
?

Исправление intelfx, :

Годно, получай звезду.

А... почему у тебя пробелы, а не indent with tabs, align with spaces? Судя по коду, ты задумывался насчёт стиля ведь.

Алсо, почему

    template <typename Rep2 = Rep>
    typename std::enable_if<!std::is_floating_point<Rep2>::value, Units&>::type
    operator%=(const Rep& rhs)
    {
        mCount %= rhs;
        return *this;
    }

, а не

    template <typename Rep2 = Rep, typename = std::enable_if<!std::is_floating_point<Rep2>::value>::type>
    Units& operator%=(const Rep& rhs)
    {
        mCount %= rhs;
        return *this;
    }
?

Исходная версия intelfx, :

Годно, получай звезду.

А... почему у тебя пробелы, а не indent with tabs, align with spaces? Судя по коду, ты задумывался насчёт стиля ведь.