First  |  Prev |  Next  |  Last
Pages: 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
C++0x: Lambda, decltype, member function etc...
I have started playing around with GCC 4.5 and having trouble getting this to work... class LambdaMember { public: LambdaMember(int x) : m_x(x) { } private: int m_x; public: auto getterX() -> decltype([this]() -> int {return this->m_x;}) { return [this]() -> int {return this->m_x;}; } }; ... 13 Dec 2009 10:59
Updated performance tests using Boost Serialization lib
I've recently updated the performance section of a comparison between the Boost Serialization library and the C++ Middleware Writer -- http://webEbenezer.net/comparison.html#perf. The new tests were done on Fedora 12 and Windows Vista. The previous version of that file is here -- http://webEbenezer.net/comp138... 12 Dec 2009 16:44
compile time / run time - shift the borderline
Hi, reading about boost::proto i get back to the question of trading compile time efforts for run time efficiency. Unfortunately so far i didn't find a tutorial/example to hit the point here. In concrete i'd like to know, how run-time data go into the processing. I guess they have to move into what's names the "co... 4 Dec 2009 23:58
pros and cons of returning const ref to string instead of string by value
>I want to return by value and I am not worried about the performance of this. The opposition is worried about performance but has no figures or any other reason to back this up. It is just "more efficient". I have run into this attitude many many times. It is quite normal for people to argue for one construct ... 8 Dec 2009 21:56
Using preprocessor macro as a template parameter
I have no particular reason to do this, but consider the instantiation of this: template<int N> struct A { A() { cout << "Value of N is: " << N << endl; } }; A<__LINE__> a; // does not compile in VS2008 // But compiles in Comeau online. // This one compiles in both static const int LINE... 6 Dec 2009 16:08
Partial Specialization of Template Function
Hello, I have an issue when performing partial specializing of a template function. Please consider the following sample: <code> template <typename First, typename Second> foo(First const& one, Second const& two) { // ... } template <typename Second> foo<STRING, Second>(STRING const& one, Second const&... 8 Dec 2009 19:45
pros and cons of returning const ref to string instead of string by value
Zachary Turner wrote: On Dec 3, 2:36 am, Andrew <marlow.and...(a)googlemail.com> wrote: On 2 Dec, 22:00, Zachary Turner <divisorthe...(a)gmail.com> wrote: On Dec 2, 7:06 am, Andrew <marlow.and...(a)googlemail.com> wrote: Maybe I'm overlooking something, but I see little reason to return by value. ... 4 Dec 2009 11:44
pros and cons of returning const ref to string instead of string by value
restor wrote: Frankly, what you describe seems like a perfect fit for using shared_ptr Have your member be a shared_ptr<std::string>. And return shared_ptr<const std::string> from your getter function. shared_ptr adds itself a visible overhead, and may even be slower than returning string by v... 4 Dec 2009 23:58
Why no placement delete?
What's the rational for not having placement delete? I know you can define your own placement operator delete, but it will only be called in case a constructor throws an exception when placement new is called. You can't call placement delete directly. This limitation greatly impairs the use of custom allocators... 10 Dec 2009 01:26
pros and cons of returning const ref to string instead of string by value
In article <f2c7aae7-1a13-4f5e-a634-09ba3da27f9b(a)f16g2000yqm.googlegroups.com>, Zachary Turner <divisortheory(a)gmail.com> wrote: Maybe I'm still not understanding something, but by returning const reference you get a strict superset of the functionality possible when returning by value, with no downsides. ... 3 Dec 2009 20:29
First  |  Prev |  Next  |  Last
Pages: 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61