Skip to content

Instantly share code, notes, and snippets.

@tatyam-prime
Last active February 19, 2026 04:00
Show Gist options
  • Select an option

  • Save tatyam-prime/30beeaa3240d460185894ada35569003 to your computer and use it in GitHub Desktop.

Select an option

Save tatyam-prime/30beeaa3240d460185894ada35569003 to your computer and use it in GitHub Desktop.
Mac 用の bits/stdc++.h
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <climits>
#include <clocale>
#include <cmath>
#include <complex>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cwchar>
#include <cwctype>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <cfenv>
#include <chrono>
#include <cinttypes>
#include <cstdint>
#include <codecvt>
#include <condition_variable>
#include <cuchar>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <type_traits>
#include <typeindex>
#include <unordered_map>
#include <unordered_set>
#endif
#if __cplusplus >= 201402L
#include <shared_mutex>
#endif
#if __cplusplus >= 201703L
#include <any>
#include <charconv>
#include <execution>
#include <filesystem>
#include <memory_resource>
#include <optional>
#include <string_view>
#include <variant>
#endif
#if __cplusplus >= 202002L
#include <barrier>
#include <bit>
#include <compare>
#include <concepts>
#if __cpp_impl_coroutine
#include <coroutine>
#endif
#include <format>
#include <latch>
#include <numbers>
#include <ranges>
#include <semaphore>
#include <source_location>
#include <span>
#include <stop_token>
#include <syncstream>
#include <version>
#endif
#if __cplusplus >= 202302L
#if __has_include(<expected>)
#include <expected>
#endif
#if __has_include(<flat_map>)
#include <flat_map>
#endif
#if __has_include(<flat_set>)
#include <flat_set>
#endif
#if __has_include(<generator>)
#include <generator>
#endif
#if __has_include(<mdspan>)
#include <mdspan>
#endif
#if __has_include(<print>)
#include <print>
#endif
#if __has_include(<spanstream>)
#include <spanstream>
#endif
#if __has_include(<stacktrace>)
#include <stacktrace>
#endif
#if __has_include(<stdatomic.h>)
#include <stdatomic.h>
#endif
#if __has_include(<stdfloat>)
#include <stdfloat>
#endif
#endif
#if __cplusplus > 202302L
#if __has_include(<contracts>)
#include <contracts>
#endif
#if __has_include(<debugging>)
#include <debugging>
#endif
#if __has_include(<hazard_pointer>)
#include <hazard_pointer>
#endif
#if __has_include(<hive>)
#include <hive>
#endif
#if __has_include(<inplace_vector>)
#include <inplace_vector>
#endif
#if __has_include(<linalg>)
#include <linalg>
#endif
#if __has_include(<rcu>)
#include <rcu>
#endif
#if __has_include(<simd>)
#include <simd>
#endif
#if __has_include(<stdbit.h>)
#include <stdbit.h>
#endif
#if __has_include(<stdckdint.h>)
#include <stdckdint.h>
#endif
#if __has_include(<text_encoding>)
#include <text_encoding>
#endif
#endif
@tatyam-prime
Copy link
Author

clang++ <よく使うコンパイルオプション> /path/to/bits/stdc++.h

でプリコンパイルができ,コンパイル時間を短縮できる.(コンパイルオプションはだいたい一致しないと使われないことに注意)

@tatyam-prime
Copy link
Author

https://en.cppreference.com/w/cpp/headers.html を参照しながら作成.

C compatibility headers は含めず,Special C compatibility headers は含めている.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment