First  |  Prev |  Next  |  Last
Pages: 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
tuple_max in C++1x
Is it possible to find the maximum value of a C++1x tuple, and then update that value? I could almost imagine calculating the maximum value in a tuple, but the index corresponding to this value would not be a compile-time constant literal, as required by the tuple "get" function. Graham. -- [ See http:/... 12 Apr 2010 17:00
rvalue-reference result premature destruction
The code shown below produces output: fun<0>(.).val()=100 fun<1>(.).val()=-926642400 when compiled with: ftp://gcc.gnu.org/pub/gcc/snapshots/4.5-20100408 The odd value for fun<1> output is most probably produced by premature destruction of the concrete returned from fun<1> call. How should th... 11 Apr 2010 01:32
const is an overrated concept that is a source of extra typing and mai
markjord(a)gmail.com (mtspark) wrote (abridged): In one implementation, Method A may just return a copy of the instance variable. Fine, const fits here. In another implementation, the underlying object state (perhaps another state variable) may have to change to get the answer. ie. The interface is logically... 9 Apr 2010 16:43
performance of map in MSVC 10b2
I use map a lot in my daily work, so the performance of map is very important to me. today i did a very simple test on MSVC10b2, using std::map, std::unordered_map and boost::unordered_map, and found that the test result is suprise to me. here comes test code first: MSVC10b2, WinXP //---------------------------... 10 Apr 2010 17:53
using operator++() without its side-effect
Is there some standard/boost equivalent to a function like: template< typename T > T successor( T r ) { return( ++r ); } That can be used when the return value of operator++() is needed but not the side effect (notice non reference parameter). I always feel the need when using iterators and need to peek ... 9 Apr 2010 16:43
const is an overrated concept that is a source of extra typing and maintenan
In article <rwP27UG+gjuLFwQn(a)J.A830F0FF37FB96852AD08924D9443D28E23ED5CD>, John G Harris <news0(a)nospam.demon.co.uk> wrote: class IAbstract { public: virtual int MethodA() const = 0; }; The const qualifier guarantees that next time you do x.MethodA() you will get the same answer ... 6 Apr 2010 04:13
const is an overrated concept that is a source of extra typing and maintenan
On 4 Kwi, 23:09, mtspark <markj...(a)gmail.com> wrote: I have an abstract interface, lets call it IAbstract with a single method, lets call it MethodA. Let's say this interface has two implementations, one for windows and one for linux. class IAbstract { public: virtual int MethodA() co... 4 Apr 2010 18:10
performance of hash_map in combination with strings on vstudio 2003
On 2 apr, 13:45, Goran <goran.pu...(a)gmail.com> wrote: On Mar 31, 6:43 pm, "gast...(a)hotmail.com" <gast...(a)hotmail.com> wrote: Hello all, I am not sure if this is the correct newsgroup, but the information might be helpful. The (stdext::) hash_map in combination with strings (used on VStud... 2 Apr 2010 18:10
const is an overrated concept that is a source of extra typing and maintenance
On Mon, 2010-03-29, Seungbeom Kim wrote: On 2010-03-29 14:18, Peter C. Chapin wrote: Daniel T. wrote: It doesn't even really communicate intent if you are putting the const in after the fact because you happened to notice (or a tool told you) that the value didn't happen to get modified. ... 2 Apr 2010 11:28
performance of hash_map in combination with strings on vstudio 2003
On Mar 31, 6:43 pm, "gast...(a)hotmail.com" <gast...(a)hotmail.com> wrote: Hello all, I am not sure if this is the correct newsgroup, but the information might be helpful. The (stdext::) hash_map in combination with strings (used on VStudio 2003 / vc7.1) does not have a good performance. It's actual sl... 2 Apr 2010 07:05
First  |  Prev |  Next  |  Last
Pages: 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39