| 915 | |
| 916 | template <typename T> |
| 917 | class 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> |
nothing calls this directly
no test coverage detected