First  |  Prev |  Next  |  Last
Pages: 48 49 50 51 52 53 54 55 56 57 58 59 60 61
ON_BLOCK_EXIT and e.g. C4189
Hi all! When using ON_BLOCK_EXIT(_OBJ) of ScopeGuard, compiler is emitting a warning for unused variable. E.g. MS C++ compiler says: warning C4189: 'scopeGuard44' : local variable is initialized but not referenced Clearly, that can be suppressed using #pragma warning for that compiler. I'd like to avoid ... 14 Dec 2008 22:17
warning: ... has a field ... whose type uses the anonymous namespace
Hi, can anybody please explain the following warning to me .../include/zthread/PoolExecutor.h:58: warning: 'ZThread::PoolExecutor' has a field 'ZThread::PoolExecutor::_impl' whose type uses the anonymous namespace Many thanks for a hint, Helmut Jarausch Lehrstuhl fuer Numerische Mathematik RWTH - A... 21 Nov 2008 19:20
Variadic templates
I am thinking about possible implementation for a class to store arbitrary number of objects of arbitrary types, just like tuple<>, but with support for later (perfect) forwarding. As far as I understand, the code in the simplified example below is not supported by c++0x. If so, can someone explain why support for ... 8 Dec 2008 18:42
ANN: Library dependency graphs tool status update and questions
A while ago I wrote a tool to produce a dependency graph for C/C++ libraries using graphviz. This was to help on large C/C++ established projects where the libraries had become very tangled over the years. The project is called depdot and is on sourceForge at https://sourceforge.net/projects/depdot. I see from t... 20 Nov 2008 15:25
strcpy_s vs strcpy
Hi, I have changed my strcpy to strcpy_s for 2005 project. It's fairly big project and was using strycpy lot of places. The program started corrupting the stack and in turn crashing the application. We have realized that it is due to strcpy_s. We have changes that to strpcy and then it was fine. There are s... 7 Jul 2008 18:41
composition and bad_alloc
Hi all, This seems straightforward but gives this runtime error: terminate called after throwing an instance of 'std::bad_alloc' , what() : std9bad_alloc . I have: class X { int sz; T *ptr; public: X(int s, T *p) : sz(s), ptr(new T[s]) { assert(ptr != NU... 18 Apr 2008 16:38
Namespace vs. isnan
Hi Folks, I came across an annoying thing: the 'isnan' function isn't a function, it's actually a macro (at least on my Linux system), defined in math.h. In principle, the notion was IIRC that #include <math.h> pulls the contents of math.h into the global namespace (a la C), while <cmath> pulls the contents... 8 Jan 2008 09:20
problem of using stream to serialize vector<vector<T> >
magiceye <magiceye(a)163.com> writes: struct A { string sa; float na; }; struct B { vector<A> vb; }; struct C { string sc; B vc; }; friend std::istream& operator>>(std::istream& is, B& m) { std::copy(std::istream_iterator<B>(is), ... 22 Dec 2007 15:54
LinkedHashMap in C++
On Nov 23, 11:36 am, Mathias Gaunard <loufo...(a)gmail.com> wrote: On 22 nov, 13:27, ap...(a)student.open.ac.uk wrote: I have recently started using java and have come across the LinkedHashMap. For those not in the know this is like a hash table (ie fast indexing via hash function) but also has the nea... 26 Nov 2007 06:18
Using SFINAE with member function types
Below is some code illustrating the wrong way to do what I'd like to do. I have a class "A" with function "void f(int,int)" and class "B" without that function. Is there a way to construct a traits-like class, Q, that contains a constant expression (Q<T>::value) that evaluates to true if some class T has the funct... 22 Jul 2007 04:47
First  |  Prev |  Next  |  Last
Pages: 48 49 50 51 52 53 54 55 56 57 58 59 60 61