Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ STL : Including all libraries?

Tags:

c++

How to include all the libraries of stl in my c++ code rather than individually including them. For example -

#include <queue>
#include <containers> 

A simple way to include all of them. Please help ?

like image 541
Suyashi Garg Avatar asked Dec 11 '22 02:12

Suyashi Garg


1 Answers

You can't but you can just make a list and put them in a header with a header guard ofc.

// C++ Full Standard Header Include
#include <cstdlib>
#include <csignal>
#include <csetjmp>
#include <cstdarg>
#include <typeinfo>
#include <typeindex>
#include <type_traits>
#include <bitset>
#include <functional>
#include <utility>
#include <ctime>
#include <chrono>
#include <cstddef>
#include <initializer_list>
#include <tuple>
#include <new>
#include <memory>
#include <scoped_allocator>
#include <climits>
#include <cfloat>
#include <cstdint>
#include <cinttypes>
#include <limits>
#include <exception>
#include <stdexcept>
#include <cassert>
#include <system_error>
#include <cerrno>
#include <cctype>
#include <cwctype>
#include <cstring>
#include <cwstring>
#include <cwchar>
#include <cuchar>
#include <string>
#include <array>
#include <vector>
#include <deque>
#include <list>
#include <forward_list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <stack>
#include <queue>
#include <algorithm>
#include <iterator>
#include <cmath>
#include <complex>
#include <valarray>
#include <random>
#include <numeric>
#include <ratio>
#include <cfenv>
#include <iosfwd>
#include <ios>
#include <istream>
#include <ostream>
#include <iostream>
#include <fstream>
#include <sstream>
#include <strstream>
#include <iomanip>
#include <streambuf>
#include <cstdio>
#include <locale>
#include <clocale>
#include <codecvt>
#include <regex>
#include <atomic>
#include <thread>
#include <mutex>
#include <future>
#include <condition_variable>
#include <ciso646>
#include <ccomplex>
#include <ctgmath>
#include <cstdalign>
#include <cstdbool>

That should be the full list :) ( C++11 has to be active too ) You might want to remove the ones that are deprecated ( shouldn't be many / you will get a warning anyway ) and the ones you don't have because they're special / old / new

like image 103
deW1 Avatar answered Dec 29 '22 13:12

deW1