Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: mclark

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    0
    Views
    889

    user-defined type conversion operators

    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...
  2. Replies
    6
    Views
    548

    Thanks all... I had assumed that the typecast...

    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!
    ...
  3. Replies
    6
    Views
    548

    question about _beginthreadex and handles

    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...
  4. Replies
    4
    Views
    937

    std::numeric_limits::max() returns an...

    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...
  5. Replies
    4
    Views
    937

    CreateSemaphore WIN32 Interface

    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...
  6. Replies
    5
    Views
    525

    I think you missed the infinite loop. Regardless...

    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...
  7. Replies
    2
    Views
    376

    another childish 'exception' question

    if...

    int main(void) {
    int * p(some_value);

    p = new int;

    ...

    return 0;
  8. Replies
    5
    Views
    525

    'exception' question

    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...
  9. Replies
    2
    Views
    463

    Beautiful, This is exactly the type of...

    Beautiful,

    This is exactly the type of succinct and definitive response I was looking for. Thanks for correcting my mistaken assumption!
  10. Replies
    2
    Views
    463

    question about initial values

    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:
    ...
  11. I thought it was pretty clear from the first 4...

    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".
  12. Wow, pretty uncreative. If you must know this...

    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...
  13. Does the following statement invoke undefined behavior?

    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...
  14. Replies
    2
    Views
    524

    Is this code well-defined/legal?

    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...
  15. Replies
    279
    Views
    38,398

    I studied under Musser and did a lot of banging...

    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...
  16. Replies
    279
    Views
    38,398

    I think you are all missing the one key advantage...

    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...
  17. Replies
    279
    Views
    38,398

    Yeah. The standard makes garantees only about...

    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...
  18. Replies
    279
    Views
    38,398

    I do not think this refutes my claim. The...

    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...
  19. Replies
    11
    Views
    812

    yeah, yeah I forgot leading std:: for the...

    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)...
  20. Replies
    11
    Views
    812

    stupid basic C++ question...

    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);

    ...
  21. Replies
    1
    Views
    311

    Quick question about 'using'

    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...
  22. Replies
    279
    Views
    38,398

    Galathaea, This thread has kinda run the gamut...

    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...
  23. Replies
    10
    Views
    596

    Out of curiosity; is this dictated by the...

    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...
  24. Replies
    279
    Views
    38,398

    Re: the souldog remove hole

    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...
  25. Replies
    279
    Views
    38,398

    the souldog remove hole

    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).
    ...
Results 1 to 25 of 48
Page 1 of 2 1 2


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center