SlideShare ist ein Scribd-Unternehmen logo
1 von 101
December, 2009 Glimpses of C++0x Dr. Partha Pratim Das Interra Systems (India) Pvt. Ltd.   Language Features
Agenda ,[object Object],[object Object]
What is C++0x? Basics
What is C++0x? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Who decides on C++0x? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What are the aims of C++0x? ,[object Object],[object Object],[object Object],[object Object],[object Object]
What are the aims of C++0x? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What are the design goals of C++0x? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What are the design goals of C++0x? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
C++0x: Language Features ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
C++0x: Language Features ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
C++0x: Standard Library ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
C++0x: Compiler Support ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Select Language Features
__cplusplus
__cplusplus ,[object Object],[object Object],#define __cplusplus 199711L
long long – a longer integer (C99)
long long: a longer integer ,[object Object],[object Object],[object Object],[object Object],long long x = 9223372036854775807LL;
Right angle brackets
right angle brackets ,[object Object],[object Object],[object Object],list<vector<string>> lvs;
static_assert
static_assert:  static (compile-time) assertions ,[object Object],[object Object],static_assert(expression,string); static_assert(sizeof(long) >= 8,  &quot;64-bit support required for this library.&quot;);  struct S { X m1; Y m2; };  static_assert(sizeof(S)==sizeof(X)+sizeof(Y), &quot;unexpected padding in S&quot;);
static_assert:  static (compile-time) assertions ,[object Object],[object Object],int f(int* p, int n)  {  static_assert(p==0,&quot;p is not null&quot;);  // error: static_assert() expression  // not a constant expression  // ...  }
auto – Type Inference
auto – Type Inference ,[object Object],[object Object],[object Object],[object Object],auto  x = 3.14; // x has type double
auto: Examples int  foo(); auto  x1 = foo();  // x1 : int const auto & x2 = foo();  // x2 : const int& auto & x3 = foo();  // x3 : int&:  // error, cannot bind a  // reference to a temporary float & bar(); auto  y1 = bar();  // y1 : float const auto & y2 = bar();  // y2 : const float& auto & y3 = bar();  // y3 : float& A* fii() auto * z1 = fii();  // z1 : A* auto  z2 = fii();  // z2 : A* auto * z3 = bar();  // error, bar does not  // return a pointer type
auto – Use ,[object Object],[object Object],[object Object],[object Object]
auto: Use ,[object Object],[object Object],template<class T>  void printall(const vector<T>& v) {  for (auto p = v.begin(); p!=v.end(); ++p)  cout << *p << &quot;&quot;;  }   template<class T>  void printall(const vector<T>& v) {  for (typename vector<T>::const_iterator  p = v.begin(); p!=v.end(); ++p)  cout << *p << &quot;&quot;;  }
auto: Aliasing ,[object Object],[object Object],class  B { ...  virtual void  f(); } class  D :  public  B { ...  void  f(); } B* d =  new  D(); ... auto  b = *d; // is this casting a reference to a base  // or slicing an object? b.f();  // is polymorphic behavior preserved?
auto: Value & Reference Semantics ,[object Object],[object Object],A foo(); A& bar(); ... A x1 = foo();  // x1 : A auto  x1 = foo();  // x1 : A A& x2 = foo();  // error, we cannot bind a non−lvalue  // to a non−const reference auto & x2 = foo();  // error A y1 = bar();  // y1 : A auto  y1 = bar();  // y1 : A A& y2 = bar();  // y2 : A& auto & y2 = bar();  // y2 : A&
auto: Return Type of Function ,[object Object],auto add(auto x, auto y) { return x + y; } auto  ret  = x + y;
auto: Multi-Variable Declarations ,[object Object],[object Object],[object Object],int  i; auto  a = 1, *b = &i; auto  x = 1, *y = &x;
auto: Direct Initialization ,[object Object],auto  x = 1; // x : int auto  x(1); // x : int const auto & y(x)     const auto & y = x; new auto (1); // int* auto * x =  new auto (1); // int*
decltype
decltype: the type of an expression ,[object Object],int i; const int&& foo(); struct A { double x; } const A* a = new A(); decltype(i);  // type is int decltype(foo());  // type is const int&& decltype(a->x);  // type is double
decltype ,[object Object],[object Object],[object Object],[object Object],[object Object]
decltype: Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],#include <functional> template<class T, class U> auto mul(T x, U y) -> decltype( x*y )  {  return x*y; }
decltype: Semantics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Suffix Return Type Syntax
Suffix Return Type Syntax ,[object Object],[object Object],[object Object],[object Object],template <class T, class U>  decltype( (*(T*)0) + (*(U*)0) ) add(T t, U u); template <class T, class U>  decltype( t+u ) add(T t, U u); template <class T, class U>  auto add(T t, U u)  − > decltype(t + u) ; auto add(auto x, auto y) { return x + y; } // short-cut
Defaulted or Deleted Functions
defaulted or deleted functions ,[object Object],[object Object],class X {  //  ...   private: X& operator=(const X&); //  No definition   X(const X&);  };   class X {  //  ...   X& operator=(const X&) = delete; //  No copying   X(const X&) = delete;  };
defaulted or deleted functions ,[object Object],[object Object],[object Object],class Y {  // ...  Y& operator=(const Y&) = default; // default  // copy semantics  Y(const Y&) = default;  }
defaulted or deleted functions ,[object Object],struct Z {  // ...  Z(long long);  // can initialize with  // an long long  Z(long) = delete; // but not anything less  };
enum class
enum: C++98 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
enum class: scoped & strongly typed enum ,[object Object],[object Object],[object Object],// traditional enum   enum Alert { green, yellow, election, red };  // scoped and strongly typed enum   // no export of enumerator names to enclosing scope  // no implicit conversion to int  enum class Color { red, blue };  enum class TrafficLight { red, yellow, green };
enum class: Scoped Examples ,[object Object],Alert a = 7; // error (as ever in C++)  Color c = 7; // error: no int->Color conversion  int a2 = red;  // ok: Alert->int conversion  int a3 = Alert::red;  // error in C++98;  // ok in C++0x  int a4 = blue;  // error: blue not in scope  int a5 = Color::blue;  // error: not Color->int  // conversion Color a6 = Color::blue;  // ok
enum class: Underlying Type ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
enum class: Underlying Type ,[object Object],// compact representation   enum class Color : char { red, blue };  // by default, the underlying type is int  enum class TrafficLight { red, yellow, green };  // how big is an E? (&quot;implementation defined&quot;)  enum E { E1 = 1, E2 = 2, Ebig = 0xFFFFFFF0U }; // now we can be specific   enum EE : unsigned long {  EE1 = 1, EE2 = 2, EEbig = 0xFFFFFFF0U };
enum class: Forward Declaration //  (forward) declaration   enum class Color_code : char;  //  use of forward declaration   void foobar(Color_code* p);  //  ...   //  definition   enum class Color_code : char  { red, yellow, green, blue };
enum class: Use in Standard Library ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Constant Expression
constexpr: generalized and guaranteed constant expression ,[object Object],[object Object],[object Object],[object Object]
constexpr ,[object Object],[object Object],enum Flags { good=0, fail=1, bad=2, eof=4 }; constexpr  int operator|(Flags f1, Flags f2) {  return Flags(int(f1)|int(f2)); }  void f(Flags x) {  switch (x) {  case bad:  /* ... */ break;  case eof:  /* ... */ break;  case  bad|eof : /* ... */ break;  default:  /* ... */ break;  }  }
constexpr ,[object Object],[object Object],[object Object],constexpr int x1 = bad|eof; // ok  void f(Flags f3) {  constexpr int x2  = bad|f3;  // error:  // can't evaluate  // at compile time  int x3 = bad|f3;  // ok  }
constexpr ,[object Object],[object Object],struct Point { int x,y;  constexpr Point(int xx, int yy):  x(xx), y(yy) { }  };  constexpr Point origo(0,0);  constexpr int z = origo.x;  constexpr Point a[] =  {Point(0,0), Point(1,1), Point(2,2)};  constexpr x = a[1].x; // x becomes 1
Initializer List
Initializer List ,[object Object],vector<double> v = { 1, 2, 3.456, 99.99 };  list<pair<string,string>> languages = {  {&quot;Nygaard&quot;, &quot;Simula&quot;},  {&quot;Richards&quot;, &quot;BCPL&quot;},  {&quot;Ritchie&quot;, &quot;C&quot;} };  map<vector<string>,vector<int>> years = {  {  {&quot;Maurice&quot;, &quot;Vincent&quot;, &quot;Wilkes&quot;}, {1913, 1945, 1951, 1967, 2000} },  {  {&quot;Martin&quot;, &quot;Richards&quot;},  {1982, 2003, 2007} },  {  {&quot;David&quot;, &quot;John&quot;, &quot;Wheeler&quot;},  {1927, 1947, 1951, 2004} } };
Initializer List ,[object Object],void f(initializer_list<int>);  f({1,2});  f({23,345,4567,56789});  f({});  // the empty list  f{1,2};  // error: function call ( ) missing  years.insert({ {&quot;Bjarne&quot;,&quot;Stroustrup&quot;}, {1950, 1975, 1985}});
Initializer List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Initializer List ,[object Object],vector<double> v1(7);  // ok: v1 has 7 elements  v1 = 9;  // error: no int    vector  vector<double> v2 = 9;  // error: no int    vector  void f(const vector<double>&);  f(9);  // error: no int    vector  vector<double> v1{7};  // ok: v1 has 1 element (7)  v1 = {9};  // ok: v1 now has 1 element (9)  vector<double> v2 = {9};  // ok: v2 has 1 element (9)  f({9});  // ok: f is called with { 9 }
Initializer List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Initializer List ,[object Object],[object Object],[object Object],[object Object],void f(initializer_list<int> args) {  for (auto p=args.begin(); p!=args.end(); ++p)  cout << *p << &quot;&quot;;  }
In–Class Member Initialization
In-class Member Initializations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
In-class Member Initializations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
In-class Member Initializations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
In-class Member Initializations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Uniform Initialization
Uniform Initialization Syntax & Semantics ,[object Object],string a[] = {&quot;foo&quot;, &quot;bar&quot;};  // ok: initialize array vector<string> v = {&quot;foo&quot;, &quot;bar&quot;};  // error: initializer list  // for non-aggregate vector  void f(string a[]);  f( { &quot;foo&quot;, &quot; bar&quot; } ); // syntax error: block as argument  int a = 2;  // &quot;assignment style&quot;  int[] aa = { 2, 3 };  // assignment style with list  complex z(1,2);  // &quot;functional style&quot; initialization  x = Ptr(y);  // &quot;functional style&quot; for  // conversion/cast/construction  int a(1);  // variable definition  int b();  // function declaration  int b(foo);  // variable definition or  // function declaration
Uniform Initialization Syntax & Semantics ,[object Object],X x1 = X{1,2};  X x2 = {1,2}; // the = is optional  X x3{1,2};  X* p = new X{1,2};  struct D : X {  D(int x, int y) :X{x,y} { /* ... */ };  };  struct S {  int a[3];  S(int x, int y, int z) :a{x,y,z}  { /* ... */ };  // solution to old problem  };
Uniform Initialization Syntax & Semantics ,[object Object],X x{a};  X* p = new X{a};  z = X{a};  // use as cast  f({a});  // function argument (of type X)  return {a};  // function return value  // (function returning X)
Prevent Narrowing
Preventing Narrowing ,[object Object],[object Object],int x = 7.3; // Ouch!  void f(int);  f(7.3);  // Ouch!   int x1 = {7.3};  // error: narrowing   double d = 7;  int x2{d};  // error: narrowing (double to int)  // ok: even though 7 is an int, this is not narrowing  char x3{7};  // error: double to int narrowing vector<int> vi = { 1, 2.3, 4, 5.6 };
for Range
Range for statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Range for statement: Examples ,[object Object],void f(const vector<double>& v) {  for ( auto x : v ) cout << x << '';  for ( auto& x : v ) ++x; // use a reference to  // change the value   }   for ( const auto x : { 1,2,3,5,8,13,21,34 } )  cout << x << '';
Delegating Constructor
Delegating Constructors ,[object Object],class X {  int a;  validate(int x)  {  if (0<x && x<=max) a=x;  else throw bad_X(x); }  public:  X(int x) { validate(x); }  X() { validate(42); }  X(string s) {  int x = lexical_cast<int>(s);  validate(x); }  // ...  };
Delegating Constructors ,[object Object],class X {  int a;  public:  X(int x) {  if (0<x && x<=max) a=x;  else throw bad_X(x); }  X() : X{42}  { }  X(string s) : X{lexical_cast<int>(s)}  { }  // ...  };
Inherited Constructor
Inherited Constructors ,[object Object],[object Object],struct B { void f(double); };  struct D : B { void f(int); };  B b; b.f(4.5); // fine  D d; d.f(4.5);  // calls D::f(int) with argument 4!   struct B { void f(double); };  struct D : B {  using B::f;   // bring all f()s from B into scope  void f(int);  // add a new f()  };  B b; b.f(4.5);  // fine  D d; d.f(4.5);  // fine: calls D::f(double)  // which is B::f(double)
Inherited Constructors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Inherited Constructors: Initialization Slip ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
nullptr
nullptr: A null pointer literal ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
nullptr: Example char* p = nullptr;  int* q = nullptr;  char* p2 = 0;  // 0 still works and p==p2  void f(int);  void f(char*);  f(0);  // call f(int)  f(nullptr);  // call f(char*)  void g(int);  g(nullptr);  // error: nullptr is not an int  int i = nullptr;  // error nullptr is not an int   if(n2 == 0);  // evaluates to true  if(n2 == nullptr);  // error  if(nullptr);  // error, no conversion to bool  if(nullptr == 0);  // error
Rvalue references
Rvalue references ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rvalue reference ,[object Object],[object Object],[object Object],void incr( int& a ) { ++a; }  int i = 0;  incr(i); // i becomes 1  incr(0); // error: 0 in not an lvalue
Rvalue reference ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rvalue reference: move semantics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Copy vs Move Semantics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rvalue reference: move semantics ,[object Object],[object Object],X a;  X f();  X& r1 = a;  // bind r1 to a (an lvalue)  X& r2 = f();  // error: f() is an rvalue;  // can't bind  X&& rr1 = f();  // fine: bind rr1 to temporary  X&& rr2 = a;  // error: bind a is an lvalue
Rvalue reference: move semantics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rvalue reference: move semantics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Standard Library
References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Credit  ,[object Object],[object Object]
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to C++
Introduction to C++ Introduction to C++
Introduction to C++ Bharat Kalia
 
Complete C++ programming Language Course
Complete C++ programming Language CourseComplete C++ programming Language Course
Complete C++ programming Language CourseVivek chan
 
Learning c - An extensive guide to learn the C Language
Learning c - An extensive guide to learn the C LanguageLearning c - An extensive guide to learn the C Language
Learning c - An extensive guide to learn the C LanguageAbhishek Dwivedi
 
OpenGurukul : Language : C Programming
OpenGurukul : Language : C ProgrammingOpenGurukul : Language : C Programming
OpenGurukul : Language : C ProgrammingOpen Gurukul
 
C Language (All Concept)
C Language (All Concept)C Language (All Concept)
C Language (All Concept)sachindane
 
Advanced C Language for Engineering
Advanced C Language for EngineeringAdvanced C Language for Engineering
Advanced C Language for EngineeringVincenzo De Florio
 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 FocJAYA
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language Mohamed Loey
 
C the basic concepts
C the basic conceptsC the basic concepts
C the basic conceptsAbhinav Vatsa
 
Report on c and c++
Report on c and c++Report on c and c++
Report on c and c++oggyrao
 
VTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CVTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CSyed Mustafa
 
basics of C and c++ by eteaching
basics of C and c++ by eteachingbasics of C and c++ by eteaching
basics of C and c++ by eteachingeteaching
 

Was ist angesagt? (20)

C++ Training
C++ TrainingC++ Training
C++ Training
 
Introduction to C++
Introduction to C++ Introduction to C++
Introduction to C++
 
Complete C++ programming Language Course
Complete C++ programming Language CourseComplete C++ programming Language Course
Complete C++ programming Language Course
 
Learning c - An extensive guide to learn the C Language
Learning c - An extensive guide to learn the C LanguageLearning c - An extensive guide to learn the C Language
Learning c - An extensive guide to learn the C Language
 
Intro to C++ - language
Intro to C++ - languageIntro to C++ - language
Intro to C++ - language
 
OpenGurukul : Language : C Programming
OpenGurukul : Language : C ProgrammingOpenGurukul : Language : C Programming
OpenGurukul : Language : C Programming
 
C programming
C programmingC programming
C programming
 
C Language (All Concept)
C Language (All Concept)C Language (All Concept)
C Language (All Concept)
 
Advanced C Language for Engineering
Advanced C Language for EngineeringAdvanced C Language for Engineering
Advanced C Language for Engineering
 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 Foc
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
 
C the basic concepts
C the basic conceptsC the basic concepts
C the basic concepts
 
Report on c and c++
Report on c and c++Report on c and c++
Report on c and c++
 
Deep C
Deep CDeep C
Deep C
 
C vs c++
C vs c++C vs c++
C vs c++
 
Oop l2
Oop l2Oop l2
Oop l2
 
Intro to c++
Intro to c++Intro to c++
Intro to c++
 
VTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CVTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in C
 
C Programming
C ProgrammingC Programming
C Programming
 
basics of C and c++ by eteaching
basics of C and c++ by eteachingbasics of C and c++ by eteaching
basics of C and c++ by eteaching
 

Andere mochten auch

Unified Modeling Language (UML)
Unified Modeling Language (UML)Unified Modeling Language (UML)
Unified Modeling Language (UML)ppd1961
 
Quality - A Priority In Service Engagements
Quality - A Priority In Service EngagementsQuality - A Priority In Service Engagements
Quality - A Priority In Service Engagementsppd1961
 
How To Define An Integer Constant In C
How To Define An Integer Constant In CHow To Define An Integer Constant In C
How To Define An Integer Constant In Cppd1961
 
NDL @ YOJANA
NDL @ YOJANANDL @ YOJANA
NDL @ YOJANAppd1961
 
Science & Culture Article with Editorial & Cover
Science & Culture Article with Editorial & CoverScience & Culture Article with Editorial & Cover
Science & Culture Article with Editorial & Coverppd1961
 
Research Roadmap For Cse, Iit Kgp Next 5 Years
Research Roadmap For Cse, Iit Kgp   Next 5 YearsResearch Roadmap For Cse, Iit Kgp   Next 5 Years
Research Roadmap For Cse, Iit Kgp Next 5 Yearsppd1961
 
Digital geometry - An introduction
Digital geometry  - An introductionDigital geometry  - An introduction
Digital geometry - An introductionppd1961
 
Vlsi Education In India
Vlsi Education In IndiaVlsi Education In India
Vlsi Education In Indiappd1961
 

Andere mochten auch (8)

Unified Modeling Language (UML)
Unified Modeling Language (UML)Unified Modeling Language (UML)
Unified Modeling Language (UML)
 
Quality - A Priority In Service Engagements
Quality - A Priority In Service EngagementsQuality - A Priority In Service Engagements
Quality - A Priority In Service Engagements
 
How To Define An Integer Constant In C
How To Define An Integer Constant In CHow To Define An Integer Constant In C
How To Define An Integer Constant In C
 
NDL @ YOJANA
NDL @ YOJANANDL @ YOJANA
NDL @ YOJANA
 
Science & Culture Article with Editorial & Cover
Science & Culture Article with Editorial & CoverScience & Culture Article with Editorial & Cover
Science & Culture Article with Editorial & Cover
 
Research Roadmap For Cse, Iit Kgp Next 5 Years
Research Roadmap For Cse, Iit Kgp   Next 5 YearsResearch Roadmap For Cse, Iit Kgp   Next 5 Years
Research Roadmap For Cse, Iit Kgp Next 5 Years
 
Digital geometry - An introduction
Digital geometry  - An introductionDigital geometry  - An introduction
Digital geometry - An introduction
 
Vlsi Education In India
Vlsi Education In IndiaVlsi Education In India
Vlsi Education In India
 

Ähnlich wie Glimpses of C++0x

C_Programming_Language_tutorial__Autosaved_.pptx
C_Programming_Language_tutorial__Autosaved_.pptxC_Programming_Language_tutorial__Autosaved_.pptx
C_Programming_Language_tutorial__Autosaved_.pptxLikhil181
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...ANUSUYA S
 
C prog ppt
C prog pptC prog ppt
C prog pptxinoe
 
Programming in C - interview questions.pdf
Programming in C - interview questions.pdfProgramming in C - interview questions.pdf
Programming in C - interview questions.pdfSergiuMatei7
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++K Durga Prasad
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance levelsajjad ali khan
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C ProgrammingMOHAMAD NOH AHMAD
 
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Chris Adamson
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingAlpana Gupta
 
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDYC LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDYRajeshkumar Reddy
 
How to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeHow to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeMicrosoft Tech Community
 

Ähnlich wie Glimpses of C++0x (20)

C_Programming_Language_tutorial__Autosaved_.pptx
C_Programming_Language_tutorial__Autosaved_.pptxC_Programming_Language_tutorial__Autosaved_.pptx
C_Programming_Language_tutorial__Autosaved_.pptx
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
 
C prog ppt
C prog pptC prog ppt
C prog ppt
 
Programming in C - interview questions.pdf
Programming in C - interview questions.pdfProgramming in C - interview questions.pdf
Programming in C - interview questions.pdf
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance level
 
Basic c
Basic cBasic c
Basic c
 
AS TASKS #8
AS TASKS #8AS TASKS #8
AS TASKS #8
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
 
C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
c.ppt
c.pptc.ppt
c.ppt
 
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDYC LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
 
#Code2 create c++ for beginners
#Code2 create  c++ for beginners #Code2 create  c++ for beginners
#Code2 create c++ for beginners
 
C tutorials
C tutorialsC tutorials
C tutorials
 
CProgrammingTutorial
CProgrammingTutorialCProgrammingTutorial
CProgrammingTutorial
 
C language tutorial
C language tutorialC language tutorial
C language tutorial
 
How to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ CodeHow to Adopt Modern C++17 into Your C++ Code
How to Adopt Modern C++17 into Your C++ Code
 

Mehr von ppd1961

Land of Pyramids, Petra, and Prayers - Egypt, Jordan, and Israel Tour
Land of Pyramids, Petra, and Prayers - Egypt, Jordan, and Israel TourLand of Pyramids, Petra, and Prayers - Egypt, Jordan, and Israel Tour
Land of Pyramids, Petra, and Prayers - Egypt, Jordan, and Israel Tourppd1961
 
Innovation in technology
Innovation in technologyInnovation in technology
Innovation in technologyppd1961
 
Kinectic vision looking deep into depth
Kinectic vision   looking deep into depthKinectic vision   looking deep into depth
Kinectic vision looking deep into depthppd1961
 
Function Call Optimization
Function Call OptimizationFunction Call Optimization
Function Call Optimizationppd1961
 
Stl Containers
Stl ContainersStl Containers
Stl Containersppd1961
 
Object Lifetime In C C++
Object Lifetime In C C++Object Lifetime In C C++
Object Lifetime In C C++ppd1961
 
Technical Documentation By Techies
Technical Documentation By TechiesTechnical Documentation By Techies
Technical Documentation By Techiesppd1961
 
Reconfigurable Computing
Reconfigurable ComputingReconfigurable Computing
Reconfigurable Computingppd1961
 
Women In Engineering Panel Discussion
Women In Engineering   Panel DiscussionWomen In Engineering   Panel Discussion
Women In Engineering Panel Discussionppd1961
 
Handling Exceptions In C &amp; C++ [Part B] Ver 2
Handling Exceptions In C &amp; C++ [Part B] Ver 2Handling Exceptions In C &amp; C++ [Part B] Ver 2
Handling Exceptions In C &amp; C++ [Part B] Ver 2ppd1961
 
Handling Exceptions In C &amp; C++[Part A]
Handling Exceptions In C &amp; C++[Part A]Handling Exceptions In C &amp; C++[Part A]
Handling Exceptions In C &amp; C++[Part A]ppd1961
 
Dimensions of Offshore Technology Services
Dimensions of Offshore Technology ServicesDimensions of Offshore Technology Services
Dimensions of Offshore Technology Servicesppd1961
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languagesppd1961
 
Design Patterns
Design PatternsDesign Patterns
Design Patternsppd1961
 
Singleton Object Management
Singleton Object ManagementSingleton Object Management
Singleton Object Managementppd1961
 
Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++ppd1961
 
Digital Distance Geometry
Digital Distance GeometryDigital Distance Geometry
Digital Distance Geometryppd1961
 
Beware of Pointers
Beware of PointersBeware of Pointers
Beware of Pointersppd1961
 
Cyber Forensic - Policing the Digital Domain
Cyber Forensic - Policing the Digital DomainCyber Forensic - Policing the Digital Domain
Cyber Forensic - Policing the Digital Domainppd1961
 

Mehr von ppd1961 (20)

Land of Pyramids, Petra, and Prayers - Egypt, Jordan, and Israel Tour
Land of Pyramids, Petra, and Prayers - Egypt, Jordan, and Israel TourLand of Pyramids, Petra, and Prayers - Egypt, Jordan, and Israel Tour
Land of Pyramids, Petra, and Prayers - Egypt, Jordan, and Israel Tour
 
Innovation in technology
Innovation in technologyInnovation in technology
Innovation in technology
 
Kinectic vision looking deep into depth
Kinectic vision   looking deep into depthKinectic vision   looking deep into depth
Kinectic vision looking deep into depth
 
C++11
C++11C++11
C++11
 
Function Call Optimization
Function Call OptimizationFunction Call Optimization
Function Call Optimization
 
Stl Containers
Stl ContainersStl Containers
Stl Containers
 
Object Lifetime In C C++
Object Lifetime In C C++Object Lifetime In C C++
Object Lifetime In C C++
 
Technical Documentation By Techies
Technical Documentation By TechiesTechnical Documentation By Techies
Technical Documentation By Techies
 
Reconfigurable Computing
Reconfigurable ComputingReconfigurable Computing
Reconfigurable Computing
 
Women In Engineering Panel Discussion
Women In Engineering   Panel DiscussionWomen In Engineering   Panel Discussion
Women In Engineering Panel Discussion
 
Handling Exceptions In C &amp; C++ [Part B] Ver 2
Handling Exceptions In C &amp; C++ [Part B] Ver 2Handling Exceptions In C &amp; C++ [Part B] Ver 2
Handling Exceptions In C &amp; C++ [Part B] Ver 2
 
Handling Exceptions In C &amp; C++[Part A]
Handling Exceptions In C &amp; C++[Part A]Handling Exceptions In C &amp; C++[Part A]
Handling Exceptions In C &amp; C++[Part A]
 
Dimensions of Offshore Technology Services
Dimensions of Offshore Technology ServicesDimensions of Offshore Technology Services
Dimensions of Offshore Technology Services
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languages
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Singleton Object Management
Singleton Object ManagementSingleton Object Management
Singleton Object Management
 
Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++
 
Digital Distance Geometry
Digital Distance GeometryDigital Distance Geometry
Digital Distance Geometry
 
Beware of Pointers
Beware of PointersBeware of Pointers
Beware of Pointers
 
Cyber Forensic - Policing the Digital Domain
Cyber Forensic - Policing the Digital DomainCyber Forensic - Policing the Digital Domain
Cyber Forensic - Policing the Digital Domain
 

Kürzlich hochgeladen

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Kürzlich hochgeladen (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Glimpses of C++0x

Hinweis der Redaktion

  1. Maintain stability and compatibility don&apos;t break old code, and if you absolutely must, don&apos;t break it quietly. Prefer libraries to language extensions an ideal at which the committee wasn&apos;t all that successful; too many people in the committee and elsewhere prefer &amp;quot;real language features.&amp;quot; Prefer generality to specialization focus on improving the abstraction mechanisms (classes, templates, etc.). Support both experts and novices novices can be helped by better libraries and through more general rules; experts need general and efficient features. Increase type safety primarily though facilities that allow programmers to avoid type-unsafe features. Improve performance and ability to work directly with hardware make C++ even better for embedded systems programming and high-performance computation. Fit into the real world consider tool chains, implementation cost, transition problems, ABI issues, teaching and learning, etc.
  2. auto earlier was a storage class specifier for automatic variables.
  3. The expression ((T)0) is a hackish way to write an expression that has the type T and doesn’t require T to be default constructible.
  4. auto earlier was a storage class specifier for automatic variables.
  5. auto earlier was a storage class specifier for automatic variables.
  6. auto earlier was a storage class specifier for automatic variables.
  7. Src: [N1377] A Proposal to Add Move Semantics Support to the C++ Language.mht