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

Search:

Type: Posts; User: Graham

Page 1 of 80 1 2 3 4

Search: Search took 0.11 seconds.

  1. Replies
    12
    Views
    1,022

    Re: Off topic: A belated adieu

    Thanks for the responses, everyone.

    Maybe one day I'll feel ready (or need :) ) to take on part time or short term contracts. If so, I'll be back, but for now let me say how much I've enjoyed...
  2. Replies
    12
    Views
    1,022

    Off topic: A belated adieu

    Apologies for starting an off-topic thread here...

    Some of you may have noticed that I haven't been around this forum for several months, now. The fact is that I was made redundant from my job at...
  3. Replies
    27
    Views
    4,277

    Re: Abstract VS Encapsulation

    Abstraction is the idea that the class works in the way you want it to work. Encapsulation hides all the nasty translation of that abstraction into the bits you have to use to do it.
  4. Replies
    21
    Views
    1,546

    Re: Accessibility of virtual functions

    AFAIAA, that technique won't work with a template, since you can't have template friends, so each "finaliser" has to be specific to the class it's finalising.
  5. Replies
    21
    Views
    1,546

    Re: Accessibility of virtual functions

    Without getting into the question of whether NVI should be enforced or not, I still tend to stick to one of my basic dicta, which is: "you need a reason to make something non-private".

    So, if I...
  6. Re: Problem with trick to overcome the absence of template typedefs

    If it isn't, they'll have to start calling it "C++1x".
  7. Re: Why is ((foo*)NULL)->bar(); undefined?

    Because the implicit "this" pointer within foo::bar would be null and any attempt to access a member would imply dereferencing a null pointer, which is undefined behaviour.
  8. Replies
    20
    Views
    1,852

    Re: const Class& class

    ...
  9. Replies
    1
    Views
    1,502

    Re: STL TR1 type_traits surprises

    Possibly it simply means that there are no "signed/unsigned" variants of the type. As in, you can't have "unsigned float" as a type.
  10. Replies
    8
    Views
    1,569

    Re: Copy constructors and base Classes

    Nope. Memberwise copies. For members of class type, it will call the appropriate copy constructor, for members of basic type (int, pointer, etc.) it's likely to be bitwise, but it's better to think...
  11. Replies
    7
    Views
    796

    Re: compling issues - const issue

    Interesting - Comeau fails it with the same errors. Presumably implicit default ctors are not considered wrt const objects. I'll see if I can find the relevant section of the standard.
  12. Replies
    7
    Views
    796

    Re: compling issues - const issue

    It's the version number I was after (I somehow managed to completely omit the word "version" from the question).

    Are you sure that what you posted is the entire code that generated the error?
  13. Replies
    7
    Views
    796

    Re: compling issues - const issue

    Which compiler are you using? That shouldn't make any difference because your class will have a default ctor provided for it by the compiler.
  14. Replies
    4
    Views
    749

    Re: exception handling

    D is correct because catching by value may invoke a copy constructor, and that could throw an exception itself, leading to a call to terminate().
  15. Replies
    11
    Views
    2,491

    Re: exception in the destructor

    Or this:
    ...
  16. Re: a type (typename) as a parameter of a function

    You can't pass a type as an actual argument, you can only pass an object of a given type.


    No, a reference to an object of that type is given to the function as a parameter.
  17. Replies
    9
    Views
    2,398

    Re: Addressof Unary Functor

    random_shuffle() needs a random access iterator...
  18. Re: [RESOLVED] Faster to construct many times or construct once and assign many times

    Emphasis on the may. And, yes, I could see it as a possibility - after all, they can unroll loops if it's more efficient. Don't forget, optimisers have access to compiler implementation details that...
  19. Replies
    9
    Views
    2,398

    Re: Addressof Unary Functor

    ...until a day or two after this assumption gets deeply embedded into the code, at which point the requirements will change in such a way as to make the assumption invalid.





    Cynical? Me?
    ...
  20. Re: [RESOLVED] Faster to construct many times or construct once and assign many times

    Don't forget that the optimiser may well hoist the declaration out of the loop for you (and in a more efficient way than you could achieve manually), so the point could well be moot.
  21. Replies
    9
    Views
    814

    Re: "inline" and linking errors

    Switching debug on frequently de-inlines functions. The compiler often ignores "inline" on large functions, or for any of a number of reasons.

    It won't break the code, since the compiler knows...
  22. Re: Faster to construct many times or construct once and assign many times?

    The only way you're going to get a definitive answer is to put together a test harness and time the two approaches. Never try to second-guess such fine differences.
  23. Replies
    12
    Views
    886

    Re: self-referencing policies

    Hang on, that doesn't do what the original post was trying to achieve. In the OP, you had policy defining a type declared within the template argument


    template<class T>
    struct policy
    {
    ...
  24. Replies
    20
    Views
    4,062

    Re: how to get length of UTF8 encoded string

    IIRC, the worst case in UTF8 encoding is that a particular character can require 6 bytes in UTF8.

    Looking at it pragmatically (and assuming that you're using C++), I would tackle the problem by...
  25. Replies
    9
    Views
    1,018

    Re: Operator Ambiguity

    I did note the namespace issue...

    But there is the possibility of confusion by using the same name, and it only takes one pillock to put "using namespace std" in a header file...

    Personally,...
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center