First  |  Prev |  Next  |  Last
Pages: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
basic_string CoW concurrency: typo in N2668, or very subtle point?
Hello, I have read ISO/IEC JTC1 SC22 WG21 N2668 (a revision of N2647, which is a revision of N2534). "Concurrency Modifications to Basic String" http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2668.htm N2668 corrects a few typos from the previous versions, but there is still one paragraph left whic... 2 Jul 2010 16:50
Confusing behavior of copy constructor
Hi, The following code samples must give the same output but are giving different output. class A{ public: A(){} A(const A&){cout<<"Copying myself"<<endl;} }; A func(A a) { return a; } int main() { A a; func(a); } output: C... 2 Jul 2010 20:09
How can I alter how a user-defined type/enum is displayed? (facet/locale?)
{mod note: To avoid the funky formatting, set your line limit to wrap at about 70 characters.} On Jul 1, 10:02 am, Lorri <steve.lori...(a)gmail.com> wrote: Hi folks For a given user-defined type or enum: eg: enum blah { FOO, BAR}; extern std::ostream& operator<<(std::ostream ... 1 Jul 2010 18:56
How can I alter how a user-defined type/enum is displayed? (facet/locale?)
Hi folks For a given user-defined type or enum: eg: enum blah { FOO, BAR }; extern std::ostream& operator<<(std::ostream &out, const blah in); extern const char* const prt(const blah in, const bool full = false); How can I alter how the operator<< displays my blah enum? (in some cases I want th... 2 Jul 2010 16:50
How unique is the anonymous namespace?
Is an anonymous / unnamed namespace unique to the translation unit or is it simply unique, that is, is the following legal: *** file.cpp *** // ... namespace { int HelperFn(double d); }; // ... void ExternalFn() { // ... int x = HelperFn(1.0); // ... } // ... namespace { // Is this the *sam... 4 Jul 2010 16:38
Deleting a singleton object
Hi All This is my first post to the group and am exited! Here's my question: How and when will you delete the singleton object in a singleton design pattern? Thanks, Sourav -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do thi... 2 Jul 2010 16:50
conversion from `std::_List_iterator<int>' to non-scalar type `std::_List_iterator<int*>' requested
In article <073c8b78-95bd-41bf-94b2-c64a86904dd0(a)j8g2000yqd.googlegroups.com>, Jag <jagnpu(a)gmail.com> wrote: I don't understand. Can some one explain the issue here. Thanks ------------ template <typename T> static typename list<int>::iterator find_an_element(list<T>& a, const ^^... 30 Jun 2010 03:14
conversion from `std::_List_iterator<int>' to non-scalar type `std::_List_iterator<int*>' requested
On Jun 29, 4:27 pm, Jag <jag...(a)gmail.com> wrote: I don't understand. Can some one explain the issue here. Thanks ------------ template <typename T> static typename list<int>::iterator find_an_element(list<T>& a, const T& b) { typename list<T>::iterator itt = a.begin() ; while (itt !=... 30 Jun 2010 03:14
Where are novel C++ findings published?
Hi, I love comp.lang.c++ and comp.lang.c++.moderated but there are several reasons why I also like published findings. One reason is that I, as much as possible, try to refer written code to documented C++ techniques. My question is; if I want to contribute and publish, where would you recommend me to do that?... 1 Jul 2010 09:57
Implementing design by contract as RAII
I am trying to implement some tools to ease design by contract. To check invariants automatically at the beginning and end of member functions, I intend to use a helper object which does this in RAII- fashion: class InvariantViolation: public std::logic_error { }; class InvariantChecker { public: Inv... 1 Jul 2010 11:04
First  |  Prev |  Next  |  Last
Pages: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22