Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/tinystl/container/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ constexpr auto operator<=>(const array<T, N> &lhs, const array<T, N> &rhs) {
);
}

} // namespace tinystl
} // namespace tinystl
4 changes: 2 additions & 2 deletions source/tinystl/iterator/back_insert_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <utility>

#include "tinystl/iterator/iterator.h"
#include "tinystl/iterator/iterator_tag.h"

namespace tinystl {

Expand Down Expand Up @@ -47,4 +47,4 @@ back_insert_iterator<Container> back_inserter(Container &c) {
return back_insert_iterator<Container>(c);
}

} // namespace tinystl
} // namespace tinystl
4 changes: 2 additions & 2 deletions source/tinystl/iterator/front_insert_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <utility>

#include "tinystl/iterator/iterator.h"
#include "tinystl/iterator/iterator_tag.h"

namespace tinystl {

Expand Down Expand Up @@ -47,4 +47,4 @@ template <class Container>
front_insert_iterator<Container> front_inserter(Container &c) {
return front_insert_iterator<Container>(c);
}
} // namespace tinystl
} // namespace tinystl
4 changes: 2 additions & 2 deletions source/tinystl/iterator/insert_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <utility>

#include "tinystl/iterator/iterator.h"
#include "tinystl/iterator/iterator_tag.h"

namespace tinystl {
// https://en.cppreference.com/w/cpp/iterator/insert_iterator.html
Expand Down Expand Up @@ -49,4 +49,4 @@ inserter(Container &c, typename Container::iterator it) {
return insert_iterator<Container>(c, it);
}

} // namespace tinystl
} // namespace tinystl
2 changes: 1 addition & 1 deletion source/tinystl/iterator/iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ struct [[deprecated("deprecated")]] iterator {
using pointer = Pointer;
using reference = Reference;
};
} // namespace tinystl
} // namespace tinystl
2 changes: 1 addition & 1 deletion source/tinystl/iterator/iterator_tag.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ struct random_access_iterator_tag : public bidirectional_iterator_tag {};
struct contiguous_iterator_tag : public random_access_iterator_tag {};


} // namespace tinystl
} // namespace tinystl
6 changes: 3 additions & 3 deletions source/tinystl/iterator/iterator_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <iterator>

#include "tinystl/iterator/iterator_tag.h"
#include "tinystl/type_traits/composite_type_categories/is_object.h"
#include "tinystl/type_traits/type_properties/is_renferenceable.h"
#include "tinystl/type_traits/is_object.h"
#include "tinystl/type_traits/is_renferenceable.h"

// https://en.cppreference.com/w/cpp/iterator/iterator_tags.html
// https://en.cppreference.com/w/cpp/iterator/iterator_traits.html
Expand Down Expand Up @@ -229,4 +229,4 @@ struct [[deprecated("deprecated")]] iterator_traits<const T *> {
using reference = const T &;
};

} // namespace tinystl
} // namespace tinystl
2 changes: 1 addition & 1 deletion source/tinystl/iterator/reverse_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ reverse_iterator<Iter> make_reverse_iterator(Iter i) {
return reverse_iterator<Iter>(i);
}

} // namespace tinystl
} // namespace tinystl
8 changes: 4 additions & 4 deletions source/tinystl/memory.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <tinystl/memory/allocator/allocator.h>
#include <tinystl/memory/allocator/allocator_traits.h>
#include <tinystl/memory/miscellaneous/addressof.h>
#include <tinystl/memory/pointer_traits/pointer_traits.h>
#include <tinystl/memory/allocator.h>
#include <tinystl/memory/allocator_traits.h>
#include <tinystl/memory/addressof.h>
#include <tinystl/memory/pointer_traits.h>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "tinystl/type_traits/composite_type_categories/is_object.h"
#include "tinystl/type_traits/miscellaneous_transformations/enable_if.h"
#include "tinystl/type_traits/is_object.h"
#include "tinystl/type_traits/enable_if.h"

namespace tinystl {

Expand All @@ -16,4 +16,4 @@ template <class T>
typename enable_if<!is_object<T>::value, T *>::type addressof(T &arg) noexcept {
return &arg;
}
} // namespace tinystl
} // namespace tinystl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <limits>
#include <new>

#include "tinystl/type_traits/helper_classes/integral_constant.h"
#include "tinystl/type_traits/integral_constant.h"

namespace tinystl {
// https://en.cppreference.com/w/cpp/memory/allocator.html
Expand Down Expand Up @@ -90,4 +90,4 @@ bool operator!=(const allocator<T> &, const allocator<U> &) noexcept {
return false;
} // util c++20

} // namespace tinystl
} // namespace tinystl
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#pragma once

#include <utility>
#include <limits>

#include "tinystl/memory/pointer_traits/pointer_traits.h"
#include "tinystl/type_traits/miscellaneous_transformations/void_t.h"
#include "tinystl/type_traits/type_properties/is_empty.h"
#include "tinystl/type_traits/miscellaneous_transformations/enable_if.h"
#include "tinystl/type_traits/sign_modifiers/make_unsigned.h"

#include <memory>
#include "tinystl/memory/pointer_traits.h"
#include "tinystl/type_traits/void_t.h"
#include "tinystl/type_traits/is_empty.h"
#include "tinystl/type_traits/enable_if.h"
#include "tinystl/type_traits/make_unsigned.h"

// https://en.cppreference.com/w/cpp/memory/allocator_traits.html

Expand Down Expand Up @@ -290,4 +289,4 @@ struct allocator_traits {
}
};

} // namespace tinystl
} // namespace tinystl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#include <cstddef>

#include "tinystl/memory/miscellaneous/addressof.h"
#include "tinystl/type_traits/miscellaneous_transformations/conditional.h"
#include "tinystl/type_traits/miscellaneous_transformations/void_t.h"
#include "tinystl/type_traits/primary_type_categories/is_void.h"
#include "tinystl/memory/addressof.h"
#include "tinystl/type_traits/conditional.h"
#include "tinystl/type_traits/void_t.h"
#include "tinystl/type_traits/is_void.h"

namespace detail {

Expand Down
38 changes: 19 additions & 19 deletions source/tinystl/type_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@

// composite_type_categories

#include <tinystl/type_traits/composite_type_categories/is_arithmetic.h>
#include <tinystl/type_traits/composite_type_categories/is_member_pointer.h>
#include <tinystl/type_traits/composite_type_categories/is_object.h>
#include <tinystl/type_traits/composite_type_categories/is_scalar.h>
#include <tinystl/type_traits/is_arithmetic.h>
#include <tinystl/type_traits/is_member_pointer.h>
#include <tinystl/type_traits/is_object.h>
#include <tinystl/type_traits/is_scalar.h>

// const_volatility_specifiers
#include <tinystl/type_traits/const_volatility_specifiers/remove_cv.h>
#include <tinystl/type_traits/remove_cv.h>

// miscellaneous_transformations
#include <tinystl/type_traits/miscellaneous_transformations/conditional.h>
#include <tinystl/type_traits/miscellaneous_transformations/enable_if.h>
#include <tinystl/type_traits/miscellaneous_transformations/void_t.h>
#include <tinystl/type_traits/conditional.h>
#include <tinystl/type_traits/enable_if.h>
#include <tinystl/type_traits/void_t.h>

// primary_type_categories
#include <tinystl/type_traits/primary_type_categories/is_array.h>
#include <tinystl/type_traits/primary_type_categories/is_class.h>
#include <tinystl/type_traits/primary_type_categories/is_enum.h>
#include <tinystl/type_traits/primary_type_categories/is_floating_point.h>
#include <tinystl/type_traits/primary_type_categories/is_integral.h>
#include <tinystl/type_traits/primary_type_categories/is_null_pointer.h>
#include <tinystl/type_traits/primary_type_categories/is_pointer.h>
#include <tinystl/type_traits/primary_type_categories/is_union.h>
#include <tinystl/type_traits/primary_type_categories/is_void.h>
#include <tinystl/type_traits/is_array.h>
#include <tinystl/type_traits/is_class.h>
#include <tinystl/type_traits/is_enum.h>
#include <tinystl/type_traits/is_floating_point.h>
#include <tinystl/type_traits/is_integral.h>
#include <tinystl/type_traits/is_null_pointer.h>
#include <tinystl/type_traits/is_pointer.h>
#include <tinystl/type_traits/is_union.h>
#include <tinystl/type_traits/is_void.h>

// type_properties
#include <tinystl/type_traits/type_properties/is_empty.h>
#include <tinystl/type_traits/is_empty.h>

// type_relationships
#include <tinystl/type_traits/type_relationships/is_same.h>
#include <tinystl/type_traits/is_same.h>
Empty file.
22 changes: 0 additions & 22 deletions source/tinystl/type_traits/composite_type_categories/is_scalar.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ struct conditional<false, T, F> {

template <bool B, class T, class F>
using conditional_t = typename conditional<B, T, F>::type;
} // namespace tinystl
} // namespace tinystl
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ struct enable_if<true, T> {
template <bool B, class T = void>
using enable_if_t = typename enable_if<B, T>::type;

} // namespace tinystl
} // namespace tinystl
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ using bool_constant = integral_constant<bool, B>;
using true_type = integral_constant<bool, true>;
using false_type = integral_constant<bool, false>;

} // namespace tinystl
} // namespace tinystl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "tinystl/type_traits/helper_classes/integral_constant.h"
#include "tinystl/type_traits/primary_type_categories/is_floating_point.h"
#include "tinystl/type_traits/primary_type_categories/is_integral.h"
#include "tinystl/type_traits/integral_constant.h"
#include "tinystl/type_traits/is_floating_point.h"
#include "tinystl/type_traits/is_integral.h"

namespace tinystl {
template <class T>
Expand All @@ -12,4 +12,4 @@ struct is_arithmetic

template <class T>
inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value;
} // namespace tinystl
} // namespace tinystl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <cstddef>

#include "tinystl/type_traits/helper_classes/integral_constant.h"
#include "tinystl/type_traits/integral_constant.h"

namespace tinystl {

Expand All @@ -18,4 +18,4 @@ struct is_array<T[N]> : true_type {};
template <class T>
inline constexpr bool is_array_v = is_array<T>::value;

} // namespace tinystl
} // namespace tinystl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "tinystl/type_traits/helper_classes/integral_constant.h"
#include "tinystl/type_traits/primary_type_categories/is_union.h"
#include "tinystl/type_traits/integral_constant.h"
#include "tinystl/type_traits/is_union.h"

namespace detail {
template <class T>
Expand All @@ -22,4 +22,4 @@ struct is_class : decltype(detail::test<T>(nullptr)) {};
template <class T>
inline constexpr bool is_class_v = is_class<T>::value;

} // namespace tinystl
} // namespace tinystl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include "tinystl/type_traits/helper_classes/integral_constant.h"
#include "tinystl/type_traits/integral_constant.h"

namespace tinystl {
template <class T>
struct is_empty : bool_constant<__is_empty(T)> {};

template <class T>
inline constexpr bool is_empty_v = is_empty<T>::value;
} // namespace tinystl
} // namespace tinystl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "tinystl/type_traits/helper_classes/integral_constant.h"
#include "tinystl/type_traits/integral_constant.h"

namespace tinystl {

Expand All @@ -10,4 +10,4 @@ struct is_enum : tinystl::bool_constant<__is_enum(T)> {};
template <class T>
inline constexpr bool is_enum_v = is_enum<T>::value;

} // namespace tinystl
} // namespace tinystl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "tinystl/type_traits/const_volatility_specifiers/remove_cv.h"
#include "tinystl/type_traits/helper_classes/integral_constant.h"
#include "tinystl/type_traits/type_relationships/is_same.h"
#include "tinystl/type_traits/remove_cv.h"
#include "tinystl/type_traits/integral_constant.h"
#include "tinystl/type_traits/is_same.h"

namespace tinystl {
template <class T>
Expand All @@ -16,4 +16,4 @@ struct is_floating_point

template <class T>
inline constexpr bool is_floating_point_v = is_floating_point<T>::value;
} // namespace tinystl
} // namespace tinystl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "tinystl/type_traits/helper_classes/integral_constant.h"
#include "tinystl/type_traits/integral_constant.h"

namespace tinystl {
// Note: this implementation uses C++20 facilities
Expand All @@ -17,4 +17,4 @@ template <class T>
template <class T>
inline constexpr bool is_integral_v = is_integral<T>::value;

} // namespace tinystl
} // namespace tinystl
Loading
Loading