Jean-Marc Lasgouttes writes:
| Le 23/10/12 21:18, Lars Gullik Bjønnes a écrit :
>> | Concerning auto, I am still not sure that I like it.
>>
>> Liking it took me some 5 seconds.
>>
>> Auto suddenly makes it nice to work with the complex types you get in
>> C++.
>>
>> Imagine:
>>
>> auto func = []
Le 23/10/12 21:18, Lars Gullik Bjønnes a écrit :
| Concerning auto, I am still not sure that I like it.
Liking it took me some 5 seconds.
Auto suddenly makes it nice to work with the complex types you get in
C++.
Imagine:
auto func = [](){};
func();
try to figure out what type func really is
Le 23/10/12 21:21, Lars Gullik Bjønnes a écrit :
| FWIW, we already define lyx::assert, lyx::shared_ptr, lyx::bind.
To note: the lyx::shared_ptr is there _because_ of the "using namespace
std", and the pollution that drags in on some compilers.
I know :)
JMarc
On Tue, Oct 23, 2012 at 02:27:14PM +0200, Lars Gullik Bjønnes wrote:
> lar...@gullik.org (Lars Gullik Bjønnes) writes:
>
> | Jean-Marc Lasgouttes writes:
> >
> | | Le 23/10/12 01:21, Lars Gullik Bjønnes a écrit :
> >>> Anyhow... I am going to ditch the hole series. Pick what you want from
> >>> i
Abdelrazak Younes writes:
| On Tue, Oct 23, 2012 at 2:27 PM, Lars Gullik Bjønnes
wrote:
>> C++11 would make the code look a lot nicer, esp. thru the use of range
>> based for, and auto:
>>
>> std::vector::iterator at = somevec.begin();
>> std::vector::iterator end = someved.end();
>>
Jean-Marc Lasgouttes writes:
| Le 23/10/2012 15:41, Abdelrazak Younes a écrit :
>> I really don't understand the rationale, sorry. I'd consider very bad
>> style to create our own lyx::vector or lyx::iostream, so what's the
>> point?
>
| FWIW, we already define lyx::assert, lyx::shared_ptr, lyx::
Jean-Marc Lasgouttes writes:
| Le 23/10/2012 14:27, Lars Gullik Bjønnes a écrit :
>> C++11 would make the code look a lot nicer, esp. thru the use of range
>> based for, and auto:
>>
>> std::vector::iterator at = somevec.begin();
>> std::vector::iterator end = someved.end();
>> for
Le 23/10/2012 15:41, Abdelrazak Younes a écrit :
I really don't understand the rationale, sorry. I'd consider very bad
style to create our own lyx::vector or lyx::iostream, so what's the
point?
FWIW, we already define lyx::assert, lyx::shared_ptr, lyx::bind.
I do not have a strong view on this
On Tue, Oct 23, 2012 at 2:27 PM, Lars Gullik Bjønnes wrote:
> C++11 would make the code look a lot nicer, esp. thru the use of range
> based for, and auto:
>
> std::vector::iterator at = somevec.begin();
> std::vector::iterator end = someved.end();
> for (; at != end; ++at) {
>
On Tue, Oct 23, 2012 at 3:12 PM, Jean-Marc Lasgouttes
wrote:
> Le 23/10/2012 14:27, Lars Gullik Bjønnes a écrit :
>
>> | What I think you should do is to remove the "using namespace std", and
>> | add std:: wherever needed except for on string, as that really is all
>> | over, and use "using std::
Le 23/10/2012 14:27, Lars Gullik Bjønnes a écrit :
| What I think you should do is to remove the "using namespace std", and
| add std:: wherever needed except for on string, as that really is all
| over, and use "using std::string" for that.
A patch that does exactly that is attached.
I would
Le 23/10/2012 14:27, Lars Gullik Bjønnes a écrit :
C++11 would make the code look a lot nicer, esp. thru the use of range
based for, and auto:
std::vector::iterator at = somevec.begin();
std::vector::iterator end = someved.end();
for (; at != end; ++at) {
...
}
woul
Jean-Marc Lasgouttes writes:
| Le 23/10/12 01:21, Lars Gullik Bjønnes a écrit :
>> Anyhow... I am going to ditch the hole series. Pick what you want from
>> it if anything.
>>
>> I just cannot stand the hostility.
>
| Come on. André is bored and he feel happy to be rude like in the good
| old day
Le 23/10/12 01:21, Lars Gullik Bjønnes a écrit :
Anyhow... I am going to ditch the hole series. Pick what you want from
it if anything.
I just cannot stand the hostility.
Come on. André is bored and he feel happy to be rude like in the good
old days. Nothing really personnal :)
Apart from t
Richard Heck writes:
| On 10/21/2012 03:11 PM, Lars Gullik Bjønnes wrote:
>> Using std::make_shared (and in our case for the time being
>> boost::make_shared)
>> is the preferred way of creating a std::shared_ptr.
>>
| Can we get some kind if mini-tutorial here, then, on how to use this
| routin
Richard Heck writes:
| On 10/21/2012 03:11 PM, Lars Gullik Bjønnes wrote:
>> Using std::make_shared (and in our case for the time being
>> boost::make_shared)
>> is the preferred way of creating a std::shared_ptr.
>>
| Can we get some kind if mini-tutorial here, then, on how to use this
| routin
On 10/21/2012 03:11 PM, Lars Gullik Bjønnes wrote:
Using std::make_shared (and in our case for the time being boost::make_shared)
is the preferred way of creating a std::shared_ptr.
Can we get some kind if mini-tutorial here, then, on how to use this
routine? I see several different ways it's p
Using std::make_shared (and in our case for the time being boost::make_shared)
is the preferred way of creating a std::shared_ptr. This is mainly due
to two aspects:
- half the number of allocations required
- potential of using less space, and better locality
Also a failed creation of t
18 matches
Mail list logo