MCPcopy Create free account
hub / github.com/FastLED/FastLED / vector_psram

Class vector_psram

src/fl/stl/vector.h:917–966  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

915
916template <typename T>
917class vector_psram : public vector<T> {
918 public:
919 vector_psram() FL_NOEXCEPT
920 : vector<T>(psram_memory_resource()) {}
921
922 vector_psram(fl::size count, const T& value = T()) FL_NOEXCEPT
923 : vector<T>(count, value, psram_memory_resource()) {}
924
925 vector_psram(fl::initializer_list<T> init) FL_NOEXCEPT
926 : vector<T>(psram_memory_resource()) {
927 this->reserve_impl(init.size());
928 for (const auto& value : init) {
929 this->push_back(value);
930 }
931 }
932
933 // Iterator-range constructor
934 template <typename InputIterator,
935 typename = fl::enable_if_t<!fl::is_integral<InputIterator>::value>>
936 vector_psram(InputIterator first, InputIterator last) FL_NOEXCEPT
937 : vector<T>(psram_memory_resource()) {
938 for (auto it = first; it != last; ++it) {
939 this->push_back(*it);
940 }
941 }
942
943 vector_psram(const vector_psram& other) FL_NOEXCEPT
944 : vector<T>(psram_memory_resource()) {
945 this->copy_from(other);
946 }
947
948 vector_psram(vector_psram&& other) FL_NOEXCEPT
949 : vector<T>(psram_memory_resource()) {
950 this->move_from(other);
951 }
952
953 vector_psram& operator=(const vector_psram& other) FL_NOEXCEPT {
954 if (this != &other) {
955 this->copy_from(other);
956 }
957 return *this;
958 }
959
960 vector_psram& operator=(vector_psram&& other) FL_NOEXCEPT {
961 if (this != &other) {
962 this->move_assign(other);
963 }
964 return *this;
965 }
966};
967
968///////////////////////////////////////////////////////////////////////////////
969// SortedHeapVector — sorted wrapper around vector<T>

Callers

nothing calls this directly

Calls 2

copy_fromMethod · 0.80
move_assignMethod · 0.80

Tested by

no test coverage detected