Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Overview ===== C++ links/resources. TO DO: * Constant expressions (''const'' and ''constexpr'') (10.4) * A class with a ''constexpr'' constructor is called a //literal type//. * Implicit type conversion (10.5) * ''nothrow'' forms of ''new'' and ''delete'' (11.2.4) * initializer lists * "using" for type aliases ===== Links ===== General links: * [[http://www.stroustrup.com|stroustrup.com]] * [[http://en.cppreference.com/w/|C++ reference]] * [[http://en.cppreference.com/w/cpp/symbol_index|std:: symbol index]] * [[http://www.learncpp.com/|Learn C++]] * [[http://www.cplusplus.com/|cplusplus.com]] * [[https://isocpp.org/|News, Status & Discussion about Standard C++]] * [[http://www.open-std.org/jtc1/sc22/wg21/|JTC1/SC22/WG21 - The C++ Standards Committee - ISOCPP]] * [[https://github.com/cplusplus/draft|Working draft]] * [[https://gcc.gnu.org/|GCC, the GNU Compiler Collection]] * [[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf|Working Draft, Standard for Programming Language C++ (2012)]] * [[https://isocpp.org/std/the-standard|C++ The Standard]] Comparing C and C++: * [[https://en.wikipedia.org/wiki/Compatibility_of_C_and_C++|Compatibility of C and C++]] ===== Stroustrup ===== ===== New features in C++11 ===== ==== move semantics ==== ==== variadic templates ==== ==== rvalue references ==== ==== forwarding references ==== ==== initializer lists ==== ==== static assertions ==== ==== auto ==== ==== lambda expressions ==== ==== decltype ==== ==== template aliases ==== ==== nullptr ==== ==== strongly-typed enums ==== ==== attributes ==== ==== constexpr ==== ==== delegating constructors ==== ==== user-defined literals ==== ==== explicit virtual overrides ==== ==== final specifier ==== ==== default functions ==== ==== deleted functions ==== ==== range-based for loops ==== ==== special member functions for move semantics ==== ==== converting constructors ==== ==== explicit conversion functions ==== ==== inline namespaces ==== ==== non-static data member initializers ==== ==== right angle brackets ==== ==== ref-qualified member functions ==== ==== trailing return types ==== ===== Figure out ===== * namespaces * throw/exceptions * try/catch ===== Miscellany ===== * using {} for initialization instead of = * catches narrowing conversions like "int a {3.14};" * "auto" type deduction from initializer, "auto b = true" * "constexpr" as long as expression really is a constant (eventually) * "constexpr int i = square(?)" * any functions invoked must also be declared as "constexpr" * declared size of array must be constant expression * range-for-statement (for any sequence of elements) * int v[] = {1,2,3,4,5}; * for (auto x : v) * for (auto x : {1,2,3,4,5}) * for (auto& x : v) { ++x; } * references in declarations * kinds of classes * concrete * abstract ===== Standard library ===== * ''std::list'' * ''std::string'' ===== Coding style ===== * use "const" as much as possible, to qualify class methods * functions defined in a class are inlined by default * define non-member routines if they don't need access to the class ==== Internal C++ links ===== * [[Advanced C++ Links|Advanced C++ Links]] * [[C++11 Features|New C++11 Features]] * [[C++ terminology]] * [[C++ data types]] * [[C++ casting]] * [[C++ enums]] * [[C++ namespaces]] * [[C++ iterators]] (MUCH TO DO) * [[C++ exceptions]] * [[C++ STL]] * [[C++ debugging]] (TO DO) * [[C++ compilation oddities]] * [[C++ coding style/advice]] ===== Books ===== * [[https://www.amazon.ca/C-Programming-Language-4th/dp/0321563840/ref=sr_1_4?s=books&ie=UTF8&qid=1511430904&sr=1-4&keywords=c%2B%2B|C++ Programming Language (4th edition), Bjarne Stroustrup]] * [[https://www.amazon.ca/Programming-Principles-Practice-Using-2nd/dp/0321992784/ref=sr_1_1?s=books&ie=UTF8&qid=1511432041&sr=1-1&keywords=c%2B%2B+programming+stroustrup|Programming: Principles and Practice Using C++ (2nd Edition), Stroustrup]] * [[https://www.amazon.ca/Primer-5th-Stanley-B-Lippman/dp/0321714113/ref=sr_1_1?s=books&ie=UTF8&qid=1511430972&sr=1-1&keywords=c%2B%2B+primer|C++ Primer (5th edition), Stanley B. Lippman]] * [[https://www.amazon.ca/Standard-Library-Tutorial-Reference-2nd/dp/0321623215/ref=sr_1_2?s=books&ie=UTF8&qid=1511430958&sr=1-2&keywords=nicolai+josuttis|The C++ Standard Library: A Tutorial and Reference (2nd edition), Nicolai Josuttis]] * [[https://www.amazon.ca/C-Templates-Complete-Guide-2nd/dp/0321714121/ref=sr_1_1?s=books&ie=UTF8&qid=1511430958&sr=1-1&keywords=nicolai+josuttis|C++ Templates: The Complete Guide (2nd Edition), Josuttis et al]] * [[http://shop.oreilly.com/product/0636920033707.do|Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14, Scott Meyers]] * [[https://www.artima.com/shop/overview_of_the_new_cpp|Presentation Materials: Overview of the New C++ (C++11/14), Scott Meyers]] * [[https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list/388282#388282|StackOverflow Reading List]] * [[https://isocpp.org/get-started|ISOCPP resource list]] ===== Parsers/static code checkers/beautifiers ===== * [[https://github.com/google/styleguide/tree/gh-pages/cpplint|cpplint]] * [[http://cppcheck.sourceforge.net/|cppcheck]] * [[https://clang-analyzer.llvm.org/|clang static analyzer]] * [[http://astyle.sourceforge.net/|astyle (Automatic Formatter)]] ===== C++ Style Guides ===== * [[https://google.github.io/styleguide/cppguide.html|Google C++ Style Guide]] * [[https://www.linkedin.com/pulse/20140503193653-3046051-why-google-style-guide-for-c-is-a-deal-breaker/|Why Google Style Guide for C++ is a deal-breaker (2014)]] * [[http://geosoft.no/development/cppstyle.html|GeoSoft C++ Style Guide]] c.txt Last modified: 2019/08/13 12:31by rpjday