set tabstop=2
set shiftwidth=2
https://youtu.be/qYHDERleSL8?si=iyod9wk7aMVcnk0r
https://gcc.gnu.org/wiki/cxx-coroutines
Google's differential privacy libraries.
https://learn.microsoft.com/en-us/cpp/?view=msvc-170
https://en.cppreference.com/w/cpp/links
https://github.com/aitjcize/cppman
C++ Core Guidelines - edt.: Bjarne Stroustrup, Herb Sutter
Joint Strike Fighter, C++ Coding Standards - Bjarne Stroustrup (PDF)
https://riptutorial.com/Download/cplusplus.pdf
https://cplusplus.com/doc/tutorial/
Use every available and reasonable set of warning options. Some warning options only work with optimizations enabled, or work better the higher the chosen level of optimization is, for example
-Wnull-dereference
with GCC.
You should use as many compilers as you can for your platform(s). Each compiler implements the standard slightly differently and supporting multiple will help ensure the most portable, most reliable code.
-Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic
-pedantic
- Warn on language extensions
-Wall -Wextra
reasonable and standard
-Wshadow
warn the user if a variable declaration shadows one from a parent context
-Wnon-virtual-dtor
warn the user if a class with virtual functions has a non-virtual destructor. This helps catch hard to track down memory errors
-Wold-style-cast
warn for c-style casts
-Wcast-align
warn for potential performance problem casts
-Wunused warn on anything being unused
-Woverloaded-virtual
warn if you overload (not override) a virtual function
-Wpedantic
(all versions of GCC, Clang >= 3.2) warn if non-standard C++ is used
-Wconversion
warn on type conversions that may lose data
-Wsign-conversion
(Clang all versions, GCC >= 4.3) warn on sign conversions
-Wmisleading-indentation
(only in GCC >= 6.0) warn if indentation implies blocks where blocks do not exist
-Wduplicated-cond
(only in GCC >= 6.0) warn if if / else chain has duplicated conditions
-Wduplicated-branches
(only in GCC >= 7.0) warn if if / else branches have duplicated code
-Wlogical-op
(only in GCC) warn about logical operations being used where bitwise were probably wanted
-Wnull-dereference
(only in GCC >= 6.0) warn if a null dereference is detected
-Wuseless-cast
(only in GCC >= 4.8) warn if you perform a cast to the same type
-Wdouble-promotion
(GCC >= 4.6, Clang >= 3.8) warn if float is implicitly promoted to double
-Wformat=2
warn on security issues around functions that format output (i.e., printf)
-Wlifetime
(only special branch of Clang currently) shows object lifetime issues
-Wimplicit-fallthrough
Warns when case statements fall-through. (Included with -Wextra in GCC, not in clang)
Consider using -Weverything
and disabling the few warnings you need to on Clang
-Weffc++
warning mode can be too noisy, but if it works for your project, use it also.https://github.com/cpp-best-practices/cppbestpractices/blob/master/02-Use_the_Tools_Available.md
https://google.github.io/styleguide/cppguide.html
https://learn.microsoft.com/ko-kr/cpp/cpp/welcome-back-to-cpp-modern-cpp?view=msvc-170
Training
C++ Programming Course - Beginner to Advanced | freeCodeCamp.org
Best Hindi Videos For Learning Programming : CodeWithHarry
C++ Programming Course - Beginner to Advanced
#!/bin/bash
g++ -std=c++2a main.pp
chmod +x build.sh
how to use c++20 / g++ -std=c++11 -o test test.cpp (build.sh❤️파일 만드는법)
g++ -std=c++20
// C++20 기능은 GCC 8부터 사용할 수 있습니다.
// C++20 지원을 활성화하려면 명령줄 매개변수를 추가하세요.
-std=c++20
// G++ 9 이상 사용
-std=c++2a
// 또는 C++20 기능 외에 GNU 확장을 활성화하려면 다음을 추가하십시오.
-std=gnu++20
$ g++ -Wall -Wextra -std=c++17 main.cpp -o main
$ clang++ -Wall -Wextra -std=c++17 main.cpp -o main
build.sh
#!/bin/bash
clang++ -Wall -Wextra -std=c++17 main.cpp -o main
출처: https://economiceco.tistory.com/15424 [경제PLUS:티스토리]
https://github.com/jungeu1509/Algorithm_study
https://github.com/rigtorp/awesome-modern-cpp
https://itnext.io/c-20-coroutines-complete-guide-7c3fc08db89d?gi=b495cc70f832
https://github.com/HappyCerberus/article-cpp20-coroutines