Search:
Type: Posts; User: mclark
Search:
Search took 0.04 seconds.
-
October 8th, 2004, 01:58 PM
Can anyone cite the C++ language standard rules on instantiation of templated type conversion operators?
If I have a function bar returning type T1, and another function foo taking in type T2 and...
-
Thanks all...
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...
-
June 22nd, 2004, 04:19 PM
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...
-
June 22nd, 2004, 03:26 PM
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...
-
March 2nd, 2004, 09:03 PM
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.
Graham is on the right track...
Graham...
-
March 2nd, 2004, 06:39 PM
if...
int main(void) {
int * p(some_value);
p = new int;
...
return 0;
-
March 2nd, 2004, 03:04 PM
Can someone quickly tell me what type of exception is thrown when an STL container is full...?
imagine...
int main(void) {
std::vector<int> myVec;
// loop only exited via exception...
-
February 11th, 2004, 04:08 PM
Beautiful,
This is exactly the type of succinct and definitive response I was looking for. Thanks for correcting my mistaken assumption!
-
February 11th, 2004, 03:27 PM
Ok, another question for the Standards weenies...
I'm pretty sure I know the answer (A) but I'm gonna ask anyways.
given...
std::vector<int *> Vec(1);
Vec is constructed using:
...
-
January 28th, 2004, 07:04 PM
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".
-
January 28th, 2004, 01:09 PM
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...
-
January 22nd, 2004, 02:12 PM
The example uses built-in types but of course what I really care about are user-defined types.
This is a question about evaluation rules... I believe it is well behaved because the rhs argument to...
-
January 6th, 2004, 01:51 AM
Can someone tell me if function argument evaulation rules make this exaple code illegal...
class foo { public: int x; };
void bar(foo & c, int y = c.x) {}
note that the question is about...
-
December 1st, 2003, 02:52 AM
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...
-
December 1st, 2003, 01:28 AM
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.
Both protractors and detractors...
-
November 30th, 2003, 03:44 PM
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...
-
November 30th, 2003, 03:53 AM
I do not think this refutes my claim.
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...
-
November 24th, 2003, 11:46 PM
yeah, yeah I forgot leading std:: for the example. Just add them and try it.
What I don't understand is why...
std::cout << i << ++i << i++ << std::endl;
output 220 (for me at least)...
-
November 24th, 2003, 11:30 PM
I'm sure once someone explains this to me it will all seem rational but for right now the explanation for the following output escapes me...
#include <iostream>
int main(void) {
int i(0);
...
-
November 22nd, 2003, 05:53 PM
Can using be used to make public a public method of an a member object?
class foo {void bar() {}};
class doink {public: void bar(){Foo.bar();} private: foo Foo;}
can 'doink' be built like...
-
November 22nd, 2003, 04:16 PM
Galathaea,
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...
-
November 22nd, 2003, 03:46 PM
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...
-
November 22nd, 2003, 02:07 AM
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...
-
November 22nd, 2003, 01:33 AM
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).
...
|
Click Here to Expand Forum to Full Width
|