Monday, June 5, 2017

Digest for comp.lang.c++@googlegroups.com - 5 updates in 2 topics

"Öö Tiib" <ootiib@hot.ee>: Jun 05 02:17AM -0700

On Saturday, 3 June 2017 07:29:04 UTC+3, Chris M. Thomasson wrote:
 
> Nice! Imho and fwiw, afaict the namespaces make me want to substitute
> the underscore _ with a :: wrt. Well, ct::float or ct::int names are not
> allowed?
 
Having our own things named "size_t" and "int16_t" (and "final" and
"override") is likely allowed to support legacy code and would get bad
reviews if done in new code. The "float" nor "int" can not be even used like that.
 
> Imvvvvho, ct_float is pretty low-level and not allowed in a namespace as
> ct::float?
 
> What am I missing here?
 
I would avoid using name "float" for something even if allowed. There are
easy to find alternatives (like "real" or "Float").
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Jun 05 06:40PM +0200

On 03-Jun-17 6:28 AM, Chris M. Thomasson wrote:
 
> Imvvvvho, ct_float is pretty low-level and not allowed in a namespace as
> ct::float?
 
> What am I missing here?
 
`float` and `int` are keywords, not type names.
 
Cheers!,
 
- Alf
"Chris M. Thomasson" <invalid@invalid.invalid>: Jun 05 01:06PM -0700

On 6/5/2017 9:40 AM, Alf P. Steinbach wrote:
>> as ct::float?
 
>> What am I missing here?
 
> `float` and `int` are keywords, not type names.
 
Indeed. I was just noting how if I replaced the underscore with a ::,
its not going to work. I missed Ian's point.
 
I should probably rename these to ct::real as in:
 
namespace ct
{
typedef double real;
}
"Chris M. Thomasson" <invalid@invalid.invalid>: Jun 05 01:09PM -0700

On 6/5/2017 2:17 AM, Öö Tiib wrote:
 
> Having our own things named "size_t" and "int16_t" (and "final" and
> "override") is likely allowed to support legacy code and would get bad
> reviews if done in new code. The "float" nor "int" can not be even used like that.
 
I remember that using the _t postfix is, or was, frowned upon because it
intrudes into POSIX wrt things like pthread_mutex_t.
 
 
>> What am I missing here?
 
> I would avoid using name "float" for something even if allowed. There are
> easy to find alternatives (like "real" or "Float").
 
Okay. I think real is good enough. Thanks.
Andrey Karpov <karpov2007@gmail.com>: Jun 05 09:43AM -0700

We have suddenly realized that there are opportunities for mutually beneficial cooperation between us and information security experts. Those experts who specialize in search of vulnerabilities in software code can use the PVS-Studio analyzer for free in their research. This will, in its turn, make our tool more popular if it succeeds in finding vulnerabilities. PVS-Studio can check projects written in C and C++.
 
Continue: https://www.viva64.com/en/b/0510/
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: