option for space between a template class name and the following angle bracket

View: New views
4 Messages — Rating Filter:   Alert me  

option for space between a template class name and the following angle bracket

by Kiwon Um :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear GNU Indent Dev. Team:

This mail suggests an options for template-related formatting
control. GNU Indent does format as follow:

  shared_ptr < Test > test;
  const int R = static_cast < int >(pow(2.0f, 6));

It has a lot of options for parenthesis, but not for angle
bracket. Therefore, I suggest some options to control space between a
template class name and the following angle bracket so that the
followings are possible:

  shared_ptr<Test> test;
  const int R = static_cast<int>(pow(2.0f, 6));

Thank you.

Sincerely,

Kiwon Um


_______________________________________________
bug-indent mailing list
bug-indent@...
http://lists.gnu.org/mailman/listinfo/bug-indent

Re: option for space between a template class name and the following angle bracket

by indent-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

indent is a tool for indenting C code.
templates are not in the C standard.

Kiwon Um wrote:

> Dear GNU Indent Dev. Team:
>
> This mail suggests an options for template-related formatting
> control. GNU Indent does format as follow:
>
>   shared_ptr < Test > test;
>   const int R = static_cast < int >(pow(2.0f, 6));
>
> It has a lot of options for parenthesis, but not for angle
> bracket. Therefore, I suggest some options to control space between a
> template class name and the following angle bracket so that the
> followings are possible:
>
>   shared_ptr<Test> test;
>   const int R = static_cast<int>(pow(2.0f, 6));
>
> Thank you.
>
> Sincerely,
>
> Kiwon Um
>
>
> _______________________________________________
> bug-indent mailing list
> bug-indent@...
> http://lists.gnu.org/mailman/listinfo/bug-indent
>
>  



_______________________________________________
bug-indent mailing list
bug-indent@...
http://lists.gnu.org/mailman/listinfo/bug-indent

Re: option for space between a template class name and the following angle bracket

by Harun Abd AsSami :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I realize it is popular on this list to make the claim of "indent is only
for c" but that is in fact, bullshit.

It handles c++ well in many areas because it is coded to handle c++ well in
many areas.

C:\TEMP\INDENT-2.2.10\src\args.c(332):    {"c++",
PRO_BOOL,                           false,       ON,
&settings.c_plus_plus,                      &exp_cpp},
C:\TEMP\INDENT-2.2.10\src\args.c(451):    {"c++",
PRO_BOOL,                           false,       ON,
&settings.c_plus_plus,                      &exp_cpp},
C:\TEMP\INDENT-2.2.10\src\args.c(577):
{"c-plus-plus",                                 "c++"},
C:\TEMP\INDENT-2.2.10\src\args.c(930): * The first 2 characters of a c++
comment have been read skip the remainder of the line
C:\TEMP\INDENT-2.2.10\src\code_io.c(417): * off formatting (a comment, C or
C++, beginning with *INDENT-OFF*),
C:\TEMP\INDENT-2.2.10\src\comments.c(48): * both C and C++ comments.
C:\TEMP\INDENT-2.2.10\src\comments.c(136):  /* First, decide what kind of
comment this is: C++, C, or boxed C.
C:\TEMP\INDENT-2.2.10\src\comments.c(496):           /* We may be at the end
of a C++ comment */
C:\TEMP\INDENT-2.2.10\src\indent.c(867):         * "
private:\n"                     C++, treat as label.
C:\TEMP\INDENT-2.2.10\src\indent.c(875):         * "  unsigned int
private:4\n"       C/C++, treat as bits.
C:\TEMP\INDENT-2.2.10\src\indent.c(1527):    /* handle C++ const function
declarations like
C:\TEMP\INDENT-2.2.10\src\indent.c(2302):            /* Deal with C++
Class::Method */
C:\TEMP\INDENT-2.2.10\src\indent.c(2347):            /* Handle C++ operator
overloading like:
C:\TEMP\INDENT-2.2.10\src\indent.c(2367):            /* Handle C++ operator
overloading.  See case overloaded above. */
C:\TEMP\INDENT-2.2.10\src\indent.c(2396):            /* A C or C++ comment.
*/
C:\TEMP\INDENT-2.2.10\src\indent.h(305):    int c_plus_plus; /*!< True if
we're handling C++ code. */
C:\TEMP\INDENT-2.2.10\src\indent.h(464):    char *classname;
/*!<  The name of the current C++ class */
C:\TEMP\INDENT-2.2.10\src\lexi.c(207):/* Include code generated by gperf for
C++ keyword set */
C:\TEMP\INDENT-2.2.10\src\lexi.c(476):         case rw_operator:    /* C++
operator overloading. */
C:\TEMP\INDENT-2.2.10\src\lexi.c(858):        /* Deal with C++ class::method
*/
C:\TEMP\INDENT-2.2.10\src\lexi.c(1054):     /* in C++ mode also scan <?[=],
>?[=] GNU C++ operators
C:\TEMP\INDENT-2.2.10\src\lexi.c(1081):        /* A C or C++ comment */
C:\TEMP\INDENT-2.2.10\src\lexi.c(1121):        /* For C++ overloaded
operators. */
C:\TEMP\INDENT-2.2.10\src\lexi.h(29):  rw_operator,            /*!< For C++
operator overloading. */
C:\TEMP\INDENT-2.2.10\src\lexi.h(59):  doublecolon,            /*!< For C++
class methods. */
C:\TEMP\INDENT-2.2.10\src\lexi.h(67):  overloaded,            /*!< For C++
overloaded operators (like +) */
C:\TEMP\INDENT-2.2.10\src\lexi.h(72):  cplus_comment,        /*!< A C++
"slash-slash" */
C:\TEMP\INDENT-2.2.10\src\libgettext.h(52):/* Many header files from the
libstdc++ coming with g++ 3.3 or newer include

Is all that in the c standard?

The gatekeepers should be a little friendlier to accepting changes to add in
the rest of the c++ handling so it can officially handle indenting both.



On Fri, Nov 6, 2009 at 3:04 PM, indent <indent@...> wrote:

> indent is a tool for indenting C code.
> templates are not in the C standard.
>
> Kiwon Um wrote:
> > Dear GNU Indent Dev. Team:
> >
> > This mail suggests an options for template-related formatting
> > control. GNU Indent does format as follow:
> >
> >   shared_ptr < Test > test;
> >   const int R = static_cast < int >(pow(2.0f, 6));
> >
> > It has a lot of options for parenthesis, but not for angle
> > bracket. Therefore, I suggest some options to control space between a
> > template class name and the following angle bracket so that the
> > followings are possible:
> >
> >   shared_ptr<Test> test;
> >   const int R = static_cast<int>(pow(2.0f, 6));
> >
> > Thank you.
> >
> > Sincerely,
> >
> > Kiwon Um
> >
> >
> > _______________________________________________
> > bug-indent mailing list
> > bug-indent@...
> > http://lists.gnu.org/mailman/listinfo/bug-indent
> >
> >
>
>
>
> _______________________________________________
> bug-indent mailing list
> bug-indent@...
> http://lists.gnu.org/mailman/listinfo/bug-indent
>
_______________________________________________
bug-indent mailing list
bug-indent@...
http://lists.gnu.org/mailman/listinfo/bug-indent

Re: option for space between a template class name and the following angle bracket

by indent-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


   Harun Abi wrote:

     I realize it is popular on this list to make the claim of "indent is only
     for c" but that is in fact, bullshit.

   That is not a claim it is a statement of policy.

     It handles c++ well in many areas because it is coded to handle c++ well
     in many areas.
     ...

   It also handles C++ extremely badly in many areas and many updates to fix
   this broke C handling, so the decision was made not to continue to try.
   Further some of the things you listed are actually in the C standard now.

     The gatekeepers should be a little friendlier to accepting changes to add
     in the rest of the c++ handling so it can officially handle indenting
     both.

    I did not see any changes coming from you that could be accepted, only an
   empty-handed suggestion for a change. It is not my policy to reject supplied
   code updates, if they are well engineered, documented and proven not to
   break existing behaviour.
_______________________________________________
bug-indent mailing list
bug-indent@...
http://lists.gnu.org/mailman/listinfo/bug-indent