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

Search:

Type: Posts; User: PredicateNormative

Page 1 of 46 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    27
    Views
    983

    Re: passing smart pointer

    Yes, however, as I stated previously:

    If the true terminology was still so well widely known and accepted, there wouldn't be so many varying opinions. The fact is, it may have been well...
  2. Replies
    27
    Views
    983

    Re: passing smart pointer

    So, razzle, lets get back to businness... ;)


    You are missing the point, the reason for avoiding dynamic memory allocation in real-time systems, is not always to do with the timing guarantees of...
  3. Replies
    27
    Views
    983

    Re: passing smart pointer

    Yeah, that is where I was coming from in post #10. My point being is that it depends on intent, i.e. what is the subject matter?

    But, if you take the strict alias view of reference semantics,...
  4. Replies
    27
    Views
    983

    Re: passing smart pointer

    Agreed, however, outside of the context of Stroustrup and the C++ standard (neither of which by the way give any formal definition of the term reference semantics, though both do make statements that...
  5. Replies
    27
    Views
    983

    Re: passing smart pointer

    Having spent all the time that I was going to spend replying to the rest of razzles last post, researching the subject of reference semantics, I'm changing my mind - I don't agree with the argument...
  6. Re: Can you think of anything wrong with this code.

    Ok, your post has just shattered my trust in alignment guarantees for non-standard alignment of objects that are not automatic. Although I don't have time now, at the my available opportunity, I'll...
  7. Replies
    27
    Views
    983

    Re: passing smart pointer

    Razzle, my apologies for not replying sooner, although I read your post on Saturday, due to a number of commitments, this is the first opportunity I have had to respond. I'm a bit limited for time at...
  8. Replies
    27
    Views
    983

    Re: passing smart pointer

    Ok, let's go through these one by one. I'll deal with point 5 first, because it is really important to the context of other things that I'll write in this post.



    There are no other parameter...
  9. Replies
    27
    Views
    983

    Re: passing smart pointer

    Agreed. :)
  10. Replies
    27
    Views
    983

    Re: passing smart pointer

    There are a few issues with your code.

    1) Do not use leading underscores, the C++ Standard states:

    That basically means if you define variables with leading underscores you are running the risk...
  11. Re: Can you think of anything wrong with this code.

    It would have done, but a few lines down, you will see that I use placement new to copy construct a U to a value_type which is a T, so the type that resides in the allocation is a T type. :)
  12. Re: Can you think of anything wrong with this code.

    I'd never heard of an over-aligned data until today... looks like I haven't read enough of the C++11 Standard! :D

    That's interesting... so if the C++11 allocation functions are not required to...
  13. Re: Can you think of anything wrong with this code.

    Yeah, this is bad, but I believe that both Windows and Linux have atomic read/writes for objects that are of the same size or smaller than a pointer. I really should just mutex protect the variables....
  14. Re: Can you think of anything wrong with this code.

    I'm wondering if the solution to my problem is to make the following changes to my node class?



    template <typename T>
    struct node
    {
    typedef T value_type;

    node()
  15. Re: Can you think of anything wrong with this code.

    Although I find your post helpful, please can you expand upon the part of your quote in bold? I'm not sure that I am correctly understanding what you are saying. It would seem that you are...
  16. Re: Can you think of anything wrong with this code.

    Yeah, I read that before I posted my code... in fact, it was that gotw (well, technically it was Item 30 in Exceptional C++ which is pretty much identical) that prompted my post. I realised that in...
  17. Re: Can you think of anything wrong with this code.

    You haven't missed anything, I've just been a muppet, thanks for pointing out that rather critical error.

    Anyway, your comment has got me wondering why it has worked so far without any issues. I'm...
  18. Re: Can you think of anything wrong with this code.

    Finally locked it down. Under Allocator Members, the Standard states:



    The line in bold clearly prohibits additional padding between array elements (else the storage size would not be...
  19. Re: Can you think of anything wrong with this code.

    Just noticed, under the sizeof section, the C++ standard states:

    This in turn implies that the maximum alignment requirement of T is no greater than sizeof(T). This would make sense since if I...
  20. Can you think of anything wrong with this code.

    As a bit of background, I'll be leaving my current company soon - this is posing as a slight problem to my company because very few software engineers at my company know how to write or maintain...
  21. Re: Will you tell me how badly I wrote small battle-game?

    I'm not entirely sure what you mean when you say "which would be pass-by-referencing name() in my code". However, for clarification,


    const std::string& name() const { return m_name; }

    is...
  22. Re: Will you tell me how badly I wrote small battle-game?

    Here are some suggestions:

    1) Always initialise variables with a value.
    2) I'm interested why you commented out correctly calling srand once at the beginning in favour of incorrectly calling...
  23. Re: boost::condition_variable problem

    Sorry about my very delayed response - things got pretty manic at work. Due to time constraints I have had to apply a patch (pretty much re-implemented the offending bit of code in a different,...
  24. boost::condition_variable problem

    I have written a fairly large application with a small team of software engineers (~237kloc) over the last four years. In our development environment under Windows, the bug that I'm about to...
  25. Re: Invalid access to memory location using GlobalFree

    In addition to what Paul has said, with respect to management try to follow the following guidelines:

    Use RAII classes to manage resources (not only memory but all resources).
    Using memory...
Results 1 to 25 of 1141
Page 1 of 46 1 2 3 4


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