Type: Posts; User: JohnW@Wessex
Search took 0.12 seconds.
June 23rd, 2014, 03:32 AM
It's not hat the heap is a bottleneck. In an embedded environment, the heap is rarely used, if at all, due to the designers needing to have a tight grip on memory usage. Using the heap makes it very...
June 23rd, 2014, 03:21 AM
Yes, I was aware of that, but I discovered that there were severe limitations going down that route with the STL library I was using.
For instance, with a fixed vector implementation you can just...
June 16th, 2014, 08:08 AM
I've reverse engineered versions of STL containers that encapsulate their own fixed size resources.
This was necessary due to the project having real-time and memory constraints. This required the...
June 12th, 2014, 04:44 AM
Of course, if you want to do it the C++ way then you would use
In what circumstances doesn't it work properly?
December 20th, 2013, 10:13 AM
I copy and pasted your code directly to a VS2013 project.
It compiles with no errors.
December 20th, 2013, 09:48 AM
You don't need to cast it to a std::string. It has an inplicit constructor for char*.
: result("Hello world")
December 20th, 2013, 09:26 AM
See the edited post.
"One option is to remove the std::string conversion operator and let the string be constructed from the char*."
December 20th, 2013, 09:15 AM
The problem is that a std::string can be created from both a std::string and a char*.
When the compiler sees the line 'c=b;' it cannot determine which conversion operator it should use.
December 2nd, 2013, 05:09 AM
You may find this post on Stackoverflow useful.
November 20th, 2013, 04:55 AM
Indeed, but I was trying to post the least amount of code that replicated the problem.
November 20th, 2013, 03:52 AM
I've been creating a custom container and ran into this problem that has had me flumoxed all day.
I'm sure I'm missing something obvious, but I just can't seem to see it.
The code below fails...
October 16th, 2013, 11:40 AM
I don't really know. I assume one of the include file got corrupted in some way.
A normal re-installation didn't seem to overwrite all of the files.
I uninstalled VS, manually erased the folders,...
October 16th, 2013, 10:11 AM
October 16th, 2013, 10:03 AM
Not that I'm aware of. I imagine something got corrupted, but I hoped a re-install would fix it.
I'm going to try to eradicate all traces of VS2008 from my PC and do another re-install.
October 16th, 2013, 08:47 AM
For some reason, my Visual Studio 2008 Express has started to throw compile errors when including <iostream>
All projects that previously compiled without errors are now failing.
In fact I can...
October 7th, 2013, 03:20 AM
I ended up using Superbonzo's technique.
October 6th, 2013, 05:40 AM
As I've just discovered, this technique does not compile if any of the template parameters have copy constructors.
On Visual Studio this gives error C2621
September 16th, 2013, 09:16 AM
I got the usual FUD aurguments from them such as 'code bloat', 'slow' and 'inefficient'.
I tried to point out that, if they were experienced C coders, they were undoubtedly manually implementing...
September 16th, 2013, 08:36 AM
Some of the information here should give you an idea.
September 13th, 2013, 10:26 AM
I tried talking up the suitability of C++ in an embedded environment to a group of hardware engineers (who'd never programmed in anything but C) at an interview once. It didn't go down too well.
September 11th, 2013, 09:57 AM
I haven't delved much into TMP yet (It tends to give me a headache quite quickly) but I'll squirrel that information away for future reference.
September 11th, 2013, 08:51 AM
I work with embedded projects and, unfortunately, the compilers aren't likely to have C++11 support for a while yet. :sick:
September 11th, 2013, 08:41 AM
Search the web for opinions about what parts of C++ to be aware of when programming in an embedded envioronment.
Opinions can differ quite a lot concerning C++ constructs, but RTTI, dynamic memory...
September 9th, 2013, 07:53 AM
Yes that would be simpler.
The technique I used was from a more generic solution for templates with variable numbers of type parameters.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.