-
VSCode에서 <bits/stdc++.h> precompile header 사용템플릿 2024. 9. 28. 23:04
새로 세팅할때 참고하기 위해 백업
Code Runner 익스텐션의 setting.json에서 -include bits/stdc++ 을 포함
"cpp": "cd $dir && g++ -include bits/stdc++ -std=c++20 \"$fileName\" -o \"$fileNameWithoutExt\" && & \"$dir$fileNameWithoutExt\"",stdc++.h와 동일한 위치에서 미리 컴파일:
g++ -std=c++20 -x c++-header bits/stdc++.h -o stdc++.gch
적용 여부는 -H에서 봐도 되고, -ftime-report 후 phase parsing 부분을 체크
Competitive Programming Helper 에도 -include bits/stdc++ 를 Cph > Language > Cpp > Args 에 넣어주면 된다.