I had assumed that the typecast required meant that I had something wrong. But as it turns out using:
reinterpret_cast<HANDLE>(::_beginthreadex())
works just fine!
...
I'm using the _beginthreadex interface to create some threads. According to the MSDN docs _beginthreadex returns a uintptr_t, but the docs also talk about being able to directly use the handle...
std::numeric_limits<LONG>::max() returns an implementation defined value of type LONG that represents the largest possible positive value for the LONG datatype (ie. biggest integral value long can...
What is the maximum value that a semaphore can have? The CreateSemaphore takes in two LONGs for the inital and maximal value but passing in std::numeric_limits<LONG>::max() causes CreateSemaphore to...
I think you missed the infinite loop. Regardless of container resizing - it will run out of resources and at very least a bad_alloc exception will occur.
I thought it was pretty clear from the first 4 posts that the question had indeed been answered. I guess next time I'll explicitly state "ok - thank you - I understand - the end".
Wow, pretty uncreative. If you must know this code is for cloning. It comes from a reference implementation of C++ Library Extensions Technical Report 1 (tr1) - polymorphic function object...
I studied under Musser and did a lot of banging around with the HP implementation. It was a mess. That couldn't be helped. You really do need a lot of the language support added to the C++ spec to...
I think you are all missing the one key advantage STL has over any home grown solution yet it has been conclusively demonstrated here in this thread. FAMILARITY.
Yeah. The standard makes garantees only about the number of actual elements in the vector (calls to T's constructor) but says nothing about the vector's capacity. When a vector reserves capacity...
The standard guarantees that the invariant of your construct (calling a vector's range constructor) is that the size is equal to the number of elements within...
This thread has kinda run the gamut of topics (and the odd flame). Any chance you can revisit your last post and insert some quotes so I can better understand what and whose statements...
Out of curiosity; is this dictated by the standard or simply compiler convention. I know the standard does provide a definition of translation unit but its not the easist doc to find stuff in...
After a quick scan of the standard, the only other occurence of this hole is with 'unique'. Since the standard does not say that unique has to be implemented in terms of the remove family of...
Ok, I spent my 5 minute walk to the coffee vending machine thinking about the remove hole (yes, where I work for 35 cents you can get a large shot glass of coffee at any hour of the day or night).
...