astyle have problem with formatting templates

186 views Asked by At

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 ?

0

There are 0 answers