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

Search:

Type: Posts; User: superbonzo

Page 1 of 47 1 2 3 4

Search: Search took 0.08 seconds.

  1. Replies
    6
    Views
    719

    Re: How to use Perceptualdiff

    as far as I can tell, I don't think so; the purpose of that tool is to compute a psychophysically based per-pixel metric of computer generated images to ease unit testing. Hence it's a (very useful...
  2. Replies
    8
    Views
    726

    Re: Program-unique values

    you're totally right; otherwise, the namespace should be unique to the file in which the template is declared ( which may or may not suit your usecase depending on how/where you declare the global )...
  3. Replies
    6
    Views
    719

    Re: How to use Perceptualdiff

    first of all thank you, the tool and the papers in the supplied link are really interesting ...

    anyway, regarding why you received no feedback; firstly, did you tried asking to the tool...
  4. Replies
    8
    Views
    726

    Re: Program-unique values

    if it appears in an header as is, yes, but you can always redeclare it in each and every file where's needed ( eventually with the help of a macro; actually note there's a typo in my post: the...
  5. Replies
    8
    Views
    726

    Re: Program-unique values

    I'm not sure I got what you mean by "a program-wide unique value to use as a template parameter", do you mean something like this ?



    namespace some_name_space {
    template< unsigned lineid,...
  6. Re: A faster algorithm than dijkstra's algorithm

    ... or define the length as minus the logarithm of the factor ;)
  7. Re: A compiler error with the implementation of smart pointer

    this is not entirely correct, the compiler does compile function template bodies and checks syntax and some non-dependent expressions; it's just that it's not required to diagnose other errors (...
  8. Re: How to use function that returns vector?

    returning containers is not *that* bad nowadays, note that in this case (as in post#6 and #7) the compiler is *required* to move as a worst case ( it also can and probably will perform move-elision...
  9. Re: The drawbacks of passing arguments by const

    ... and by (const) rvalue reference and by universal reference ( aka argument forwarding ) as well :). Anyway, IMO, any "pass by X" reasoning is short sighted because:

    1) it gets soon overly...
  10. Re: How to raise priority of MIDI input callbacks? Thread pools etc.

    I think it's a terminology problem; correct me if I'm wrong, by "preempting" you seem meaning the act of interrupting a thread *during* its timeslice to pass execution *immediately* to some other...
  11. Re: regex alternation, obtain the alternation index ?

    that would be a very useful feature indeed; anyway, if you're allowed modifiying the to be searched string then ( depending on your actual regex ) you could try something like



    #include...
  12. Replies
    27
    Views
    1,891

    Re: Bool type problem

    AFAIR, note that bool and enum bitfields follow special rules making OReubens claim essentially correct ( I cannot quote the std at the moment (I'm typing from a mobile device ) ) and forcing the int...
  13. Re: How do I remove an element of a vector and returning it?

    if "it" is an iterator referring to the to be removed element, "v" is the vector and "T" its value_type:



    // 1)
    // requires T to be copyable
    // will make v copy all elements after "it", order...
  14. Replies
    48
    Views
    2,003

    Re: Is this guaranteed to be correct?

    wow, maybe a moderator warning could bring the dicussion to a more civil level, at least to avoid totally offtopic and psychiatric posts like the above. I doubt so though, having you already been...
  15. Re: how can I get rid of these downcasts?

    the problem is that you need so called multimethods but c++ does not have them, take a look here for a Bjarne's take on this issue.

    As the paper suggests, a common standard workaround is the...
  16. Re: Passing a class to a sprintf() and similar

    just a lot of luck :)

    seriously, passing to printf ( or any C function vararg ) anything other than a POD with a matching format specifier will give undefined behavior ( ie, garbage data, a...
  17. Replies
    48
    Views
    2,003

    Re: Is this guaranteed to be correct?

    sadly nothing much to say ... just avoid off-topic non-technical offensive comments, please.
  18. Replies
    48
    Views
    2,003

    Re: Is this guaranteed to be correct?

    ipse dixit, and I suppose it's hopeless pointing out what type safety means ... :cry:



    any_cast won't "fail" in the UB sense, any_cast will return 0 if a wrong pointer is passed and will throw...
  19. Replies
    48
    Views
    2,003

    Re: Is this guaranteed to be correct?

    I know it's pointless to argument with you but just FYI ( and for other readers )

    nobody's advocating a "liberal" use of boost.any ( or the likes ), but you proabbly misread boost.any...
  20. Replies
    14
    Views
    476

    Re: How to solve this factorial

    fac it competition !!!
    possibly overflowing, fully portable, just one goto and no 'if' or '?:' :D :



    int fac( int it )
    {
    int fac(it);
    struct fac { virtual void it(){} } again,...
  21. Thread: OCR project

    by superbonzo
    Replies
    10
    Views
    427

    Re: OCR project

    I don't have a Skype account, sorry. You can ask questions here or you can send me a PM.
  22. Thread: OCR project

    by superbonzo
    Replies
    10
    Views
    427

    Re: OCR project

    I had exactly the same problem some years ago; well, it was not a stock market quote service, but some other live feed of data; there was no API, just an ugly legacy Internet Explorer-only Java web...
  23. Re: Exit two-threaded program with user input?

    this is by design, letting a joinable thread object to destroy will invoke terminate ( and for good reasons ), don't do that.



    You should either join and wait for it to finish or detach and use...
  24. Replies
    9
    Views
    474

    Re: Casting Pointers in C style?

    I do not agree (*), at least, as far as the "recommendation" is concerned. Note that a functional style cast can be easily confused with a constructor call whereas it's just a C cast in disguise,...
  25. Replies
    11
    Views
    495

    Re: Templated upcast function

    I think something like this might be simpler



    namespace details{
    template <typename TBase, typename T>
    TBase& DoUpCast(T& t,std::true_type)
    {
    return dynamic_cast<TBase&>(t);
    }
Results 1 to 25 of 1166
Page 1 of 47 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