Re: Compilers supporting exception handling0108 (2/23/2008 10:45:32 AM) comp.lang.c++.moderated humptydumpty wrote: > Hi > I want to know which compilers support the exception handling keywords > > try , catch and throw > > Thanks in advance > Jamie > It might be best to turn your question around; Whi... Bart
Re: is this a reference to a temporary or not?090 (2/17/2008 9:22:05 PM) comp.lang.c++.moderated Joshua Lehrer wrote: > Does the following invoke undefined behavior? Yes. > The question is whether > or not a temporary is created in the call to "cast". If so, then cast > is returning a reference to a ... Bart
Re: Bug in g++ ostringstream implementation ???0238 (1/30/2008 12:32:31 PM) comp.lang.c++.moderated Rune Allnor wrote: > On 29 Jan, 22:02, Brian Neal wrote: >> On Jan 29, 8:50 am, Rune Allnor wrote: >> >> > On 28 Jan, 20:55, Brian Neal wrote: >> >> > > On Jan 25, 11:53 am, Carlos Moreno >> > > wrote: >> ... Bart
Re: destructing of global objects097 (1/19/2008 4:18:06 PM) comp.lang.c++.moderated jtorjo2007@yahoo.com wrote: > Hi all, > > I've looked at the standard, but it doesn't seem to address this. > > Assume I have a global object, and it gets destroyed. And I have > something like this: I will... Bart
Re: About Int2Type0172 (1/11/2008 9:58:56 PM) comp.lang.c++.moderated cppcraze wrote: > Hi, > > Since loki help forum is not responded timely, I would like to ask a > simple question here about Int2Type defined by Mr Alexandrescu. > Following is definition of Int2Type: > > tem... Bart
Re: try block in constructor initialization087 (12/10/2007 3:21:50 PM) comp.lang.c++.moderated AlfC wrote: > Is is possible to do a try catch block in the constructor > initialization list and use an alternative initialization if first > failed? Not directly, but you could hide it in a helper function.... Bart
Re: Is this illegal/unportable/immoral ?086 (12/2/2007 8:38:39 AM) comp.lang.c++.moderated irotas wrote: > I have a pair of classes far more sophisticated than what is shown > below, but this simple example contains the piece of code that a > colleague of mine said gave him a "not so fresh" feeling.... Bart
Type length in bits?5127 (4/24/2011 6:45:31 AM) comp.lang.c++ What is a standard way to get the "length in bits" (in the sense of 5.8/1) of a type? -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time pos... BigMan(211)
Force creation of objects with new operator1727 (6/30/2011 9:48:31 AM) comp.lang.c++ I have a class where I want objects to commit suicide by calling delete this; Therefore, I want to be sure that all objects are created only using the new operator. I am thinking about making the con... urs(44)
Slicing with ?: operator - expected?1030 (7/6/2011 1:50:19 PM) comp.lang.c++ Hello All, Here is the code: class Foo { public: virtual void bar() const = 0; }; #include #include class Foo1 : public Foo { void bar() const { std::cout << "Foo1::b... v.bazarov(790)
Unexpected Rotate?1132 (7/19/2011 4:48:48 PM) comp.lang.c++ With: g++ --version g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48) On: uname -a Linux mbrc40 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:53:09 EST 2011 i686 i686 i386 GNU/Linux (A Centos box) Running the program: ... m_d_berger_1900(127)
Address of array && address of pointer to array3621 (9/14/2011 1:12:58 PM) comp.lang.c Hello all I am confused of array and pointer these days, and wrote some testing program. one of the snippet is as below: int A[3]; printf("%p\n", A); // 1 printf("%p\n", &A); // 2 printf... heconghui(49)
floating point conversions && how to read standards529 (10/7/2011 7:55:46 AM) comp.lang.c++ Hi all, I got confused while referencing to the 4.8/1 in draft n3242. 4.8 Floating point conversions A prvalue of floating point type can be converted to a prvalue of another floating point type. If the source... heconghui(49)
C++ puzzle - how to get this to compile ?921 (12/1/2011 12:24:52 AM) comp.lang.c++ How might one go about getting something like the following example to compile successfully ? class cls2 { friend void cls1::fun1(); }; class cls1 { cls2 mbr1; public: void fun1(); }; ... jhart666
own initialization before calling parent's constructor2421 (12/8/2011 1:07:39 PM) comp.lang.c++ Hello, The subject says it - is it legal to initialize fields of the derived before calling the parent's consctructor, in the initialization list. For example: class Base { public: int b; B(int arg):b(ar... alxvasilev(44)