0

It convert:

template <typename T,
            typename ...Args,
            typename = std::enable_if_t<std::is_integral_v<T>>>
void function(T in, Args... args)
{

}

To :

template <typename T,
            typename ...Args,
            typename = std::enable_if_t<std::is_integral_v<T>>>
                        void function(T in, Args... args)
{

}

It have problem with:

typename = std::enable_if_t<std::is_integral_v<T>>

astyle do not put function in middle when i add another template parameter:

template <typename T,
            typename ...Args,
            typename = std::enable_if_t<std::is_integral_v<T>>,
            typename C>
void function(T in, Args... args)
{

}

My astyle options is this options.

  • Artistic Style Version 3.1, using with Qt Creator IDE on Linux (archlinux 5.7.4-arch1-1).

How can avoid putting it in the middle ?

Ghasem Ramezani
  • 2,683
  • 1
  • 13
  • 32
  • 1
    Have you considered using [ClangFormat](http://clang.llvm.org/docs/ClangFormat.html) instead? In my experience it is greatly superior to `astyle`. – Jesper Juhl Jun 22 '20 at 16:52
  • 1
    @JesperJuhl, Yes, I used it for about 3 months with [this configuration](https://gist.github.com/mg-ramezani/a5e98d665da2748508e45d2bad230c03), But it is really slow on large files and have some problem when i try to use languages other than English in my code (Like a comment in farsi) and some other thing about styling which clang-format doesn't have it. – Ghasem Ramezani Jun 22 '20 at 17:15

0 Answers0