Skip to content

std::function<> regression with current master #1346

Closed

Description

@misery

We have an attached file that is formatted with uncrustify 0.65 and attached configuration. We tried with current master branch of uncrustify. The formatting has changed without changing a configuration.

--- FuncUtils.h
+++ FuncUtils.h.uncrustify
@@ -9,7 +9,7 @@
 {
 
 template<typename S, typename T>
-typename std::enable_if<!std::is_void<T>::value, QVector<T> >::type dummy(const std::function<T*(const S&)>& pFunc, const QVector<S>& pItems)
+typename std::enable_if<!std::is_void<T>::value, QVector<T> >::type dummy(const std::function<T * (const S&)>& pFunc, const QVector<S>& pItems)
 {
        return QVector<T>();
 }
@@ -59,7 +59,7 @@
  * where readers has type QVector<Reader>
  */
 template<typename T>
-typename std::enable_if<!std::is_void<T>::value, QVector<T> >::type filter(const std::function<bool(const T&)>& pFunc, const QVector<T>& pItems)
+typename std::enable_if<!std::is_void<T>::value, QVector<T> >::type filter(const std::function<bool(const T &)>& pFunc, const QVector<T>& pItems)
 {
        QVector<T> result;
        for (const T& item : pItems)

example.zip

Activity

  1. guy-maurel commented on Sep 15, 2017

    @guy-maurel
    Contributor

    I work on it. I can reproduce.

  2. guy-maurel commented on Sep 17, 2017

    @guy-maurel
    Contributor

    Thanks for the message.
    #1347 is a proposal to fix the bug.
    Please test and report.

  3. added a commit that references this issue on Sep 17, 2017
  4. misery commented on Sep 18, 2017

    @misery
    Author

    Thank you very much! I tested it here and it works as expected for me.

  5. mihaipopescu commented on Oct 2, 2017

    @mihaipopescu
    Collaborator

    What was the initial unwanted output ? Was it related to this one #1288 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions