Hi,
On Thu, 27 Sep 2012, Lawrence Crowl wrote:
template typename T
struct D : BT
{
typedef typename BT::E E; // element_type
E getme (int index);
}
Inside that struct, lets say we have a field of type E. Do we name
it F or f?
IMHO only for types, not for any other decls.
On Fri, Sep 28, 2012 at 8:18 AM, Michael Matz m...@suse.de wrote:
It is common practice to have
struct Q
{
typedef int E;
E getme (int index);
};
Easy: I wouldn't make a typedef for Q::E that merely is int. The reason
is that it makes knowing what getme really returns harder.
The
On 9/28/12, Michael Matz m...@suse.de wrote:
On Thu, 27 Sep 2012, Lawrence Crowl wrote:
template typename T
struct D : BT
{
typedef typename BT::E E; // element_type
E getme (int index);
}
Inside that struct, lets say we have a field of type E. Do we name
it F or f?
On Fri, Sep 28, 2012 at 12:40 PM, Lawrence Crowl cr...@google.com wrote:
On 9/28/12, Michael Matz m...@suse.de wrote:
I would even prefer 'e' over value_type. It's scoped, the context always
will be clear, no need to be verbose in that name. I find the long names
inelegant, as most of the
On 9/28/12, Gabriel Dos Reis g...@integrable-solutions.net wrote:
On Fri, Sep 28, 2012 at 8:18 AM, Michael Matz m...@suse.de wrote:
It is common practice to have
struct Q
{
typedef int E;
E getme (int index);
};
Easy: I wouldn't make a typedef for Q::E that merely is int. The reason
Hi,
On Wed, 26 Sep 2012, Lawrence Crowl wrote:
A lower-case type name indicates to me a non-changing type,
i.e. nothing that depends on a template. In C we only had
such types so we used lower-case names everywhere. With C++
and templates I think we should start using upper case for
On Thu, Sep 27, 2012 at 7:12 AM, Michael Matz m...@suse.de wrote:
(And if they aren't, then again, we did something too
complicated with the switch to C++).
or we are doing something by insisting not to use
standard notation.
On 9/27/12, Michael Matz m...@suse.de wrote:
On Wed, 26 Sep 2012, Lawrence Crowl wrote:
A lower-case type name indicates to me a non-changing type,
i.e. nothing that depends on a template. In C we only had
such types so we used lower-case names everywhere. With C++
and templates I
On Thu, Sep 27, 2012 at 1:35 PM, Lawrence Crowl cr...@google.com wrote:
If we were to follow C++ standard library conventions, we would call
it value_type. That would be my preference. However, if folks
want a shorter name, I'll live with that too. But as it stands,
the current name is
Hi,
On Tue, 25 Sep 2012, Lawrence Crowl wrote:
On 8/15/12, Richard Henderson r...@redhat.com wrote:
On 2012-08-15 07:29, Richard Guenther wrote:
+ typedef typename Element::Element_t Element_t;
Can we use something less ugly than Element_t?
Such as
typedef typename Element::T
On Tue, Sep 25, 2012 at 4:30 PM, Lawrence Crowl cr...@google.com wrote:
On 8/15/12, Richard Henderson r...@redhat.com wrote:
On 2012-08-15 07:29, Richard Guenther wrote:
+ typedef typename Element::Element_t Element_t;
Can we use something less ugly than Element_t?
Such as
typedef
On 9/26/12, Michael Matz m...@suse.de wrote:
On Tue, 25 Sep 2012, Lawrence Crowl wrote:
On 8/15/12, Richard Henderson r...@redhat.com wrote:
On 2012-08-15 07:29, Richard Guenther wrote:
typedef typename Element::Element_t Element_t;
Can we use something less ugly than Element_t?
On Wed, Sep 26, 2012 at 1:09 PM, Lawrence Crowl cr...@google.com wrote:
The problem is that while T is customary as a template parameter, I
have never seen it used as a typedef name. And that's the situation
that we are in now.
this should be a no-brainer: T should be reserved for the name
On 8/15/12, Richard Henderson r...@redhat.com wrote:
On 2012-08-15 07:29, Richard Guenther wrote:
+ typedef typename Element::Element_t Element_t;
Can we use something less ugly than Element_t?
Such as
typedef typename Element::T T;
? Given that this name is scoped anyway...
I've
On Wed, 15 Aug 2012, Lawrence Crowl wrote:
On 8/15/12, Richard Henderson r...@redhat.com wrote:
On 2012-08-15 07:29, Richard Guenther wrote:
+ typedef typename Element::Element_t Element_t;
Can we use something less ugly than Element_t?
Such as
typedef typename Element::T T;
Hi,
I have another out of curiosity-type question ;)
On 08/16/2012 11:19 AM, Richard Guenther wrote:
!
! template typename Element
! inline int
! pointer_hashElement::equal (const T *existing,
! const T *candidate)
! {
! return existing == candidate;
}
are
On Thu, 16 Aug 2012, Paolo Carlini wrote:
Hi,
I have another out of curiosity-type question ;)
On 08/16/2012 11:19 AM, Richard Guenther wrote:
!
! template typename Element
! inline int
! pointer_hashElement::equal (const T *existing,
! const T
On 8/16/12, Richard Guenther rguent...@suse.de wrote:
On Wed, 15 Aug 2012, Lawrence Crowl wrote:
On 8/15/12, Richard Henderson r...@redhat.com wrote:
On 2012-08-15 07:29, Richard Guenther wrote:
+ typedef typename Element::Element_t Element_t;
Can we use something less ugly than
On Wed, 15 Aug 2012, Richard Guenther wrote:
On Sun, 12 Aug 2012, Diego Novillo wrote:
This implements a new C++ hash table.
See http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00711.html for
details.
Diego.
Now as we see the result I'd have prefered a more C++-way instead
of
Hi,
On Wed, 15 Aug 2012, Richard Guenther wrote:
Like the following, only the coverage.c use is converted. I've never
seen template function arguments anywhere and having to repeat them all
over the place is really really ugly (yes, even if only in the
implementation).
This goes with
On Wed, 15 Aug 2012, Michael Matz wrote:
Hi,
On Wed, 15 Aug 2012, Richard Guenther wrote:
Like the following, only the coverage.c use is converted. I've never
seen template function arguments anywhere and having to repeat them all
over the place is really really ugly (yes, even if
On 2012-08-15 07:29, Richard Guenther wrote:
+ typedef typename Element::Element_t Element_t;
Can we use something less ugly than Element_t?
Such as
typedef typename Element::T T;
? Given that this name is scoped anyway...
r~
On 8/15/12, Richard Guenther rguent...@suse.de wrote:
On Sun, 12 Aug 2012, Diego Novillo wrote:
This implements a new C++ hash table.
See http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00711.html for
details.
Now as we see the result I'd have prefered a more C++-way instead
of making the
On 8/15/12, Richard Guenther rguent...@suse.de wrote:
On Wed, 15 Aug 2012, Michael Matz wrote:
On Wed, 15 Aug 2012, Richard Guenther wrote:
Like the following, only the coverage.c use is converted.
I've never seen template function arguments anywhere and
having to repeat them all
On 8/15/12, Richard Henderson r...@redhat.com wrote:
On 2012-08-15 07:29, Richard Guenther wrote:
+ typedef typename Element::Element_t Element_t;
Can we use something less ugly than Element_t?
Such as
typedef typename Element::T T;
? Given that this name is scoped anyway...
I do
On Wed, Aug 15, 2012 at 2:58 PM, Lawrence Crowl cr...@google.com wrote:
I do not much like _t names either.
Also, names ending in _t are reserved by POSIX if you #include
sys/types.h. Though that may only apply to global names, not to
types defined in classes or namespaces.
Ian
26 matches
Mail list logo