From 4ec4236f3bcf57361d42bc9d359a11033d3e4ca0 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Wed, 21 Jun 2017 13:12:30 +0200 Subject: [PATCH] refactoring of std extensions --- .../src/measurements/MeasurementFrame.cpp | 1 + alib2data/src/alphabet/ranked_symbol.hpp | 2 + .../regexp/formal/FormalRegExpAlternation.h | 1 + .../regexp/formal/FormalRegExpConcatenation.h | 2 +- .../src/regexp/formal/FormalRegExpIteration.h | 1 + .../src/rte/formal/FormalRTEAlternation.h | 1 + alib2data/src/rte/formal/FormalRTEIteration.h | 1 + .../src/rte/formal/FormalRTESubstitution.h | 1 + .../src/rte/formal/FormalRTESymbolAlphabet.h | 1 + .../src/graph/directed/DirectedGraph.h | 1 + .../src/graph/undirected/UndirectedGraph.h | 1 + alib2std/src/algorithm | 20 ++++++--- alib2std/src/bitset | 22 ++++++---- alib2std/src/clone | 17 +++++--- alib2std/src/compare | 17 +++++--- alib2std/src/deque | 22 ++++++---- alib2std/src/extensions/algorithm.hpp | 3 ++ alib2std/src/extensions/bitset.hpp | 7 +++ alib2std/src/extensions/clone.hpp | 3 ++ alib2std/src/extensions/compare.hpp | 2 + alib2std/src/extensions/deque.hpp | 7 +++ alib2std/src/extensions/fdstream.hpp | 6 +++ alib2std/src/extensions/foreach.hpp | 3 ++ alib2std/src/extensions/forward_list.hpp | 7 +++ alib2std/src/extensions/forward_tree.hpp | 12 ++++++ alib2std/src/extensions/hexavigesimal.h | 2 + alib2std/src/extensions/iostream.hpp | 5 +++ alib2std/src/extensions/istream.h | 2 + alib2std/src/extensions/iterator.hpp | 2 + alib2std/src/extensions/linear_set.hpp | 8 ++++ alib2std/src/extensions/list.hpp | 7 +++ alib2std/src/extensions/map.hpp | 9 ++++ alib2std/src/extensions/memory.hpp | 8 ++++ alib2std/src/extensions/pair.hpp | 10 +++++ alib2std/src/extensions/random.hpp | 3 ++ alib2std/src/extensions/set.hpp | 7 +++ alib2std/src/extensions/string.hpp | 3 ++ alib2std/src/extensions/tree.hpp | 11 +++++ alib2std/src/extensions/tree_base.hpp | 3 ++ alib2std/src/extensions/trie.hpp | 11 +++++ alib2std/src/extensions/tuple.hpp | 7 +++ alib2std/src/extensions/type_traits.hpp | 2 + alib2std/src/extensions/typeindex.h | 2 + alib2std/src/extensions/typeinfo.cpp | 1 + alib2std/src/extensions/typeinfo.hpp | 8 ++++ alib2std/src/extensions/unordered_map.hpp | 7 +++ alib2std/src/extensions/utility.hpp | 3 ++ alib2std/src/extensions/variant.hpp | 11 +++++ alib2std/src/extensions/vector.hpp | 7 +++ alib2std/src/fdstream | 21 +++++---- alib2std/src/foreach | 17 +++++--- alib2std/src/forward_list | 22 ++++++---- alib2std/src/forward_tree | 23 +++++----- alib2std/src/hexavigesimal | 17 +++++--- alib2std/src/iostream | 20 ++++++--- alib2std/src/istream | 19 +++++--- alib2std/src/iterator | 19 +++++--- alib2std/src/linear_set | 21 ++++----- alib2std/src/list | 22 ++++++---- alib2std/src/map | 23 +++++----- alib2std/src/memory | 22 ++++++---- alib2std/src/pair | 18 +++++--- alib2std/src/random | 20 ++++++--- alib2std/src/set | 22 ++++++---- alib2std/src/string | 43 +++++++++++-------- alib2std/src/tree | 23 +++++----- alib2std/src/trie | 22 +++++----- alib2std/src/tuple | 22 ++++++---- alib2std/src/type_traits | 19 +++++--- alib2std/src/typeindex | 19 +++++--- alib2std/src/typeinfo | 29 +++++++------ alib2std/src/unordered_map | 22 ++++++---- alib2std/src/utility | 19 +++++--- alib2std/src/variant | 22 +++++----- alib2std/src/vector | 22 ++++++---- .../test-src/extensions/SharedPtrTest.cpp | 1 + alib2str/src/regexp/RegExpFromStringParser.h | 1 + 77 files changed, 611 insertions(+), 259 deletions(-) diff --git a/alib2common/src/measurements/MeasurementFrame.cpp b/alib2common/src/measurements/MeasurementFrame.cpp index 153d5ae300..58a1a72842 100644 --- a/alib2common/src/measurements/MeasurementFrame.cpp +++ b/alib2common/src/measurements/MeasurementFrame.cpp @@ -3,6 +3,7 @@ */ #include <sstream> +#include <tuple> #include "MeasurementFrame.hpp" namespace measurements { diff --git a/alib2data/src/alphabet/ranked_symbol.hpp b/alib2data/src/alphabet/ranked_symbol.hpp index 1df0fe23aa..f3b5961134 100644 --- a/alib2data/src/alphabet/ranked_symbol.hpp +++ b/alib2data/src/alphabet/ranked_symbol.hpp @@ -12,6 +12,8 @@ #include <common/DefaultSymbolType.h> #include <common/DefaultRankType.h> +#include <tuple> + namespace std { /** diff --git a/alib2data/src/regexp/formal/FormalRegExpAlternation.h b/alib2data/src/regexp/formal/FormalRegExpAlternation.h index 1745bb8909..717b050acc 100644 --- a/alib2data/src/regexp/formal/FormalRegExpAlternation.h +++ b/alib2data/src/regexp/formal/FormalRegExpAlternation.h @@ -9,6 +9,7 @@ #define FORMAL_REG_EXP_ALTERNATION_H_ #include <sstream> +#include <utility> #include <exception/CommonException.h> diff --git a/alib2data/src/regexp/formal/FormalRegExpConcatenation.h b/alib2data/src/regexp/formal/FormalRegExpConcatenation.h index 95438c2e0f..e2c5ead04d 100644 --- a/alib2data/src/regexp/formal/FormalRegExpConcatenation.h +++ b/alib2data/src/regexp/formal/FormalRegExpConcatenation.h @@ -8,8 +8,8 @@ #ifndef FORMAL_REG_EXP_CONCATENATION_H_ #define FORMAL_REG_EXP_CONCATENATION_H_ -#include <vector> #include <sstream> +#include <utility> #include <exception/CommonException.h> diff --git a/alib2data/src/regexp/formal/FormalRegExpIteration.h b/alib2data/src/regexp/formal/FormalRegExpIteration.h index 6f713916ad..98d2a15c22 100644 --- a/alib2data/src/regexp/formal/FormalRegExpIteration.h +++ b/alib2data/src/regexp/formal/FormalRegExpIteration.h @@ -9,6 +9,7 @@ #define FORMAL_REG_EXP_ITERATION_H_ #include <sstream> +#include <utility> #include <exception/CommonException.h> diff --git a/alib2data/src/rte/formal/FormalRTEAlternation.h b/alib2data/src/rte/formal/FormalRTEAlternation.h index 72333ac654..491a21c15e 100644 --- a/alib2data/src/rte/formal/FormalRTEAlternation.h +++ b/alib2data/src/rte/formal/FormalRTEAlternation.h @@ -9,6 +9,7 @@ #define FORMAL_RTE_ALTERNATION_H_ #include <sstream> +#include <utility> #include "FormalRTEElement.h" diff --git a/alib2data/src/rte/formal/FormalRTEIteration.h b/alib2data/src/rte/formal/FormalRTEIteration.h index b27488e995..0edf0cd5c3 100644 --- a/alib2data/src/rte/formal/FormalRTEIteration.h +++ b/alib2data/src/rte/formal/FormalRTEIteration.h @@ -14,6 +14,7 @@ #include <exception/CommonException.h> #include <sstream> +#include <utility> namespace rte { diff --git a/alib2data/src/rte/formal/FormalRTESubstitution.h b/alib2data/src/rte/formal/FormalRTESubstitution.h index 329c244ec8..c980bff24d 100644 --- a/alib2data/src/rte/formal/FormalRTESubstitution.h +++ b/alib2data/src/rte/formal/FormalRTESubstitution.h @@ -13,6 +13,7 @@ #include <exception/CommonException.h> #include <sstream> +#include <utility> namespace rte { diff --git a/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h b/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h index de1fcf75a3..79e15c3ab1 100644 --- a/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h +++ b/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h @@ -12,6 +12,7 @@ #include <exception/CommonException.h> #include <sstream> +#include <utility> #include <alphabet/common/SymbolNormalize.h> namespace rte { diff --git a/alib2data_experimental/src/graph/directed/DirectedGraph.h b/alib2data_experimental/src/graph/directed/DirectedGraph.h index 7f6ab67220..244dbeafee 100644 --- a/alib2data_experimental/src/graph/directed/DirectedGraph.h +++ b/alib2data_experimental/src/graph/directed/DirectedGraph.h @@ -12,6 +12,7 @@ #include <unordered_map> #include <vector> #include <set> +#include <tuple> #include "../GraphBase.h" #include "../GraphTypes.h" diff --git a/alib2data_experimental/src/graph/undirected/UndirectedGraph.h b/alib2data_experimental/src/graph/undirected/UndirectedGraph.h index f949ffdbde..8b3ebc5201 100644 --- a/alib2data_experimental/src/graph/undirected/UndirectedGraph.h +++ b/alib2data_experimental/src/graph/undirected/UndirectedGraph.h @@ -12,6 +12,7 @@ #include <unordered_map> #include <vector> #include <set> +#include <tuple> #include "../GraphBase.h" #include "../GraphTypes.h" diff --git a/alib2std/src/algorithm b/alib2std/src/algorithm index dcf693aac1..5715229eca 100644 --- a/alib2std/src/algorithm +++ b/alib2std/src/algorithm @@ -1,8 +1,16 @@ -#ifndef __ALGORITHM_HEADER_WRAPPER_ -#define __ALGORITHM_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../algorithm> -#include <functional> -#include "extensions/algorithm.hpp" + #ifndef __ALGORITHM_HEADER_WRAPPER_ + #define __ALGORITHM_HEADER_WRAPPER_ -#endif /* __ALGORITHM_HEADER_WRAPPER_ */ + #include "extensions/algorithm.hpp" + + #endif /* __ALGORITHM_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../algorithm> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/bitset b/alib2std/src/bitset index 4e8b735ab4..a62e8968bc 100644 --- a/alib2std/src/bitset +++ b/alib2std/src/bitset @@ -1,12 +1,16 @@ -#ifndef __BITSET_HEADER_WRAPPER_ -#define __BITSET_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../bitset> -#include <ostream> -#include "compare" -#include "string" -#include "sstream" -#include "extensions/bitset.hpp" + #ifndef __BITSET_HEADER_WRAPPER_ + #define __BITSET_HEADER_WRAPPER_ -#endif /* __BITSET_HEADER_WRAPPER_ */ + #include "extensions/bitset.hpp" + #endif /* __BITSET_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../bitset> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/clone b/alib2std/src/clone index 76d469b03e..e47057c50f 100644 --- a/alib2std/src/clone +++ b/alib2std/src/clone @@ -1,7 +1,14 @@ -#ifndef __CLONE_HEADER_WRAPPER_ -#define __CLONE_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include "type_traits" -#include "extensions/clone.hpp" + #ifndef __CLONE_HEADER_WRAPPER_ + #define __CLONE_HEADER_WRAPPER_ -#endif /* __CLONE_HEADER_WRAPPER_ */ + #include "extensions/clone.hpp" + + #endif /* __CLONE_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/compare b/alib2std/src/compare index 0a71d66a08..5bf3f36233 100644 --- a/alib2std/src/compare +++ b/alib2std/src/compare @@ -1,7 +1,14 @@ -#ifndef __COMPARE_HEADER_WRAPPER_ -#define __COMPARE_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include "utility" -#include "extensions/compare.hpp" + #ifndef __COMPARE_HEADER_WRAPPER_ + #define __COMPARE_HEADER_WRAPPER_ -#endif /* __COMPARE_HEADER_WRAPPER_ */ + #include "extensions/compare.hpp" + + #endif /* __COMPARE_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/deque b/alib2std/src/deque index ce1a2ac051..ad1e1b3ce5 100644 --- a/alib2std/src/deque +++ b/alib2std/src/deque @@ -1,12 +1,16 @@ -#ifndef __DEQUE_HEADER_WRAPPER_ -#define __DEQUE_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../deque> -#include <ostream> -#include "compare" -#include "string" -#include "sstream" -#include "extensions/deque.hpp" + #ifndef __DEQUE_HEADER_WRAPPER_ + #define __DEQUE_HEADER_WRAPPER_ -#endif /* __DEQUE_HEADER_WRAPPER_ */ + #include "extensions/deque.hpp" + #endif /* __DEQUE_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../deque> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/extensions/algorithm.hpp b/alib2std/src/extensions/algorithm.hpp index 67abc2a740..839a8068c0 100644 --- a/alib2std/src/extensions/algorithm.hpp +++ b/alib2std/src/extensions/algorithm.hpp @@ -8,6 +8,9 @@ #ifndef __ALGORITHM_HPP_ #define __ALGORITHM_HPP_ +#include <algorithm> +#include <functional> + namespace std { template<class InputIt1, class InputIt2, class Compare> diff --git a/alib2std/src/extensions/bitset.hpp b/alib2std/src/extensions/bitset.hpp index 40102b33a1..7ca59aae4d 100644 --- a/alib2std/src/extensions/bitset.hpp +++ b/alib2std/src/extensions/bitset.hpp @@ -8,6 +8,13 @@ #ifndef __BITSET_HPP_ #define __BITSET_HPP_ +#include <bitset> +#include <ostream> +#include <string> +#include <sstream> + +#include "compare.hpp" + namespace std { template < size_t N > diff --git a/alib2std/src/extensions/clone.hpp b/alib2std/src/extensions/clone.hpp index 4f7d092158..d5780a92a9 100644 --- a/alib2std/src/extensions/clone.hpp +++ b/alib2std/src/extensions/clone.hpp @@ -8,6 +8,9 @@ #ifndef __CLONE_HPP_ #define __CLONE_HPP_ +#include <type_traits> +#include "type_traits.hpp" + namespace std { template<class T, typename std::enable_if< ! std::has_clone<T>::value >::type* = nullptr> diff --git a/alib2std/src/extensions/compare.hpp b/alib2std/src/extensions/compare.hpp index 9b8a880cfb..1b82712991 100644 --- a/alib2std/src/extensions/compare.hpp +++ b/alib2std/src/extensions/compare.hpp @@ -8,6 +8,8 @@ #ifndef __COMPARE_HPP_ #define __COMPARE_HPP_ +#include <utility> + namespace std { template < typename T, typename Enable = void > diff --git a/alib2std/src/extensions/deque.hpp b/alib2std/src/extensions/deque.hpp index 5a44dee25b..e6a862d806 100644 --- a/alib2std/src/extensions/deque.hpp +++ b/alib2std/src/extensions/deque.hpp @@ -8,6 +8,13 @@ #ifndef __DEQUE_HPP_ #define __DEQUE_HPP_ +#include <deque> +#include <ostream> +#include <string> +#include <sstream> + +#include "compare.hpp" + namespace std { template < class T, class ... Ts > diff --git a/alib2std/src/extensions/fdstream.hpp b/alib2std/src/extensions/fdstream.hpp index cd67438431..23a72b26c4 100644 --- a/alib2std/src/extensions/fdstream.hpp +++ b/alib2std/src/extensions/fdstream.hpp @@ -20,6 +20,12 @@ #ifndef __FDSTREAM_HPP_ #define __FDSTREAM_HPP_ +#include <unistd.h> +#include <fcntl.h> +#include <ostream> +#include <istream> +#include <array> + namespace std { extern const int FAIL_FD; diff --git a/alib2std/src/extensions/foreach.hpp b/alib2std/src/extensions/foreach.hpp index a892f0c39d..6e6c5e11a6 100644 --- a/alib2std/src/extensions/foreach.hpp +++ b/alib2std/src/extensions/foreach.hpp @@ -8,6 +8,9 @@ #ifndef __FOREACH_HPP_ #define __FOREACH_HPP_ +#include <tuple> +#include <utility> + namespace std { template < class ... Iterators > diff --git a/alib2std/src/extensions/forward_list.hpp b/alib2std/src/extensions/forward_list.hpp index 87d05a5f30..4c5183bb8b 100644 --- a/alib2std/src/extensions/forward_list.hpp +++ b/alib2std/src/extensions/forward_list.hpp @@ -8,6 +8,13 @@ #ifndef __FORWARD_LIST_HPP_ #define __FORWARD_LIST_HPP_ +#include <forward_list> +#include <ostream> +#include <string> +#include <sstream> + +#include "compare.hpp" + namespace std { template< class T, class ... Ts > diff --git a/alib2std/src/extensions/forward_tree.hpp b/alib2std/src/extensions/forward_tree.hpp index 9bfb513f2e..816dc992fd 100644 --- a/alib2std/src/extensions/forward_tree.hpp +++ b/alib2std/src/extensions/forward_tree.hpp @@ -8,6 +8,18 @@ #ifndef __FORWARD_TREE_HPP_ #define __FORWARD_TREE_HPP_ +#include <memory> +#include <vector> +#include <deque> +#include <tuple> +#include <iterator> +#include <string> +#include <sstream> + +#include "tree_base.hpp" +#include "iterator.hpp" +#include "compare.hpp" + namespace std { template < class T > diff --git a/alib2std/src/extensions/hexavigesimal.h b/alib2std/src/extensions/hexavigesimal.h index 9e74f19cb8..e3b18da693 100644 --- a/alib2std/src/extensions/hexavigesimal.h +++ b/alib2std/src/extensions/hexavigesimal.h @@ -8,6 +8,8 @@ #ifndef __HEXAVIGESIMAL_H_ #define __HEXAVIGESIMAL_H_ +#include <string> + namespace std { /** diff --git a/alib2std/src/extensions/iostream.hpp b/alib2std/src/extensions/iostream.hpp index 406e8285b8..b775f5c33a 100644 --- a/alib2std/src/extensions/iostream.hpp +++ b/alib2std/src/extensions/iostream.hpp @@ -8,6 +8,11 @@ #ifndef __IOSTREAM_HPP_ #define __IOSTREAM_HPP_ +#include <iostream> +#include <array> + +#include "fdstream.hpp" + namespace std { extern const int CERR_FD; diff --git a/alib2std/src/extensions/istream.h b/alib2std/src/extensions/istream.h index 90e6d41add..2a0f5294bd 100644 --- a/alib2std/src/extensions/istream.h +++ b/alib2std/src/extensions/istream.h @@ -8,6 +8,8 @@ #ifndef __ISTREAM_H_ #define __ISTREAM_H_ +#include <istream> + namespace std { std::istream& operator>>(std::istream& in, const std::string& str); diff --git a/alib2std/src/extensions/iterator.hpp b/alib2std/src/extensions/iterator.hpp index dbcbdaccda..e6b2e6571a 100644 --- a/alib2std/src/extensions/iterator.hpp +++ b/alib2std/src/extensions/iterator.hpp @@ -8,6 +8,8 @@ #ifndef __ITERATOR_HPP_ #define __ITERATOR_HPP_ +#include <iterator> + namespace std { template<class T> diff --git a/alib2std/src/extensions/linear_set.hpp b/alib2std/src/extensions/linear_set.hpp index 4b55a46cd3..13e665cc18 100644 --- a/alib2std/src/extensions/linear_set.hpp +++ b/alib2std/src/extensions/linear_set.hpp @@ -8,6 +8,14 @@ #ifndef __LINEAR_SET_HPP_ #define __LINEAR_SET_HPP_ +#include <vector> +#include <ostream> +#include <string> +#include <sstream> +#include <algorithm> + +#include "compare.hpp" + namespace std { template < class T, class Compare = less<T>, class Alloc = allocator<T> > diff --git a/alib2std/src/extensions/list.hpp b/alib2std/src/extensions/list.hpp index 07bd524b28..26e00b6919 100644 --- a/alib2std/src/extensions/list.hpp +++ b/alib2std/src/extensions/list.hpp @@ -8,6 +8,13 @@ #ifndef __LIST_HPP_ #define __LIST_HPP_ +#include <list> +#include <ostream> +#include <string> +#include <sstream> + +#include "compare.hpp" + namespace std { template< class T, class ... Ts > diff --git a/alib2std/src/extensions/map.hpp b/alib2std/src/extensions/map.hpp index fb96d53c91..ac1772348a 100644 --- a/alib2std/src/extensions/map.hpp +++ b/alib2std/src/extensions/map.hpp @@ -8,6 +8,15 @@ #ifndef __MAP_HPP_ #define __MAP_HPP_ +#include <map> +#include <ostream> +#include <string> +#include <sstream> +#include <utility> + +#include "compare.hpp" +#include "pair.hpp" + namespace std { template< class T, class R, class ... Ts > diff --git a/alib2std/src/extensions/memory.hpp b/alib2std/src/extensions/memory.hpp index 7b3ad37004..c4882c7903 100644 --- a/alib2std/src/extensions/memory.hpp +++ b/alib2std/src/extensions/memory.hpp @@ -8,6 +8,14 @@ #ifndef __MEMORY_HPP_ #define __MEMORY_HPP_ +#include <memory> +#include <type_traits> +#include <utility> + +#include "compare.hpp" +#include "type_traits.hpp" +#include "clone.hpp" + namespace std { template < typename T, typename Enable = void > diff --git a/alib2std/src/extensions/pair.hpp b/alib2std/src/extensions/pair.hpp index 6a439df77a..921ce06b93 100644 --- a/alib2std/src/extensions/pair.hpp +++ b/alib2std/src/extensions/pair.hpp @@ -8,6 +8,16 @@ #ifndef __PAIR_HPP_ #define __PAIR_HPP_ +#include <utility> +#include <type_traits> +#include <cstddef> +#include <string> +#include <sstream> + +#include "type_traits.hpp" +#include "utility.hpp" +#include "compare.hpp" + namespace std { template< class T, class R > diff --git a/alib2std/src/extensions/random.hpp b/alib2std/src/extensions/random.hpp index 76ba624729..16939d5dca 100644 --- a/alib2std/src/extensions/random.hpp +++ b/alib2std/src/extensions/random.hpp @@ -8,6 +8,9 @@ #ifndef __RANDOM_HPP_ #define __RANDOM_HPP_ +#include <random> +#include <limits> + namespace std { class random_devices { diff --git a/alib2std/src/extensions/set.hpp b/alib2std/src/extensions/set.hpp index 7e63e4b55c..6006e3171a 100644 --- a/alib2std/src/extensions/set.hpp +++ b/alib2std/src/extensions/set.hpp @@ -8,6 +8,13 @@ #ifndef __SET_HPP_ #define __SET_HPP_ +#include <set> +#include <ostream> +#include <string> +#include <sstream> + +#include "compare.hpp" + namespace std { template< class T, class ... Ts > diff --git a/alib2std/src/extensions/string.hpp b/alib2std/src/extensions/string.hpp index e8d2714698..c23d5a57da 100644 --- a/alib2std/src/extensions/string.hpp +++ b/alib2std/src/extensions/string.hpp @@ -8,6 +8,9 @@ #ifndef __STRING_HPP_ #define __STRING_HPP_ +#include <string> +#include "compare.hpp" + namespace std { template<typename... Ts> diff --git a/alib2std/src/extensions/tree.hpp b/alib2std/src/extensions/tree.hpp index 77cfe584c1..17a92b1070 100644 --- a/alib2std/src/extensions/tree.hpp +++ b/alib2std/src/extensions/tree.hpp @@ -8,6 +8,17 @@ #ifndef __TREE_HPP_ #define __TREE_HPP_ +#include <memory> +#include <vector> +#include <deque> +#include <iterator> +#include <string> +#include <sstream> + +#include "compare.hpp" +#include "iterator.hpp" +#include "tree_base.hpp" + namespace std { template < class T > diff --git a/alib2std/src/extensions/tree_base.hpp b/alib2std/src/extensions/tree_base.hpp index 2e14d6223f..c2578e028e 100644 --- a/alib2std/src/extensions/tree_base.hpp +++ b/alib2std/src/extensions/tree_base.hpp @@ -8,6 +8,9 @@ #ifndef __TREE_BASE_HPP_ #define __TREE_BASE_HPP_ +#include <tuple> +#include "tuple.hpp" + namespace std { template < class Data > diff --git a/alib2std/src/extensions/trie.hpp b/alib2std/src/extensions/trie.hpp index 9787a08761..66d6ffe203 100644 --- a/alib2std/src/extensions/trie.hpp +++ b/alib2std/src/extensions/trie.hpp @@ -8,6 +8,17 @@ #ifndef __TRIE_HPP_ #define __TRIE_HPP_ +#include <memory> +#include <map> +#include <tuple> +#include <iterator> +#include <string> +#include <sstream> + +#include "compare.hpp" +#include "pair.hpp" +#include "tuple.hpp" + namespace std { template < class Key, class Value > diff --git a/alib2std/src/extensions/tuple.hpp b/alib2std/src/extensions/tuple.hpp index 264a6e35e5..754ce7e4ca 100644 --- a/alib2std/src/extensions/tuple.hpp +++ b/alib2std/src/extensions/tuple.hpp @@ -8,6 +8,13 @@ #ifndef __TUPLE_HPP_ #define __TUPLE_HPP_ +#include <tuple> +#include <ostream> +#include <string> +#include <sstream> + +#include "compare.hpp" + namespace std { template<int I, class Tuple> diff --git a/alib2std/src/extensions/type_traits.hpp b/alib2std/src/extensions/type_traits.hpp index 73ff17cfb8..459bb5acfb 100644 --- a/alib2std/src/extensions/type_traits.hpp +++ b/alib2std/src/extensions/type_traits.hpp @@ -8,6 +8,8 @@ #ifndef __TYPE_TRAITS_HPP_ #define __TYPE_TRAITS_HPP_ +#include <type_traits> + namespace std { template<class T> diff --git a/alib2std/src/extensions/typeindex.h b/alib2std/src/extensions/typeindex.h index 7f5c0bcb67..332812aec3 100644 --- a/alib2std/src/extensions/typeindex.h +++ b/alib2std/src/extensions/typeindex.h @@ -8,6 +8,8 @@ #ifndef __TYPEINDEX_H_ #define __TYPEINDEX_H_ +#include <typeindex> + inline int operator -( const std::type_index & first, const std::type_index & second ) { return ( first < second ) ? -1 : ( first > second ) ? 1 : 0; } diff --git a/alib2std/src/extensions/typeinfo.cpp b/alib2std/src/extensions/typeinfo.cpp index 5f6e691b1e..70c866c5f1 100644 --- a/alib2std/src/extensions/typeinfo.cpp +++ b/alib2std/src/extensions/typeinfo.cpp @@ -21,4 +21,5 @@ namespace std { free ( demangled ); return res; } + } /* namespace std */ diff --git a/alib2std/src/extensions/typeinfo.hpp b/alib2std/src/extensions/typeinfo.hpp index 3cd4bcdc1d..4072683db2 100644 --- a/alib2std/src/extensions/typeinfo.hpp +++ b/alib2std/src/extensions/typeinfo.hpp @@ -8,6 +8,14 @@ #ifndef __TYPEINFO_HPP_ #define __TYPEINFO_HPP_ +#include <typeinfo> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <cxxabi.h> +#include <typeindex> +#include <string> + namespace std { string type_name(const std::type_info& type); diff --git a/alib2std/src/extensions/unordered_map.hpp b/alib2std/src/extensions/unordered_map.hpp index 96944ea382..f181df6eb0 100644 --- a/alib2std/src/extensions/unordered_map.hpp +++ b/alib2std/src/extensions/unordered_map.hpp @@ -8,6 +8,13 @@ #ifndef __UNORDERED_MAP_HPP_ #define __UNORDERED_MAP_HPP_ +#include <unordered_map> +#include <ostream> +#include <string> +#include <sstream> + +#include "compare.hpp" + namespace std { template< class T, class R, class ... Ts > diff --git a/alib2std/src/extensions/utility.hpp b/alib2std/src/extensions/utility.hpp index b0cf827314..768caf7682 100644 --- a/alib2std/src/extensions/utility.hpp +++ b/alib2std/src/extensions/utility.hpp @@ -8,6 +8,9 @@ #ifndef __UTILITY_HPP_ #define __UTILITY_HPP_ +#include <utility> +#include "type_traits.hpp" + namespace std { template < class T, typename std::enable_if < ! std::has_clone < T >::value >::type * = nullptr > diff --git a/alib2std/src/extensions/variant.hpp b/alib2std/src/extensions/variant.hpp index e7a6e82be6..6f3aaac487 100644 --- a/alib2std/src/extensions/variant.hpp +++ b/alib2std/src/extensions/variant.hpp @@ -11,6 +11,17 @@ #ifndef __VATIANT_HPP_ #define __VATIANT_HPP_ +#include <iostream> +#include <utility> +#include <typeinfo> +#include <type_traits> +#include <string> +#include <cstring> +#include <sstream> + +#include "compare.hpp" +#include "type_traits.hpp" + namespace std { template <size_t arg1, size_t ... others> diff --git a/alib2std/src/extensions/vector.hpp b/alib2std/src/extensions/vector.hpp index 09bb51c568..4e37db0b32 100644 --- a/alib2std/src/extensions/vector.hpp +++ b/alib2std/src/extensions/vector.hpp @@ -8,6 +8,13 @@ #ifndef __VECTOR_HPP_ #define __VECTOR_HPP_ +#include <vector> +#include <ostream> +#include <string> +#include <sstream> + +#include "compare.hpp" + namespace std { template< class T , class ... Ts > diff --git a/alib2std/src/fdstream b/alib2std/src/fdstream index 987552b73c..76662c0182 100644 --- a/alib2std/src/fdstream +++ b/alib2std/src/fdstream @@ -1,11 +1,14 @@ -#ifndef __FDSTREAM_HEADER_WRAPPER_ -#define __FDSTREAM_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <unistd.h> -#include <fcntl.h> -#include <ostream> -#include <istream> -#include <array> -#include "extensions/fdstream.hpp" + #ifndef __FDSTREAM_HEADER_WRAPPER_ + #define __FDSTREAM_HEADER_WRAPPER_ -#endif /* __FDSTREAM_HEADER_WRAPPER_ */ + #include "extensions/fdstream.hpp" + + #endif /* __FDSTREAM_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/foreach b/alib2std/src/foreach index b7b651779b..7e09786bbb 100644 --- a/alib2std/src/foreach +++ b/alib2std/src/foreach @@ -1,9 +1,14 @@ -#ifndef __FOREACH_HEADER_WRAPPER_ -#define __FOREACH_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include "tuple" -#include "utility" -#include "extensions/foreach.hpp" + #ifndef __FOREACH_HEADER_WRAPPER_ + #define __FOREACH_HEADER_WRAPPER_ -#endif /* __FOREACH_HEADER_WRAPPER_ */ + #include "extensions/foreach.hpp" + #endif /* __FOREACH_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/forward_list b/alib2std/src/forward_list index 396fdbc2ec..1004f0fe32 100644 --- a/alib2std/src/forward_list +++ b/alib2std/src/forward_list @@ -1,12 +1,16 @@ -#ifndef __LIST_HEADER_WRAPPER_ -#define __LIST_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../forward_list> -#include <ostream> -#include "compare" -#include "string" -#include "sstream" -#include "extensions/forward_list.hpp" + #ifndef __LIST_HEADER_WRAPPER_ + #define __LIST_HEADER_WRAPPER_ -#endif /* __LIST_HEADER_WRAPPER_ */ + #include "extensions/forward_list.hpp" + #endif /* __LIST_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../forward_list> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/forward_tree b/alib2std/src/forward_tree index 10c1fbb67d..3055b577e2 100644 --- a/alib2std/src/forward_tree +++ b/alib2std/src/forward_tree @@ -1,15 +1,14 @@ -#ifndef __TREE_HEADER_WRAPPER_ -#define __TREE_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <memory> -#include <vector> -#include <deque> -#include <tuple> -#include "iterator" -#include "string" -#include "sstream" -#include "extensions/tree_base.hpp" -#include "extensions/forward_tree.hpp" + #ifndef __TREE_HEADER_WRAPPER_ + #define __TREE_HEADER_WRAPPER_ -#endif /* __TREE_HEADER_WRAPPER_ */ + #include "extensions/forward_tree.hpp" + #endif /* __TREE_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/hexavigesimal b/alib2std/src/hexavigesimal index 087b94ce5d..96c1d8e859 100644 --- a/alib2std/src/hexavigesimal +++ b/alib2std/src/hexavigesimal @@ -1,7 +1,14 @@ -#ifndef __HEXAVIGESIMAL_HEADER_WRAPPER_ -#define __HEXAVIGESIMAL_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include "string" -#include "extensions/hexavigesimal.h" + #ifndef __HEXAVIGESIMAL_HEADER_WRAPPER_ + #define __HEXAVIGESIMAL_HEADER_WRAPPER_ -#endif /* __HEXAVIGESIMAL_HEADER_WRAPPER_ */ + #include "extensions/hexavigesimal.h" + + #endif /* __HEXAVIGESIMAL_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/iostream b/alib2std/src/iostream index c3ec70a438..a7e4d85991 100644 --- a/alib2std/src/iostream +++ b/alib2std/src/iostream @@ -1,8 +1,16 @@ -#ifndef __IOSTREAM_HEADER_WRAPPER_ -#define __IOSTREAM_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../iostream> -#include "fdstream" -#include "extensions/iostream.hpp" + #ifndef __IOSTREAM_HEADER_WRAPPER_ + #define __IOSTREAM_HEADER_WRAPPER_ -#endif /* __IOSTREAM_HEADER_WRAPPER_ */ + #include "extensions/iostream.hpp" + + #endif /* __IOSTREAM_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../iostream> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/istream b/alib2std/src/istream index 7a7d7ffc5d..f9b8163622 100644 --- a/alib2std/src/istream +++ b/alib2std/src/istream @@ -1,7 +1,16 @@ -#ifndef __ISTREAM_HEADER_WRAPPER_ -#define __ISTREAM_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../istream> -#include "extensions/istream.h" + #ifndef __ISTREAM_HEADER_WRAPPER_ + #define __ISTREAM_HEADER_WRAPPER_ -#endif /* __ISTREAM_HEADER_WRAPPER_ */ + #include "extensions/istream.h" + + #endif /* __ISTREAM_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../istream> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/iterator b/alib2std/src/iterator index a843ead466..9313e7049e 100644 --- a/alib2std/src/iterator +++ b/alib2std/src/iterator @@ -1,7 +1,16 @@ -#ifndef __ITERATOR_HEADER_WRAPPER_ -#define __ITERATOR_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../iterator> -#include "extensions/iterator.hpp" + #ifndef __ITERATOR_HEADER_WRAPPER_ + #define __ITERATOR_HEADER_WRAPPER_ -#endif /* __ITERATOR_HEADER_WRAPPER_ */ + #include "extensions/iterator.hpp" + + #endif /* __ITERATOR_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../iterator> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/linear_set b/alib2std/src/linear_set index 22b44abe30..bbfbc8c45b 100644 --- a/alib2std/src/linear_set +++ b/alib2std/src/linear_set @@ -1,13 +1,14 @@ -#ifndef __LINEAR_SET_HEADER_WRAPPER_ -#define __LINEAR_SET_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../vector> -#include <ostream> -#include "compare" -#include "string" -#include "sstream" -#include "algorithm" -#include "extensions/linear_set.hpp" + #ifndef __LINEAR_SET_HEADER_WRAPPER_ + #define __LINEAR_SET_HEADER_WRAPPER_ -#endif /* __LINEAR_SET_HEADER_WRAPPER_ */ + #include "extensions/linear_set.hpp" + #endif /* __LINEAR_SET_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/list b/alib2std/src/list index de1e5ce650..159ee14f66 100644 --- a/alib2std/src/list +++ b/alib2std/src/list @@ -1,12 +1,16 @@ -#ifndef __LIST_HEADER_WRAPPER_ -#define __LIST_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../list> -#include <ostream> -#include "compare" -#include "string" -#include "sstream" -#include "extensions/list.hpp" + #ifndef __LIST_HEADER_WRAPPER_ + #define __LIST_HEADER_WRAPPER_ -#endif /* __LIST_HEADER_WRAPPER_ */ + #include "extensions/list.hpp" + #endif /* __LIST_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../list> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/map b/alib2std/src/map index 4579636abe..8871a1e118 100644 --- a/alib2std/src/map +++ b/alib2std/src/map @@ -1,13 +1,16 @@ -#ifndef __MAP_HEADER_WRAPPER_ -#define __MAP_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../map> -#include <ostream> -#include "compare" -#include "string" -#include "sstream" -#include "pair" -#include "extensions/map.hpp" + #ifndef __MAP_HEADER_WRAPPER_ + #define __MAP_HEADER_WRAPPER_ -#endif /* __MAP_HEADER_WRAPPER_ */ + #include "extensions/map.hpp" + #endif /* __MAP_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../map> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/memory b/alib2std/src/memory index 07466a1905..501cb904eb 100644 --- a/alib2std/src/memory +++ b/alib2std/src/memory @@ -1,10 +1,16 @@ -#ifndef __MEMORY_HEADER_WRAPPER_ -#define __MEMORY_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../memory> -#include <type_traits> -#include "compare" -#include "clone" -#include "extensions/memory.hpp" + #ifndef __MEMORY_HEADER_WRAPPER_ + #define __MEMORY_HEADER_WRAPPER_ -#endif /* __MEMORY_HEADER_WRAPPER_ */ + #include "extensions/memory.hpp" + + #endif /* __MEMORY_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../memory> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/pair b/alib2std/src/pair index 61bfe3bfd0..8c18cf25b6 100644 --- a/alib2std/src/pair +++ b/alib2std/src/pair @@ -1,10 +1,14 @@ -#ifndef __PAIR_HEADER_WRAPPER_ -#define __PAIR_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include "utility" -#include "string" -#include "sstream" -#include "extensions/pair.hpp" + #ifndef __PAIR_HEADER_WRAPPER_ + #define __PAIR_HEADER_WRAPPER_ -#endif /* __PAIR_HEADER_WRAPPER_ */ + #include "extensions/pair.hpp" + #endif /* __PAIR_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/random b/alib2std/src/random index 90692dbafa..12d94bf5f8 100644 --- a/alib2std/src/random +++ b/alib2std/src/random @@ -1,8 +1,16 @@ -#ifndef __RANDOM_HEADER_WRAPPER_ -#define __RANDOM_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../random> -#include "limits" -#include "extensions/random.hpp" + #ifndef __RANDOM_HEADER_WRAPPER_ + #define __RANDOM_HEADER_WRAPPER_ -#endif /* __RANDOM_HEADER_WRAPPER_ */ + #include "extensions/random.hpp" + + #endif /* __RANDOM_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../random> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/set b/alib2std/src/set index dd984bbcbd..12d9d8c321 100644 --- a/alib2std/src/set +++ b/alib2std/src/set @@ -1,12 +1,16 @@ -#ifndef __SET_HEADER_WRAPPER_ -#define __SET_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../set> -#include <ostream> -#include "compare" -#include "string" -#include "sstream" -#include "extensions/set.hpp" + #ifndef __SET_HEADER_WRAPPER_ + #define __SET_HEADER_WRAPPER_ -#endif /* __SET_HEADER_WRAPPER_ */ + #include "extensions/set.hpp" + #endif /* __SET_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../set> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/string b/alib2std/src/string index 811fb6c3d9..73736c7089 100644 --- a/alib2std/src/string +++ b/alib2std/src/string @@ -1,23 +1,30 @@ -#ifndef __STRING_HEADER_WRAPPER_ -#define __STRING_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#define stoi stoi__private -#define stol stol__private -#define stoll stoll__private -#define stoul stoul__private -#define stoull stoull__private -#define to_string to_string__private + #ifndef __STRING_HEADER_WRAPPER_ + #define __STRING_HEADER_WRAPPER_ -#include <bits/../string> + #include "extensions/string.hpp" -#undef stoi -#undef stol -#undef stoll -#undef stoul -#undef stoull -#undef to_string + #endif /* __STRING_HEADER_WRAPPER_ */ -#include "compare" -#include "extensions/string.hpp" + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else -#endif /* __STRING_HEADER_WRAPPER_ */ + #define stoi stoi__private + #define stol stol__private + #define stoll stoll__private + #define stoul stoul__private + #define stoull stoull__private + #define to_string to_string__private + + #include <bits/../string> + + #undef stoi + #undef stol + #undef stoll + #undef stoul + #undef stoull + #undef to_string + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/tree b/alib2std/src/tree index c6794dd053..ad4feaeed1 100644 --- a/alib2std/src/tree +++ b/alib2std/src/tree @@ -1,15 +1,14 @@ -#ifndef __TREE_HEADER_WRAPPER_ -#define __TREE_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <memory> -#include <vector> -#include <deque> -#include <tuple> -#include "iterator" -#include "string" -#include "sstream" -#include "extensions/tree_base.hpp" -#include "extensions/tree.hpp" + #ifndef __TREE_HEADER_WRAPPER_ + #define __TREE_HEADER_WRAPPER_ -#endif /* __TREE_HEADER_WRAPPER_ */ + #include "extensions/tree.hpp" + #endif /* __TREE_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/trie b/alib2std/src/trie index 6f13b86f9b..014df07d80 100644 --- a/alib2std/src/trie +++ b/alib2std/src/trie @@ -1,14 +1,14 @@ -#ifndef __TRIE_HEADER_WRAPPER_ -#define __TRIE_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <memory> -#include <map> -#include <deque> -#include <tuple> -#include "iterator" -#include "string" -#include "sstream" -#include "extensions/trie.hpp" + #ifndef __TRIE_HEADER_WRAPPER_ + #define __TRIE_HEADER_WRAPPER_ -#endif /* __TRIE_HEADER_WRAPPER_ */ + #include "extensions/trie.hpp" + #endif /* __TRIE_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/tuple b/alib2std/src/tuple index bc7152e358..d3b5f452c2 100644 --- a/alib2std/src/tuple +++ b/alib2std/src/tuple @@ -1,12 +1,16 @@ -#ifndef __TUPLE_HEADER_WRAPPER_ -#define __TUPLE_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../tuple> -#include <ostream> -#include "compare" -#include "string" -#include "sstream" -#include "extensions/tuple.hpp" + #ifndef __TUPLE_HEADER_WRAPPER_ + #define __TUPLE_HEADER_WRAPPER_ -#endif /* __TUPLE_HEADER_WRAPPER_ */ + #include "extensions/tuple.hpp" + #endif /* __TUPLE_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../tuple> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/type_traits b/alib2std/src/type_traits index c612cf162b..8097e0371d 100644 --- a/alib2std/src/type_traits +++ b/alib2std/src/type_traits @@ -1,7 +1,16 @@ -#ifndef __TYPE_TRAITS_HEADER_WRAPPER_ -#define __TYPE_TRAITS_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../type_traits> -#include "extensions/type_traits.hpp" + #ifndef __TYPE_TRAITS_HEADER_WRAPPER_ + #define __TYPE_TRAITS_HEADER_WRAPPER_ -#endif /* __TYPE_TRAITS_HEADER_WRAPPER_ */ + #include "extensions/type_traits.hpp" + + #endif /* __TYPE_TRAITS_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../type_traits> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/typeindex b/alib2std/src/typeindex index 3e7f2c6bdb..6253e0e03f 100644 --- a/alib2std/src/typeindex +++ b/alib2std/src/typeindex @@ -1,7 +1,16 @@ -#ifndef __TYPEINDEX_HEADER_WRAPPER_ -#define __TYPEINDEX_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../typeindex> -#include "extensions/typeindex.h" + #ifndef __TYPEINDEX_HEADER_WRAPPER_ + #define __TYPEINDEX_HEADER_WRAPPER_ -#endif /* __TYPEINDEX_HEADER_WRAPPER_ */ + #include "extensions/typeindex.h" + + #endif /* __TYPEINDEX_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../typeindex> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/typeinfo b/alib2std/src/typeinfo index 323f08415b..de9b8adc05 100644 --- a/alib2std/src/typeinfo +++ b/alib2std/src/typeinfo @@ -1,13 +1,16 @@ -#ifndef __TYPEINFO_HEADER_WRAPPER_ -#define __TYPEINFO_HEADER_WRAPPER_ - -#include <bits/../typeinfo> -#include <cstdio> -#include <cstdlib> -#include <cstring> -#include <cxxabi.h> -#include "typeindex" -#include <string> -#include "extensions/typeinfo.hpp" - -#endif /* __TYPEINFO_HEADER_WRAPPER_ */ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ + + #ifndef __TYPEINFO_HEADER_WRAPPER_ + #define __TYPEINFO_HEADER_WRAPPER_ + + #include "extensions/typeinfo.hpp" + + #endif /* __TYPEINFO_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../typeinfo> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/unordered_map b/alib2std/src/unordered_map index 5c8897dfe8..c0f626797b 100644 --- a/alib2std/src/unordered_map +++ b/alib2std/src/unordered_map @@ -1,12 +1,16 @@ -#ifndef __UNORDERED_MAP_HEADER_WRAPPER_ -#define __UNORDERED_MAP_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../unordered_map> -#include <ostream> -#include "compare" -#include "string" -#include "sstream" -#include "extensions/unordered_map.hpp" + #ifndef __UNORDERED_MAP_HEADER_WRAPPER_ + #define __UNORDERED_MAP_HEADER_WRAPPER_ -#endif /* __UNORDERED_MAP_HEADER_WRAPPER_ */ + #include "extensions/unordered_map.hpp" + #endif /* __UNORDERED_MAP_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../unordered_map> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/utility b/alib2std/src/utility index 4ff6cbc171..c4a542d3d1 100644 --- a/alib2std/src/utility +++ b/alib2std/src/utility @@ -1,9 +1,16 @@ -#ifndef __UTILITY_HEADER_WRAPPER_ -#define __UTILITY_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../utility> -#include <cstddef> -#include "extensions/utility.hpp" + #ifndef __UTILITY_HEADER_WRAPPER_ + #define __UTILITY_HEADER_WRAPPER_ -#endif /* __UTILITY_HEADER_WRAPPER_ */ + #include "extensions/utility.hpp" + #endif /* __UTILITY_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../utility> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/variant b/alib2std/src/variant index ebf5855e77..6fa4554616 100644 --- a/alib2std/src/variant +++ b/alib2std/src/variant @@ -1,14 +1,14 @@ -#ifndef __VATIANT_HEADER_WRAPPER_ -#define __VATIANT_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <iostream> -#include <utility> -#include <typeinfo> -#include "type_traits" -#include "compare" -#include "string" -#include "sstream" -#include "extensions/variant.hpp" + #ifndef __VATIANT_HEADER_WRAPPER_ + #define __VATIANT_HEADER_WRAPPER_ -#endif /* __VARIANT_HEADER_WRAPPER */ + #include "extensions/variant.hpp" + #endif /* __VARIANT_HEADER_WRAPPER */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/src/vector b/alib2std/src/vector index 7a8a5c80da..e4e751567e 100644 --- a/alib2std/src/vector +++ b/alib2std/src/vector @@ -1,12 +1,16 @@ -#ifndef __VECTOR_HEADER_WRAPPER_ -#define __VECTOR_HEADER_WRAPPER_ +#ifndef __ALIB_INTERNAL_STD_EXTENSION_ + #define __ALIB_INTERNAL_STD_EXTENSION_ -#include <bits/../vector> -#include <ostream> -#include "compare" -#include "string" -#include "sstream" -#include "extensions/vector.hpp" + #ifndef __VECTOR_HEADER_WRAPPER_ + #define __VECTOR_HEADER_WRAPPER_ -#endif /* __VECTOR_HEADER_WRAPPER_ */ + #include "extensions/vector.hpp" + #endif /* __VECTOR_HEADER_WRAPPER_ */ + + #undef __ALIB_INTERNAL_STD_EXTENSION_ +#else + + #include <bits/../vector> + +#endif /* __ALIB_INTERNAL_STD_EXTENSION_ */ diff --git a/alib2std/test-src/extensions/SharedPtrTest.cpp b/alib2std/test-src/extensions/SharedPtrTest.cpp index 9d5b90c7b6..bcf5b95ded 100644 --- a/alib2std/test-src/extensions/SharedPtrTest.cpp +++ b/alib2std/test-src/extensions/SharedPtrTest.cpp @@ -1,5 +1,6 @@ #include "SharedPtrTest.h" #include <memory> +#include <utility> CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( SharedPtrTest, "bits" ); CPPUNIT_TEST_SUITE_REGISTRATION( SharedPtrTest ); diff --git a/alib2str/src/regexp/RegExpFromStringParser.h b/alib2str/src/regexp/RegExpFromStringParser.h index 044744d392..28be3242dd 100644 --- a/alib2str/src/regexp/RegExpFromStringParser.h +++ b/alib2str/src/regexp/RegExpFromStringParser.h @@ -13,6 +13,7 @@ #include <set> #include <memory> +#include <utility> namespace regexp { -- GitLab