SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

C the basic concepts
C the basic conceptsC the basic concepts
C the basic concepts
Abhinav Vatsa
 

Tendances (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
 

En vedette (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
 

Similaire à Glimpses of C++0x

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
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
Alpana 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 REDDY
Rajeshkumar Reddy
 

Similaire à 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
 

Plus de ppd1961

Reconfigurable Computing
Reconfigurable ComputingReconfigurable Computing
Reconfigurable Computing
ppd1961
 

Plus de 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
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Glimpses of C++0x

Notes de l'éditeur

  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