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'...
Type: Posts; User: Grumpulus
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'...
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...
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...
Evening all,
I am open to suggestions with this problem.
I have a class setup that resembles the following:
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...
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...
[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...
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.
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...
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...
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...
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...
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...
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...
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...
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.
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...
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...
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...
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...
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.
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...
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...
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...
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.