Home » Community » U++ community news and announcements » C++11 library features finished
C++11 library features finished [message #45098] |
Mon, 31 August 2015 13:38  |
 |
mirek
Messages: 14256 Registered: November 2005
|
Ultimate Member |
|
|
I have finished adding C++11 features for the next release. Basically, there is support for C++11 initializers and also support for lambdas in Callbacks.
Lambdas have problem as all-catch templated constructor in std::function creates overloading issues. Previously, I was trying to solve it using LAMBDA macro, but it proved cumbersome. New approach allows direct us of lambda via operator<< (beacause we do not overload that one much for callbacks).
Demo in reference/Cpp11
#include "CtrlLib/CtrlLib.h"
using namespace Upp;
#define LAYOUTFILE <Cpp11/Cpp11.lay>
#include <CtrlCore/lay.h>
GUI_APP_MAIN
{
WithMyAppLayout<TopWindow> dlg;
CtrlLayout(dlg, "C++11 demo");
dlg.list.NoHeader().AddColumn();
Vector<int> x = { 1, 2, 12, 34, 15, 11 };
for(auto i : x)
dlg.list.Add(i);
dlg.add << [&] {
if(dlg.list.Find(~dlg.number) < 0)
dlg.list.Add(~dlg.number);
};
dlg.list.WhenSel << [&] {
dlg.number <<= dlg.list.GetKey();
};
dlg.Execute();
}
|
|
|
 |
|
C++11 library features finished
By: mirek on Mon, 31 August 2015 13:38
|
 |
|
Re: C++11 library features finished
|
 |
|
Re: C++11 library features finished
By: slashupp on Sun, 15 November 2015 17:16
|
 |
|
Re: C++11 library features finished
|
 |
|
Re: C++11 library features finished
By: Novo on Thu, 19 November 2015 04:41
|
 |
|
Re: C++11 library features finished
By: mirek on Thu, 19 November 2015 15:31
|
 |
|
Re: C++11 library features finished
By: Novo on Fri, 20 November 2015 02:50
|
 |
|
Re: C++11 library features finished
By: mirek on Thu, 19 November 2015 15:29
|
 |
|
Re: C++11 library features finished
|
 |
|
Re: C++11 library features finished
By: Alboni on Wed, 01 June 2016 03:22
|
 |
|
Re: C++11 library features finished
By: mirek on Wed, 01 June 2016 23:24
|
 |
|
Re: C++11 library features finished
By: Novo on Fri, 03 June 2016 19:27
|
 |
|
Re: C++11 library features finished
By: Novo on Fri, 03 June 2016 19:38
|
 |
|
Re: C++11 library features finished
By: Novo on Sat, 04 June 2016 05:36
|
 |
|
Re: C++11 library features finished
By: mirek on Thu, 09 June 2016 14:05
|
 |
|
Re: C++11 library features finished
By: Novo on Fri, 10 June 2016 05:09
|
 |
|
Re: C++11 library features finished
By: mirek on Sat, 11 June 2016 20:55
|
Goto Forum:
Current Time: Sun May 04 01:41:09 CEST 2025
Total time taken to generate the page: 0.00844 seconds
|