Can there be parallel initialization of global variables in C++0x? Hi, As the standard now defines multi-threading, is there anything said about the initialization of global variables? I.e. will a compiler be allowed to initialize global data in parallel? Thanks, Daniel -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moder... 28 May 2010 12:37
Template pointer and reference type parameters with tr1 variate_generator As this example describes, the results with a template type argument can be very different from the results with a pointer or reference template type. The current crop of compilers "do the right thing" with pointer or reference template type arguments. Can pointer or reference type arguments be rewritten to work w... 27 May 2010 14:49
TypeTraits for Parameters So we have this templated factory for COM objects. A simplistic view of it would be the following: template <class T> class Creator { public: // const& arguments template <class I> static HRESULT Create(I** ppI) { return Create(NoArg(), NoArg(), NoArg(), NoArg(), NoArg(), ... 27 May 2010 13:42
regarding Auto and decltype Hello everybody. In Scott Meyers lecture notes he states that one of the differences between Auto and decltype is that the decltype does not evaluate the expression. I have a question regarding the evaluation of the expression, in the next scenario what should I expect: class B { public: B() { } v... 25 May 2010 14:37
numeric_limits and constexpr Hello, I notice that the default numeric_limits in C++0X reads: static constexpr T min() throw() { return T(); } I assume this fails if T doesn't have a constexpr default constructor (T isn't a literal type). It's never been clear whether users were supposed to provide a specialization of numeric_limits for... 30 May 2010 16:29
How can I make a class look like a template with zero arguments? Hi, To be able to initialize a member before any base class I have to inherit the member virtually as the first base class in the base-specifier-list. This is needed when dealing with std::streambuf. See http://accu.org/index.php/journals/264 Basically it looks like this. class MyOStream : private vi... 26 May 2010 01:36
has_interface trait Now say I build an interface like this: class IInterface { public: virtual void foo() = 0; virtual ~IInterface() {}; }; template<class T> class Box : public virtual IInterface { T * x; public: Box() { } Box(T * x) { this->x = x; } virtu... 23 May 2010 14:39
Is it dangerous to pass a temp variable to throw for instance class Except { public: template <class T> Except &operator<<(T const &); }; throw Except() << "went bang"; In our version of lint, this gets an error about initialising a non- const reference with a non-lvalue. Is this a valid error? Isn't the temporary object that gets created immediately c... 25 May 2010 12:24
C++ STL vectors - pointer to Vectors: do we need them? Dear All, I'm learning STL vectors. So, excuse me for the dummy question. Suppose that, in some function, I create a foo() { vector<string> SS; } Is this vector deallocated at the end of the foo() function? If I want to pass it to some other function that will store it somewhere, do I need to use ... 21 May 2010 17:12
complex number issues Hi, I had to call a C++ library using std::complex<double> as its complex number type. But I want to use C99 complex number in my code. When I include the <complex.h> head file, it will lead to a lots of errors. So, is it possible to using C99 complex number in my C++ code to call a C++ library using std::comp... 27 May 2010 03:48 |