Cpp related knowledge, powered by ChatGPT4. Contents are all in English. >w< Enjoy!
virtual
static
inline
static/dynamic/const/reinterpret_cast
const & constexpr
NULL & nullptr
extern
using
typedef
operator
noexept
volatile
explicit
decltype
mutable
These are very powerful when trying to write efficient programs. Know their existence and use them when in handy, and this will save us lots of efforts.
Note that here's just the tip of the iceberg. For more information, you may refer to here: https://en.cppreference.com
std::function
std::bind
std::unique_ptr, std::shared_ptr, std::weak_ptr & std::make_unique, std::make_shared
std::back_inserter
std::copy
std::transform
std::accumulate
std::partial_sum
std::sort
std::partial_sort
std::nth_element
std::adjacent_difference
std::inner_product
std::itoa
std::initializer_list
std::for_each
std::all_of(c++11)
std::any_of(c++11)
std::none_of(c++11)
std::copy_n
std::find, std::find_if, std::find_if_not
std::partition, std::stable_partition, std::partition_copy
std::min, std::max, std::minmax
std::min_element, std::max_element, std::minmax_element
std::lower_bound, std::upper_bound
std::is_heap, std::is_heap_until
std::is_sorted, std::is_sorted_until
for mathematic functions in , see: https://en.cppreference.com/w/cpp/header/cmath
-
Find last subsequence in range (function template)
-
Find element from set in range (function template)
-
Find equal adjacent elements in range (function template)
-
Count appearances of value in range (function template)
-
count_if
Return number of elements in range satisfying condition (function template) -
Return first position where two ranges differ (function template)
-
Test whether the elements in two ranges are equal (function template)
-
Test whether range is permutation of another (function template)
-
Search range for subsequence (function template)
-
Search range for elements (function template)
-
Move range of elements backward (function template)
-
Exchange values of two objects (function template)
-
Exchange values of two ranges (function template)
-
Exchange values of objects pointed to by two iterators (function template)
-
Replace value in range (function template)
-
Replace values in range (function template)
-
Copy range replacing value (function template)
-
Copy range replacing value (function template)
-
Fill range with value (function template)
-
Fill sequence with value (function template)
-
Generate values for range with function (function template)
-
Generate values for sequence with function (function template)
-
Remove value from range (function template)
-
Remove elements from range (function template)
-
Copy range removing value (function template)
-
Copy range removing values (function template)
-
unique
Remove consecutive duplicates in range (function template) -
Copy range removing duplicates (function template)
-
reverse
Reverse range (function template) -
Copy range reversed (function template)
-
Rotate left the elements in range (function template)
-
Copy range rotated left (function template)
-
Randomly rearrange elements in range (function template)
-
Randomly rearrange elements in range using generator (function template)
-
Test whether range is partitioned (function template)
-
Get partition point (function template)
-
equal_range
Get subrange of equal elements (function template) -
Merge sorted ranges (function template)
-
Merge consecutive sorted ranges (function template)
-
Test whether sorted range includes another sorted range (function template)
-
Union of two sorted ranges (function template)
-
Intersection of two sorted ranges (function template)
-
Difference of two sorted ranges (function template)
-
Symmetric difference of two sorted ranges (function template)
-
Lexicographical less-than comparison (function template)
-
Transform range to next permutation (function template)
Just some basic ideas. It doesn't cover Template Metaprogramming.
For that please refer to: CppTemplateTutorial
overload & override
lambda expressions
lvalue & rvalue
move semantics
perfect forwarding
memory management
Resource Acquisition Is Initialization (RAII) & Last In, First Out (LIFO)
Return Value Optimization (RVO) and Named Return Value Optimization (NRVO)
overload resolution
scope
list initialization
structured binding(c++17)
if and switch with initializers
- template aliasing
- private/public/protected inheritance
- initializer list and uniform initialization
- Why virtual member function can not be used with template?
vector<string> v = str_split("1,2,3");
The memory will be where, why?- Can Constructors and Destructors be virtual?
- What is the difference between header files
#include <X.h>
and#include <cX>
? - Why do we have to include vector.cpp in vector.h since it's a template class?
- Is there a reason to use std::distance() over iterator::operator-()?
- What is the difference between 'typedef' and 'using' in C++11?
- What is string::npos in C++?
- Can a static member function be const?
- What is a lambda expression under the hood?
Official website: http://web.stanford.edu/class/cs106l/
CS106L includes just basic C++ knowledge. >w<
Think the mannual's great. Haven't read it though(.
Official website: https://mpcs-courses.cs.uchicago.edu/2022-23/spring/courses/mpcs-51045-1
Advanced cpp course from Uchicago.
Password: [mac login]
https://learn.microsoft.com/en-us/cpp/cpp
https://github.com/Light-City/CPlusPlusThings
https://github.com/wuye9036/CppTemplateTutorial
IEEE 754
https://learn.microsoft.com/en-us/cpp/cpp/keywords-cpp?view=msvc-170
for_each, the default traversal algorithm (along with range-based for loops).
find_if, the default search algorithm.
functors
reading lastly left here:
https://learn.microsoft.com/en-us/cpp/cpp/temporary-objects?view=msvc-170
STL: group functions by headers