|
C++0x/1x exception specifications proposal: Compile-time checked Perhaps a mechanism can be introduced in the C++0x/1x standard, something simple like defining a function as: void somefunc(void) throw() { // ... } and getting a compile time error saying something like: "Error: void somefunc(void) throw(): Wrong exception specification. somefunc can throw std::b... 21 Jan 2008 16:49
destructing of global objects jtorjo2007(a)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 assume that with 'global object' you mean an object with static storage duration. I.E. an object th... 21 Jan 2008 16:49
Best way to allocate memory in the constructor Hi, What's the best way to allocate memory in the constructor and avoid memory leaks if the constructor fails? Let's say that in my constructor, I have to allocate memory with malloc (i.e. an array of char *)several times, and one of them fails. What's the best way to deallocate the previously allocated mem... 20 Jan 2008 21:31
C++0x two Unicode proposals. A correction one and a different one Richard Smith wrote: On 18 Jan, 10:11, Ioannis Vranos <j...(a)no.spam> wrote: Based on a discussion about Unicode in clc++ inside a discussion thread with subject "next ISO C++ standard", and the data provided inhttp://en.wikipedia.org/wiki/C%2B%2B0x, and with the design ideals: 1. To provide Unicode s... 21 Jan 2008 15:08
Map performance Hi, What are the requirements the standard places on the asymptotic behaviour of the std::map container? From Wikipedia: http://en.wikipedia.org/wiki/Map_%28C%2B%2B_container%29 The article claims O(n log n) for copying and O(log n) for iterator increment/decrement. It also claims O(n) for visiting all e... 21 Jan 2008 03:41
templates, namespaces, and questions Hi all. I have a problem figuring out what the correct way for a compiler to handle the code below would be. [Also for the cases where NAMESPACES and/or CONVERSION were #define'd to 1.] ///////////////////////////////////////////////////////////////////// #include <iostream> #define NAMESPACES 0 #define... 18 Jan 2008 17:54
operator+ on nested type within template class Hello, I have this code: #include <iostream> template<unsigned int modulus> class modRing { public: class element { public: element(unsigned int valIn): val(valIn) {} unsigned int val; }; }; ... 18 Jan 2008 20:11
C++0x two Unicode proposals. A correction one and a different one Based on a discussion about Unicode in clc++ inside a discussion thread with subject "next ISO C++ standard", and the data provided in http://en.wikipedia.org/wiki/C%2B%2B0x , and with the design ideals: 1. To provide Unicode support in C++0x always and explicitly. 2. To provide support to all Unicode sets out th... 20 Jan 2008 21:31
"strict weak ordering" requirement of compare argument for std::set Jochen Eisinger wrote: if I'm not mistaken, the compare parameter of the std::set template has to fulfill the "strict weak ordering" requirement. In contrast to a "total ordering", two objects might just not be comparable by a strict weak ordering, i.e. neither x < y nor y < x although x != y. Right. ... 18 Jan 2008 06:23
string::find() behaviour searching for an empty string Greetings! We have some problems concerning the behaviour of this piece of code: string s = "aoeui"; string::size_type pos = s.find(""); There is one opinion that says that 'pos' must be 'string::npos', because you can never find an empty string anywhere. There is another opinion that says that it mat... 18 Jan 2008 20:11 |