bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Harun Abi
Subject: Re: option for space between a template class name and the following angle bracket
Date: Fri, 6 Nov 2009 15:39:44 -0500

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 <address@hidden> 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
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/bug-indent
> >
> >
>
>
>
> _______________________________________________
> bug-indent mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-indent
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]