Taking address of struct temporary558 (7/19/2012 1:58:30 AM) comp.lang.c I've been playing around with an object library and have run into an
inconsistency between using it under a C compiler and using it under a
C++ compiler.
I wanted a way to declare "objects" statically, mea... nroberts
Function casting - UB?2153 (6/27/2012 3:50:23 PM) comp.lang.c In C++ this would be totally undefined. How about in C? It works on
my machine with my compiler...
If it's UB, is it one of those rules that pretty much has to work
anyway? What I mean is things like th... nroberts
Terminology - RAII vs. Scope Guard vs...?2844 (4/10/2012 8:47:51 PM) comp.lang.c++ So RAII is when you make it so that the acquisition of a resource is tied to the initialization of a scope-based variable that cleans up said resource when it's destroyed. A Scope Guard is something you set up... Noah
Array sizes in function parameters.443 (2/25/2012 1:08:23 AM) comp.lang.c Say I do this: void fun(char buffer[2048]) ... and then assume that any buffer I'm passed in will have 2048 bytes. That's silly, right? At least with gcc I can pass in any size array there. Pretty sure I r... nroberts
strncpy and 'n'4552 (2/16/2012 5:05:07 PM) comp.lang.c Consider: char const* f(char const* incoming) { static char buf[MAX]; strncpy(buf, incoming, strlen(incoming)); } Is there ANY reason to use strncpy like that? I'm working on a project that has such use... nroberts
a = b or memset/cpy?1851 (2/7/2012 5:02:06 PM) comp.lang.c memset and memcpy are turning up in profiles a lot. I'd like to speed things up a bit. Sometimes it is clear that using = to initialize a local would be better than memset. I might not gain anything, but at ... nroberts
Am I being too C++ like?8653 (1/18/2012 9:53:57 PM) comp.lang.c I'm working on a C project and I come from C++ background. I used to work with C 10 years ago though when I was first learning various languages and used things like Xlib, Xt, etc... I keep getting told that ... nroberts
unit test logging?145 (12/19/2011 6:23:35 PM) comp.programming Should object logging be included in unit tests? We do expect that when event X happens we log to log Y at level Z, but is this too much? ... nroberts
Odd error I can't seem to recreate1345 (11/4/2011 6:52:56 PM) comp.lang.c++ In a significant code base I'm running into this problem: This works: test_service service; std::string result =3D job->run_query(service); This does not.: std::string result =3D job->run_query(test_service()... Noah
Map C++ feature to C1754 (6/24/2012 8:23:02 AM) comp.lang.c Dear friends
Is there a way to embulate C++'s virtual destructors in pure C. IE just
using function pointers.
Many Thanks.
... nospam21(11322)
Taking address of struct temporary558 (7/19/2012 1:58:30 AM) comp.lang.c I've been playing around with an object library and have run into an
inconsistency between using it under a C compiler and using it under a
C++ compiler.
I wanted a way to declare "objects" statically, mea... roberts.noah(1664)
Template overriding base class virtual function?376 (7/24/2012 1:26:40 PM) comp.lang.c++
I'm trying to write something like a clone() method using the curiously
recurring template pattern. What I'm doing is similar to what's
described here:
http://nerdland.net/2009/06/covariant-templatized... pfd(29)
is C++ worth it ?10670 (7/27/2012 3:37:57 PM) comp.lang.c++ Is C++ worth it ?
http://lemire.me/blog/archives/2012/07/23/is-cc-worth-it/
"But we are also moving away from low-level programming
and, yet, our software is still getting faster. I believe
that a maj... lmc(186)
Why RTTI is considered as a bad design?3355 (8/1/2012 8:23:57 AM) comp.lang.c++ Hi,
what is a reason for which RTTI is considered as a bad design?
Stroustrup has written in his book TC++PL that the most common case of usag=
e RTTI technique is with switch instruction, when one want to d... davidkevin(12)
empty lambda capture and static1243 (8/2/2012 11:46:35 AM) comp.lang.c++ Hi All,
I've got this little example compiling under GCC, but I'm
not sure it is compliant:
void foo()
{
static const double cCOEFFICIENT = 0.1;
auto x1 = []
{
return cCOEFFICIENT*10;
... werasm(308)
GCC is re-implementing in C++ and C discarded17576 (8/22/2012 5:34:37 PM) comp.lang.c Hello! Wise people!
Just read the shock news[1][2] that GCC is re-implementing in C++ and C will be discarded ( deprecated ? : )
But still not very clear on it.
.. does it mean C++ is better than C?
... lovecreatesbeauty(723)
A question about this forum240 (8/28/2012 12:11:45 AM) comp.lang.c++
Could any member advise some blog posts on this thread topic? I want
some more detailed info... All help is going to be gratefully
appreciated.
Dietrich Huberstrauken
'blogGrid - Create. Post. Manage.... bloggridnt.5hzh7z(1)