Philipp Aumayr
                                software architects gmbh



                           Web http://www.timecockpit.com
                           Mail philipp@timecockpit.com
Visual C++ 2012          Twitter @paumayr


Improvements over 2008
                                 Saves the day.
Intro
 DI   Philipp Aumayr
 Senior   Developer @ software architects (time cockpit)
 9-5   -> C#, 5->9 C++, 24/7 VS 2012
 Twitter:   @paumayr
 Blog:   http://www.timecockpit.com/devblog/
Motivation
 Visual   Studio 2012 improvements over 2008
 New Shell
 New Editor
 Better Intellisense
 Unit Testing
 Code Coverage
 Code Analysis
 #include completion
 Navigate To
 Type visualizers
Motivation
 C++11
 New standard released August 12, 2011
 Major overhaul
    Bjarne Stroustrup: „C++11 feels like a new language“
 Visual Studio 2012 has partial support
    Is updated out-of-band (November CTP adds major language parts)

 auto, decltype, range-based for loop
 lambdas, explicit overrides, static_assert
 nullptr, enum classes, move-semantics, variadic templates,
 initializer_lists, delegating constructors,
 explicit conversion operators
Motivation
   STL improvements
    shared_ptr, unique_ptr
    unordered_set, unordered_map
    SCARY iterators + container sizes

   Move Semantics

   std::async

   Code Analysis

   SDL
Motivation
   Auto-vectorization

   Auto-parallelization

   C++ AMP




     A lot to learn, but well worth the effort!
IDE Improvements
   Multi-monitor support
    Rewritten in WPF and MEF

   Improved responsiveness
    Intellisense works in the background
    Asynchronous project loading

   Editor Zooming
   Navigate-To
   Call Hierarchy
   Demo
IDE Improvements
   Preview tab
   Pinned editor windows
   Ctrl + Q / Search Menu
   New Solution explorer
    Scope to this
    multiple views

   Find within editor
   Find all references
   Demo
Test Framework
 Supports     writing unit tests for MSTest
 Test adapters for other test frameworks are available
 Gtest
 xUnit++

 Test   Explorer Window
 Grouping

 Code    Coverage
 Demo
Better Intellisense
 Uses   an SDF (SQL CE database) instead of the ncb
 Faster

 More   robust
 Demo
Type Visualizers (Natvis)
 Allow      customizable data representation in debugger
    Replaces autoexp.dat
    Easier to handle, more powerful

 Create       a natvis file
    Place in either
       %VSINSTALLDIR%Common7PackagesDebuggerVisualizers (requires admin access)
       %USERPROFILE%My DocumentsVisual Studio 2012Visualizers
       Or VS extension folders

   Files are reloaded at every debugging session
    No restart required when changing natvis files
Type Visualizers (Natvis)
 Example      natvis file




 Allows
 conditional strings, node expansions, item lists, tree items, synthetic items, etc.
Break
New Editor
Better Intellisense
Unit Testing
Code Coverage
Code Analysis
#include completion
Navigate To
Type visualizers
Break
 Questions?
C++ Styles (Question)
C   with a C++ compiler?
C   with classes / inheritance?
 RAII,   Exceptions, Smart pointer?
 STL?

 TMP?
auto
 Automatically       deduces type information
 Very similar to „var‟ in c#
 Reduces amount of typing required

 Reference      or Value?
 Value by default, add & to make it a reference

 Demo
decltype
 Represents       the type of the expression
 decltype(2*3) -> int
 decltype(a) -> type of a

 Why?
 Let types flow!

 Demo
Range based for loop
 New   type of for loop
 Iterates   all members of a collection
 Demo
Lambdas
 Anonymous        Functions
 Allows   logic to be placed where required
 Can   capture environment
 General    syntax:
 [capture](parameters)->return-type{body}

 represent    by type std::function<>
Lambdas
 Finally   make STL algorithms useable
 Reduces      amount of (boilerplate-)code
  No more functor classes!
Lambda Captures
 A Lambda        can capture environment
 Allows the lambda to access and modify state

 Capture      kinds
 -   reference or value
 -   automatic or specific

 Demo
override and final
   Explicitly defines overrides
    Compiler helps if no method to override is found

   Helps with refactoring
    Rename method in base class but not in derived -> derived method no longer overrides
    Base class from third party!

   Helps class design
    Implementers of derived classes can more easily understand which methods to override

   final can be used on classes to prevent being derived from

   Demo
override and final
static_assert
 Tests   a software assertion at compile time
 Especially     useful for portable code
 Assert size of specific structures (x86, x64 issues)

 Check    library versions
 Used    to be accomplished using the preprocessor
 Demo
nullptr
0   / NULL used to indicate a null pointer
 nullptr   is of type nullptr_t
 implicitly   assignable to any pointer
 not   assignable to int etc.
enum classes
 C++03    enums
 Not type safe
 Enums of different types can be compared (basically integers)
 Storage type int

 C++11    enum classes
 Type is compared as well!
 Underlying type can be chosen
enum classes
 C++03   enums
enum classes
 C++11   enum classes
Initializer lists (CTP)
Initializer lists (CTP)
 Eases   construction of non-POD types
 Finalversion will provide initialize list constructors for
  STL types
 Binds   {…} syntax to the std::initializer_list<T> type.
 Current   STL does not support it
 Demo                                  name == “class std::initializer_list<int>”
variadic templates (CTP)
 Flexible   number of template arguments
 Usable    for template writers
  n-ary structures (tuples)
  e.g. make_shared, make_tuple
  Example: saveprint

 Beware     of dragons ;)
 Demo
Move Semantics
 C++03:     many (temporary) class instances
 Resulted in a lot of copying
 Constructs to work around
 Passing complex data structure from function

 C++11:     Move semantics
 If the copied value is an rvalue reference, the move constructor is called
Move Semantics
 Dramatically   changes style!
C++03                             C++11
Move Semantics
 Note:   right-hand version is valid C++03 code!
  But advanced programmers avoided it, due to the extra copy involved.

 Now    with C++11: Elegant AND Fast
  Reconsider the patterns you are used to

 All   STL containers implement move semantics
  Returning container was unavoidable? -> automatic performance improvement!

 STL    code will have fewer temporary objects
 Demo
Break
 C++11
 auto, decltype, range-based for loop
 lambdas, explicit overrides, static_assert
 nullptr, variadic templates,
 initializer_lists, enum classes,
 move-semantics
std::async
 C++    11 has built-in support for asynchrony
 available through <future> header

 std::async<T>(std::function)                returns a future<T>
 -   Different launch policies (synchronous, asynchronous)
 -   can be waited on using wait() or get() to retrieve the result

 Implemented          in VC++ using PPL (parallel patterns
 library)
 -   Highly scalable and performant
std::async
 Not
    every asynchronous operation is a thread / cpu
 bound
 Notably IO requests
 User Input etc.

 std::future<T>       can be created from a std::promise<T>!
 std::promise<T>        acts as a provider for a future
 Marshalls result between threads of execution
 correct locking / etc.
 Provides set_value / set_exception
std::async
               T1              T2




                    (Blocks)




Demo
Parallel Patterns Library
 Based     on ConcRT
 Compatible       to Intel Thread Building Blocks (TBB)
 At least interface wise

 Template      Library for parallel programming
 Abstracts concurrent workflows into tasks
 Provides continuations (improvement over std::future<T>)

 Demo
Auto Vectorization
 Modern      CPUs support SIMD
 Single Instruction Multiple Data
 Extensions such as SSE and AVX
 Usually optimized for specifically using compiler intrinsics or inline assembler

                                 Serial                            Vector
                                   x = x1 + x2                  xyzw = xyzw1 + xyzw2


                                   y = y1 + y2


                                   z = z1 + z2


                                  w = w1 + w2
                            τ
Auto Vectorization
 VC++    2012 compiler has an auto-vectorizer (-Qvec)
 Tries to automatically vectorize loops and operators
 Enabled by default
 Diagnosis output using /Qvec-report:2

 Performance        difference?
 Depends.
 Max 4x for SSE (128bit), 8x for AVX (256bit),
 3x-4x typical

 Demo     (later with auto parallelization)
Auto-Parallelization
 To   utilize multiple cores, parallelization is used (MIMD)
 Multiple-Instructions-Multiple-Data

 VC++2012         has an auto-parallelizer
 Can be hinted
    #pragma loop(hint_parallel(N))
    #pragma loop(ivdep)
 Enabled using /Qpar
 Diagnosis using /Qpar-report:2

 Demo
C++ AMP
   Open specification created by Microsoft

   C++ for GPGPU
    Massively Parallel / Vector programming
    Based on top of DirectCompute (windows)
    Clang / LLVM implementation using OpenCL is available
       Provided by Intel (“Shevlin Park”)


   One new keyword
    Restricts the decorated function to a specific subset of c++

   Template library for wrapping data structures
    Datatransfer to/from GPU etc.
Why C++ AMP?
   Directly available from the compiler
    No additional SDK required
    Can reuse types (vector2f e.g.)

   Better debugging experience
    compared to CUDA / OpenCL!

   Makes C++ applicable to heterogeneous computing
    A processor may consist of multiple cores of different flavor
    More energy efficient (mobile!)
    visual computing
       image morphing
       Augmented reality etc.


   Demo
Smaller container sizes
   X86       release, sizes in bytes
Container                 VC9 SP1 / SCL = 0   VC10 (2010)   VC11 (2012)
                          (2008)
vector<int>               16                  16            12
deque<int>                32                  24            20
forward_list<int>         N/A                 8             4
queue<int>                32                  24            20
stack<int>                32                  24            20
unordered_map<int, int>   44                  44            32
string                    28                  28            24
wstring                   28                  28            24 ~14% less!
Smaller container sizes
   x64       release, sizes in bytes
Container                 VC9 SP1 / SCL = 0   VC10 (2010)   VC11 (2012)
                          (2008)
vector<int>               32                  32            24
deque<int>                64                  48            40
forward_list<int>         N/A                 16            8
queue<int>                64                  48            40
stack<int>                64                  48            40
unordered_map<int, int>   88                  88            64
string                    40                  40            32
wstring                   40                  40            32 ~20% less!
Code Analysis
   Static analysis

   Provides warnings at compile time

   Additionally to /GS and /SDL

   Detailed information on warning
Code Analysis
   What does it check ?
    Uninitialized Reads
    HRESULT verification checks
    Concurrency Warnings
    Format string checks
    Correct destructor calls (delete[] vs delete)
    Redundant code checks
    Many more: http://msdn.microsoft.com/en-us/library/a5b9aa09.aspx



   Custom code can be annotated to aid code analysis
    See http://msdn.microsoft.com/en-us/library/ms182032.aspx


   Demo
Break
 std::async

 ppl

 auto   vectorization
 auto   parallelization
 container   sizes
 code   analysis
Custom Snippets
 .snippet   is supported, same as C#
 XML file describing a code snippet
 Declare variables and use them in the snippet body

 Very   helpful for similar but not equivalent code
 Demo
Debug View
 Pin   watch to source code
 Add comments
 Not only variables, but (most) expressions




 View   values from last debug session
 Export   / Import Data Tips
 Makes it easier for debugging with multiple developers / on different machines

 Demo
Parallel Stacks Window
 New   view for debugging
 Better   understanding of multi thread applications
Parallel Tasks Window
 Lists   the task queues
Parallel Watch Window
 Watch     expressions in parallel
 Especially useful in tight loops
 Data races                           Expressions
 Can freeze / thaw threads
 Manually verify locking

 Demo
 Parallel Stacks
 Parallel Tasks
                            Threads
 Parallel Watch
Shortcuts
Shortcut              Action                    Shortcut

Strg + ,              Navigate To               Strg + Q      Search Menu

F12                   Go To Definition          Strg + K, C   Comment lines

Umschalt + F12        Find all references       Strg + K, U   Uncomment lines

Strg + -              Navigate Backwards        Strg + M, O   Collapse To definition

Strg + Umschalt + -   Navigate Forwards         Strg +M, X    Expand All Outlining

Strg + F              Find in current file      Strg +M, S    Collapse Current Region

Strg + H              Replace in current file   Strg + M, E   Expand Current Region
Break
   Custom snippets

   Debug view experience

   Parallel Stacks

   Parallel Tasks

   Parallel Watch Window

   code analysis

   Shortcuts
What‟s next?
 It‟s   a good century for C++ / native developers
  Single thread performance isn‟t getting much better
  memory latency / bandwidth is the bottleneck
  Efficiency is becoming more important (mobile!)

 There     is a huge commitment towards C++
  Google, Apple started a new compiler project a few years ago (Clang / LLVM)
  ISO standard is evolving more quickly
  C++ Standards Foundation (www.isocpp.org)
    Google, Apple, Intel, Microsoft, ARM, IBM, HP, etc.
Upcoming Standards
   Library in std:: for file system handling
    based on boost.filesystem v3
                                                We are here!
   Net TS
    Networking
    HTTP etc.

   TM TS
    Transactional Memory
Wrap-Up
 Tour   around the new IDE        New    Library Features
 Shell / Window handling           std::async
 Solution Explorer                 PPL
 Code Navigation                   Improved container sizes
 Better Intellisense
 Snippets, Debug Experience
 Parallel Watch, Threads, Tasks

                                   New    Compiler Features
 New    Language Features         Code Analysis
 auto, decltype, lambdas,
                                   /SDL /GS
 override, final
                                   Auto Vectorization
 static_assert, nullptr
                                   Auto parallelization
                                   C++ AMP
Philipp Aumayr
                                software architects gmbh




Q&A                        Mail philipp@timecockpit.com
                           Web http://www.timecockpit.com
                         Twitter @paumayr


Thank your for coming!
                                 Saves the day.

Whats New in Visual Studio 2012 for C++ Developers

  • 1.
    Philipp Aumayr software architects gmbh Web http://www.timecockpit.com Mail philipp@timecockpit.com Visual C++ 2012 Twitter @paumayr Improvements over 2008 Saves the day.
  • 2.
    Intro  DI Philipp Aumayr  Senior Developer @ software architects (time cockpit)  9-5 -> C#, 5->9 C++, 24/7 VS 2012  Twitter: @paumayr  Blog: http://www.timecockpit.com/devblog/
  • 3.
    Motivation  Visual Studio 2012 improvements over 2008 New Shell New Editor Better Intellisense Unit Testing Code Coverage Code Analysis #include completion Navigate To Type visualizers
  • 4.
    Motivation  C++11 Newstandard released August 12, 2011 Major overhaul Bjarne Stroustrup: „C++11 feels like a new language“ Visual Studio 2012 has partial support Is updated out-of-band (November CTP adds major language parts) auto, decltype, range-based for loop lambdas, explicit overrides, static_assert nullptr, enum classes, move-semantics, variadic templates, initializer_lists, delegating constructors, explicit conversion operators
  • 5.
    Motivation  STL improvements shared_ptr, unique_ptr unordered_set, unordered_map SCARY iterators + container sizes  Move Semantics  std::async  Code Analysis  SDL
  • 6.
    Motivation  Auto-vectorization  Auto-parallelization  C++ AMP A lot to learn, but well worth the effort!
  • 7.
    IDE Improvements  Multi-monitor support Rewritten in WPF and MEF  Improved responsiveness Intellisense works in the background Asynchronous project loading  Editor Zooming  Navigate-To  Call Hierarchy  Demo
  • 8.
    IDE Improvements  Preview tab  Pinned editor windows  Ctrl + Q / Search Menu  New Solution explorer Scope to this multiple views  Find within editor  Find all references  Demo
  • 9.
    Test Framework  Supports writing unit tests for MSTest Test adapters for other test frameworks are available Gtest xUnit++  Test Explorer Window Grouping  Code Coverage  Demo
  • 10.
    Better Intellisense  Uses an SDF (SQL CE database) instead of the ncb  Faster  More robust  Demo
  • 11.
    Type Visualizers (Natvis) Allow customizable data representation in debugger Replaces autoexp.dat Easier to handle, more powerful  Create a natvis file Place in either %VSINSTALLDIR%Common7PackagesDebuggerVisualizers (requires admin access) %USERPROFILE%My DocumentsVisual Studio 2012Visualizers Or VS extension folders  Files are reloaded at every debugging session No restart required when changing natvis files
  • 12.
    Type Visualizers (Natvis) Example natvis file  Allows conditional strings, node expansions, item lists, tree items, synthetic items, etc.
  • 13.
    Break New Editor Better Intellisense UnitTesting Code Coverage Code Analysis #include completion Navigate To Type visualizers
  • 14.
  • 15.
    C++ Styles (Question) C with a C++ compiler? C with classes / inheritance?  RAII, Exceptions, Smart pointer?  STL?  TMP?
  • 16.
    auto  Automatically deduces type information Very similar to „var‟ in c# Reduces amount of typing required  Reference or Value? Value by default, add & to make it a reference  Demo
  • 17.
    decltype  Represents the type of the expression decltype(2*3) -> int decltype(a) -> type of a  Why? Let types flow!  Demo
  • 18.
    Range based forloop  New type of for loop  Iterates all members of a collection  Demo
  • 19.
    Lambdas  Anonymous Functions  Allows logic to be placed where required  Can capture environment  General syntax: [capture](parameters)->return-type{body}  represent by type std::function<>
  • 20.
    Lambdas  Finally make STL algorithms useable  Reduces amount of (boilerplate-)code No more functor classes!
  • 21.
    Lambda Captures  ALambda can capture environment Allows the lambda to access and modify state  Capture kinds - reference or value - automatic or specific  Demo
  • 22.
    override and final  Explicitly defines overrides Compiler helps if no method to override is found  Helps with refactoring Rename method in base class but not in derived -> derived method no longer overrides Base class from third party!  Helps class design Implementers of derived classes can more easily understand which methods to override  final can be used on classes to prevent being derived from  Demo
  • 23.
  • 24.
    static_assert  Tests a software assertion at compile time  Especially useful for portable code Assert size of specific structures (x86, x64 issues)  Check library versions  Used to be accomplished using the preprocessor  Demo
  • 25.
    nullptr 0 / NULL used to indicate a null pointer  nullptr is of type nullptr_t  implicitly assignable to any pointer  not assignable to int etc.
  • 26.
    enum classes  C++03 enums Not type safe Enums of different types can be compared (basically integers) Storage type int  C++11 enum classes Type is compared as well! Underlying type can be chosen
  • 27.
  • 28.
  • 29.
  • 30.
    Initializer lists (CTP) Eases construction of non-POD types  Finalversion will provide initialize list constructors for STL types  Binds {…} syntax to the std::initializer_list<T> type.  Current STL does not support it  Demo name == “class std::initializer_list<int>”
  • 31.
    variadic templates (CTP) Flexible number of template arguments  Usable for template writers n-ary structures (tuples) e.g. make_shared, make_tuple Example: saveprint  Beware of dragons ;)  Demo
  • 32.
    Move Semantics  C++03: many (temporary) class instances Resulted in a lot of copying Constructs to work around Passing complex data structure from function  C++11: Move semantics If the copied value is an rvalue reference, the move constructor is called
  • 33.
    Move Semantics  Dramatically changes style! C++03 C++11
  • 34.
    Move Semantics  Note: right-hand version is valid C++03 code! But advanced programmers avoided it, due to the extra copy involved.  Now with C++11: Elegant AND Fast Reconsider the patterns you are used to  All STL containers implement move semantics Returning container was unavoidable? -> automatic performance improvement!  STL code will have fewer temporary objects  Demo
  • 35.
    Break  C++11 auto,decltype, range-based for loop lambdas, explicit overrides, static_assert nullptr, variadic templates, initializer_lists, enum classes, move-semantics
  • 36.
    std::async  C++ 11 has built-in support for asynchrony available through <future> header  std::async<T>(std::function) returns a future<T> - Different launch policies (synchronous, asynchronous) - can be waited on using wait() or get() to retrieve the result  Implemented in VC++ using PPL (parallel patterns library) - Highly scalable and performant
  • 37.
    std::async  Not every asynchronous operation is a thread / cpu bound Notably IO requests User Input etc.  std::future<T> can be created from a std::promise<T>!  std::promise<T> acts as a provider for a future Marshalls result between threads of execution correct locking / etc. Provides set_value / set_exception
  • 38.
    std::async T1 T2 (Blocks) Demo
  • 39.
    Parallel Patterns Library Based on ConcRT  Compatible to Intel Thread Building Blocks (TBB) At least interface wise  Template Library for parallel programming Abstracts concurrent workflows into tasks Provides continuations (improvement over std::future<T>)  Demo
  • 40.
    Auto Vectorization  Modern CPUs support SIMD Single Instruction Multiple Data Extensions such as SSE and AVX Usually optimized for specifically using compiler intrinsics or inline assembler Serial Vector x = x1 + x2 xyzw = xyzw1 + xyzw2 y = y1 + y2 z = z1 + z2 w = w1 + w2 τ
  • 41.
    Auto Vectorization  VC++ 2012 compiler has an auto-vectorizer (-Qvec) Tries to automatically vectorize loops and operators Enabled by default Diagnosis output using /Qvec-report:2  Performance difference? Depends. Max 4x for SSE (128bit), 8x for AVX (256bit), 3x-4x typical  Demo (later with auto parallelization)
  • 42.
    Auto-Parallelization  To utilize multiple cores, parallelization is used (MIMD) Multiple-Instructions-Multiple-Data  VC++2012 has an auto-parallelizer Can be hinted #pragma loop(hint_parallel(N)) #pragma loop(ivdep) Enabled using /Qpar Diagnosis using /Qpar-report:2  Demo
  • 43.
    C++ AMP  Open specification created by Microsoft  C++ for GPGPU Massively Parallel / Vector programming Based on top of DirectCompute (windows) Clang / LLVM implementation using OpenCL is available Provided by Intel (“Shevlin Park”)  One new keyword Restricts the decorated function to a specific subset of c++  Template library for wrapping data structures Datatransfer to/from GPU etc.
  • 44.
    Why C++ AMP?  Directly available from the compiler No additional SDK required Can reuse types (vector2f e.g.)  Better debugging experience compared to CUDA / OpenCL!  Makes C++ applicable to heterogeneous computing A processor may consist of multiple cores of different flavor More energy efficient (mobile!) visual computing image morphing Augmented reality etc.  Demo
  • 45.
    Smaller container sizes  X86 release, sizes in bytes Container VC9 SP1 / SCL = 0 VC10 (2010) VC11 (2012) (2008) vector<int> 16 16 12 deque<int> 32 24 20 forward_list<int> N/A 8 4 queue<int> 32 24 20 stack<int> 32 24 20 unordered_map<int, int> 44 44 32 string 28 28 24 wstring 28 28 24 ~14% less!
  • 46.
    Smaller container sizes  x64 release, sizes in bytes Container VC9 SP1 / SCL = 0 VC10 (2010) VC11 (2012) (2008) vector<int> 32 32 24 deque<int> 64 48 40 forward_list<int> N/A 16 8 queue<int> 64 48 40 stack<int> 64 48 40 unordered_map<int, int> 88 88 64 string 40 40 32 wstring 40 40 32 ~20% less!
  • 47.
    Code Analysis  Static analysis  Provides warnings at compile time  Additionally to /GS and /SDL  Detailed information on warning
  • 48.
    Code Analysis  What does it check ? Uninitialized Reads HRESULT verification checks Concurrency Warnings Format string checks Correct destructor calls (delete[] vs delete) Redundant code checks Many more: http://msdn.microsoft.com/en-us/library/a5b9aa09.aspx  Custom code can be annotated to aid code analysis See http://msdn.microsoft.com/en-us/library/ms182032.aspx  Demo
  • 49.
    Break  std::async  ppl auto vectorization  auto parallelization  container sizes  code analysis
  • 50.
    Custom Snippets  .snippet is supported, same as C# XML file describing a code snippet Declare variables and use them in the snippet body  Very helpful for similar but not equivalent code  Demo
  • 51.
    Debug View  Pin watch to source code Add comments Not only variables, but (most) expressions  View values from last debug session  Export / Import Data Tips Makes it easier for debugging with multiple developers / on different machines  Demo
  • 52.
    Parallel Stacks Window New view for debugging  Better understanding of multi thread applications
  • 53.
    Parallel Tasks Window Lists the task queues
  • 54.
    Parallel Watch Window Watch expressions in parallel Especially useful in tight loops Data races Expressions Can freeze / thaw threads Manually verify locking  Demo Parallel Stacks Parallel Tasks Threads Parallel Watch
  • 55.
    Shortcuts Shortcut Action Shortcut Strg + , Navigate To Strg + Q Search Menu F12 Go To Definition Strg + K, C Comment lines Umschalt + F12 Find all references Strg + K, U Uncomment lines Strg + - Navigate Backwards Strg + M, O Collapse To definition Strg + Umschalt + - Navigate Forwards Strg +M, X Expand All Outlining Strg + F Find in current file Strg +M, S Collapse Current Region Strg + H Replace in current file Strg + M, E Expand Current Region
  • 56.
    Break  Custom snippets  Debug view experience  Parallel Stacks  Parallel Tasks  Parallel Watch Window  code analysis  Shortcuts
  • 57.
    What‟s next?  It‟s a good century for C++ / native developers Single thread performance isn‟t getting much better memory latency / bandwidth is the bottleneck Efficiency is becoming more important (mobile!)  There is a huge commitment towards C++ Google, Apple started a new compiler project a few years ago (Clang / LLVM) ISO standard is evolving more quickly C++ Standards Foundation (www.isocpp.org) Google, Apple, Intel, Microsoft, ARM, IBM, HP, etc.
  • 58.
    Upcoming Standards  Library in std:: for file system handling based on boost.filesystem v3 We are here!  Net TS Networking HTTP etc.  TM TS Transactional Memory
  • 59.
    Wrap-Up  Tour around the new IDE  New Library Features Shell / Window handling std::async Solution Explorer PPL Code Navigation Improved container sizes Better Intellisense Snippets, Debug Experience Parallel Watch, Threads, Tasks  New Compiler Features  New Language Features Code Analysis auto, decltype, lambdas, /SDL /GS override, final Auto Vectorization static_assert, nullptr Auto parallelization C++ AMP
  • 60.
    Philipp Aumayr software architects gmbh Q&A Mail philipp@timecockpit.com Web http://www.timecockpit.com Twitter @paumayr Thank your for coming! Saves the day.

Editor's Notes

  • #8 Snap window back to original: Ctrl + Double click headerPromoting Preview Tab -&gt; Ctrl + Alt + Home (Pos1)
  • #9 Promoting Preview Tab -&gt; Ctrl + Alt + Home (Pos1)Show Themes (Dark / Light)
  • #10 Demo: Open VC2012 solution, add a few Assert::Fail to make testing more interesting. Show what test classes are
  • #11 Demo: Open up Ogre SDK -&gt; show that included Ogre.h works for intellisense
  • #12 [HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\11.0_Config\\Debugger]&quot;EnableNatvisDiagnostics&quot;=dword:00000001
  • #13 [HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\11.0_Config\\Debugger]&quot;EnableNatvisDiagnostics&quot;=dword:00000001http://msdn.microsoft.com/en-us/library/vstudio/jj620914.aspx
  • #17 VC2012:TestAuto, TestAuto2, show types in intellisense
  • #18 Demo: TestDeclType, show types of variables using hover
  • #19 Demo:TestRangeBasedForLoop, TestRangeBasedForLoopArray, TestRangeBasedForLoopCustomRange
  • #21 Demo: TestLambdaFunctionAdd, TestLambdaFunctionCaptureValue, TestLambdaFunctionCaptureReference, TestLambdaFunctionMultiCapture, TestLambdaFunctionPassToFunction
  • #22 Demo: TestLambdaFunctionAdd, TestLambdaFunctionCaptureValue, TestLambdaFunctionCaptureReference, TestLambdaFunctionMultiCapture, TestLambdaFunctionPassToFunction
  • #31 Demo: TestInitializerList
  • #32 Demo: VC2012CTP.cpp
  • #35 Demo: TestMoveConstructor
  • #39 Demo: TestAsync, TestPromise, TestTaskPPL
  • #40 Demo: TestTaskPPL
  • #43 Demo: VC2012 -&gt; main.cppQvec / Qparmessages http://msdn.microsoft.com/en-us/library/jj658585.aspx
  • #45 Demo: VC2012 -&gt; uncomment AMP
  • #49 http://msdn.microsoft.com/en-us/library/a5b9aa09.aspxDemo: ArrayOfByOne, RedundantCodeCheck
  • #52 Intvector.snippet, debugging support
  • #54 Demo: break in TestAsync