Download presentation
Presentation is loading. Please wait.
Published byGriffin Roland Pope Modified over 9 years ago
5
Approval Detailed Specification Design Investigation
7
Milestone In April 2013, for the first time C++14’s feature set is known: C++14 is feature-complete! Now in primary international comment ballot
8
2014 cadence This ISO C++ revision cycle: faster, more predictable Less monolithic: Delivering concurrent and decoupled library & language extensions
11
YesYes — SxS Yes (but no breaking changes in Updates) Maybe YesNo YesMaybe YesNo
12
YesYes — SxS Yes (but no breaking changes in Updates) Maybe YesNo YesMaybe YesNo VS 2013 Preview today VS 2013 RTM later this year CTP following VS 2013 RTM
13
from Nov 2012
16
C++14 libs: cbegin/ greater<>/make_unique
18
class widget { int a = 42; string b = “xyzzy”; vector c = { 1, 2, 3, 4 }; public: widget() { } // 42xyzzy1 2 3 4 explicit widget(int val) : a{val} { }// valxyzzy1 2 3 4 widget(int i, int j) : c{i, i, i, i, j, j} { }// 42xyzzyi i i i j j };
22
C++14 libs: cbegin/ greater<>/make_unique
27
C99 variable decls C99 _Bool C99 compound literals C++14 libs: cbegin/ greater<>/make_unique C99 designated initializers
36
C++14 generalized lambda capture C99 variable decls C99 _Bool C++14 auto function return type deduction C99 compound literals C++14 generic lambdas C++14 libs: cbegin/ greater<>/make_unique C99 designated initializers
37
C++14 generalized lambda capture C99 variable decls C99 _Bool C++14 auto function return type deduction C99 compound literals C++14 generic lambdas C++14 decltype(auto) C++14 libs: cbegin/ greater<>/make_unique C99 designated initializers C++14 libs: std:: user- defined literals
39
C++14 generalized lambda capture C99 variable decls C99 _Bool C++14 auto function return type deduction C99 compound literals C++14 generic lambdas C++14 decltype(auto) C++14 libs: cbegin/ greater<>/make_unique C99 designated initializers C++14 libs: std:: user- defined literals
40
C++14 generalized lambda capture C++98 two-phase lookup C99 variable decls C99 _Bool C++14 auto function return type deduction C99 compound literals C++14 generic lambdas C++14 decltype(auto) C++14 libs: cbegin/ greater<>/make_unique C99 designated initializers C++14 libs: std:: user- defined literals
41
C++14 generalized lambda capture C++98 two-phase lookup C99 variable decls C99 _Bool C++14 auto function return type deduction C++14 generalized constexpr C99 compound literals C++14 generic lambdas C++14 decltype(auto) C++14 dyn. arrays C++14 var templates C++14 libs: cbegin/ greater<>/make_unique C99 designated initializers C++14 libs: std:: user- defined literals
43
C++14 generalized lambda capture C++98 two-phase lookup C99 variable decls C99 _Bool C++14 auto function return type deduction C++14 generalized constexpr C99 compound literals C++14 generic lambdas C++14 decltype(auto) C++14 dyn. arrays C++14 var templates C++14 libs: cbegin/ greater<>/make_unique C99 designated initializers C++14 libs: std:: user- defined literals C++TS concepts lite
45
from Nov 2012
46
C++14 generalized lambda capture C++98 two-phase lookup C99 variable decls C99 _Bool C++14 auto function return type deduction C++14 generalized constexpr C99 compound literals C++14 generic lambdas C++14 decltype(auto) C++14 dyn. arrays C++14 var templates C++14 libs: cbegin/ greater<>/make_unique C99 designated initializers C++TS? async/await C++14 libs: std:: user- defined literals C++TS concepts lite
48
.get.then size_t file_sizes( string file1, string file2 ) { task f1 = open(file1), f2 = open(file2); return f1.get().size() + f2.get().size(); } task file_sizes( string file1, string file2 ) { task f1 = open(file1), f2 = open(file2); return when_all(f1,f2).then([=](tuple fs) { return get (fs).size() + get (fs).size(); }); }.then + await task file_sizes( string file1, string file2 ) __async { task f1 = open(file1), f2 = open(file2); return (__await f1).size() + (__await f2).size(); }
49
.get.then string read( string file, string suffix ) { istream fi = open(file).get(); string ret, chunk; while( (chunk = fi.read().get()).size() ) ret += chunk + suffix; return ret; } ?
50
.get.then string read( string file, string suffix ) { istream fi = open(file).get(); string ret, chunk; while( (chunk = fi.read().get()).size() ) ret += chunk + suffix; return ret; } task read( string file, string suffix ) { return open(file).then([=](istream fi) { auto ret = make_shared (); auto next = make_shared ()>>( [=]{ fi.read().then([=](string chunk) { if( chunk.size() ) { *ret += chunk + suffix; return (*next)(); } return *ret; }); return (*next)(); }); }.then + await task read( string file, string suffix ) __async { istream fi = __await open(file); string ret, chunk; while( (chunk = __await fi.read()).size() ) ret += chunk + suffix; return ret; }
51
.get.then { DataReader rdr(stream); auto bytesRead = rdr.LoadAsync((int)stream->Size).get(); txtBox->Text = rdr.ReadString(bytesRead); } // Re-open file here. auto rdr = ref new DataReader(stream); task (rdr->LoadAsync((int)stream->Size)).then([=](uint32 bytesRead) { txtBox->Text = rdr->ReadString(bytesRead); delete rdr; // Re-open file here });.then + await { DataReader rdr(stream); auto bytesRead = __await rdr.LoadAsync((int)stream->Size); txtBox->Text = rdr.ReadString(bytesRead); } // Re-open file here.
52
C++14 generalized lambda capture C++98 two-phase lookup C99 variable decls C99 _Bool C++14 auto function return type deduction C++14 generalized constexpr C99 compound literals C++14 generic lambdas C++14 decltype(auto) C++14 dyn. arrays C++14 var templates C++14 libs: cbegin/ greater<>/make_unique C99 designated initializers C++TS? async/await C++14 libs: std:: user- defined literals C++TS concepts lite
55
Registration open today http://is.gd/goingnative Registration open today http://is.gd/goingnative
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.