Search:

Type: Posts; User: Grumpulus

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    1,236

    Thanks guys. These are all good points. Soma:...

    Thanks guys. These are all good points.

    Soma: I *do* use a lot of inline functions in my classes, so that could well be the culprit.

    Vart: I hadn't thought of using something other than 'int'...
  2. Replies
    5
    Views
    1,236

    Code that runs slower when optimized

    Hello all,

    This one has me scratching my head.

    I have some code that runs 20% slower when compiled with the -O2 optimization flag, as compared with the -g debugging flag.

    The time...
  3. Replies
    2
    Views
    601

    Hi Soma, Thanks very much for your thoughts...

    Hi Soma,


    Thanks very much for your thoughts on this.





    Yeah, that is the real issue here. I was trying to find some way of telling the compiler "Make this public, but only when it's...
  4. Replies
    2
    Views
    601

    Passing by partly-constant reference?

    Evening all,


    I am open to suggestions with this problem.


    I have a class setup that resembles the following:
  5. Replies
    8
    Views
    1,762

    I actually have another function called...

    I actually have another function called DieIf(bool condition, char const* message) that does exactly this.

    (Unfortunately, DieIf() isn't very helpful if the message needs to include more...
  6. Replies
    8
    Views
    1,762

    That's a really good suggestion. I hadn't thought...

    That's a really good suggestion. I hadn't thought of that one.

    As it happens, though -- I've been doing a bit more hunting over the past couple of hours -- and found something that is pretty much...
  7. Replies
    8
    Views
    1,762

    The opposite of noexcept

    [Edit: The title of this thread should have been "The opposite of noexcept". Sorry about that.] (fixed: Salem)


    I have a variety of Die()-type routines that I use for stack tracing of exceptions...
  8. Replies
    6
    Views
    987

    Okay guys, thanks for your input. Sounds like we...

    Okay guys, thanks for your input. Sounds like we have a real issue here. As soon as I get the chance, I'll report it.
  9. Replies
    7
    Views
    2,162

    At research universities, professors get promoted...

    At research universities, professors get promoted based on published research papers, and the ability to bring in research money -- *not* on teaching ability.

    Also, preparing lectures is vastly...
  10. Replies
    6
    Views
    987

    Yeah -- I realized right away that the...

    Yeah -- I realized right away that the C<T>::~C<T> syntax was wrong (though your response and the other fellow's did clarify the reason for that -- thanks).

    What baffles me is why commenting out...
  11. Replies
    6
    Views
    987

    Template syntax and coercion

    Here's another one for the gurus.

    The following code compiles in GCC 4.7.3. However, if you go to the implementation of the destructor (near the end), and replace the line marked "Compiles" with...
  12. Replies
    2
    Views
    779

    Yeah, I see what you mean. The only thing is,...

    Yeah, I see what you mean. The only thing is, that would probably put the kibosh on using initializer_lists directly in the argument list, which was what I really wanted to do.

    Guess I'll have to...
  13. Thanks for looking into this Manasij. That kind...

    Thanks for looking into this Manasij. That kind of unexplained behaviour often is a harbinger of deeper problems, so your result sets my mind at (relative) ease.

    Can someone please try running...
  14. Embedded std::function initialization question

    Here is another one that I can't easily figure out.

    The attached code works. However, if you replace the definition of embed_wrap_this2 in class MainClass with the commented-out line marked HERE...
  15. Replies
    2
    Views
    779

    Automatic indexing question

    Hello all,

    For the past couple of weeks I have been working on a template to hold two-dimensional arrays.

    Right now I am puzzling over an indexing question.

    There are many places in the...
  16. Replies
    38
    Views
    6,136

    When they come up with one in the C++ standard I...

    When they come up with one in the C++ standard I will very gladly start using it.

    Same goes for GCC's PRETTY_FUNCTION macro, by the way.
  17. Replies
    38
    Views
    6,136

    In my line of work, we often have to run jobs...

    In my line of work, we often have to run jobs that involve the processing of terabytes of data. These jobs can run for several days before finishing, even when optimized.

    If a job like this gets...
  18. That does indeed seem to be the way to go with...

    That does indeed seem to be the way to go with the original problem. Thanks, Yarin.


    I was so locked into the idea of somehow using the data() pointer to do this that I didn't even notice the...
  19. Agreed on all counts. Thanks for posting this...

    Agreed on all counts.

    Thanks for posting this example. I just went over it and now I see your point about repeat construction. Yikes. I had been wondering whether there were any other flaws in my...
  20. What NOT to do with std::vector.data() and push_back()

    At one time or another we've probably all run across old code that has functions that do internal dynamic memory allocation using this type of setup:

    int func(int** pointer);

    Inside the...
  21. Thanks for this Manasij. That has done the trick....

    Thanks for this Manasij. That has done the trick.

    You are probably right about this being the same bug that was cited in my earlier post.
  22. "Decltype", class member access level, and temporary objects

    Afternoon all,

    The class template shown below contains two std::vectors of different types. These are both held in an embedded std::tuple so that we can have a templatized at<I>(j) element...
  23. You seem to have hit the nail on the head,...

    You seem to have hit the nail on the head, Elysia. It's working now. Thanks very much.

    This was classic misdirection. I assumed that my mistake had to be in the subject material that I had just...
  24. Problem in template that uses "decltype", "typename", and "std::remove_reference"

    Afternoon all,

    I have got a problem here that I cannot get sorted out.

    The attached code runs fine as coded. If, however, you uncomment the alternate return lines 82 and 89 (in...
  25. Replies
    4
    Views
    652

    Yeah, that's exactly what I was trying to ask,...

    Yeah, that's exactly what I was trying to ask, although I think your answer makes the question more clear.

    I get it now. Thanks for this.
Results 1 to 25 of 29
Page 1 of 2 1 2