]> git.ameliathe1st.gay Git - voyage-au-centre-des-fichiers.git/commitdiff
Removed constexpr for the *, -> and [] operators, and get_virt_addr, of phys_ptr...
authorAmelia Coutard <eliottulio.coutard@gmail.com>
Thu, 12 May 2022 11:05:17 +0000 (13:05 +0200)
committerAmelia Coutard <eliottulio.coutard@gmail.com>
Thu, 12 May 2022 11:10:43 +0000 (13:10 +0200)
src/phys_ptr.hpp

index f614de8821b26534f7f7ac66882b3f066a9c6d36..1e5cb35fd73176bb507e91125b165dfdc9ebe273 100644 (file)
@@ -12,13 +12,13 @@ public:
        constexpr explicit phys_ptr(std::uintptr_t phys_addr): phys_addr(phys_addr) {}
        constexpr phys_ptr(std::nullptr_t): phys_addr(0) {}
 
-       constexpr T& operator[](std::size_t i) const {
+       T& operator[](std::size_t i) const {
                return get_virt_addr()[i];
        }
-       constexpr T& operator*() const {
+       T& operator*() const {
                return *get_virt_addr();
        }
-       constexpr T* operator->() const {
+       T* operator->() const {
                return get_virt_addr();
        }
 
@@ -68,7 +68,7 @@ public:
        }
 
 private:
-       constexpr T* get_virt_addr() const {
+       T* get_virt_addr() const {
                return reinterpret_cast<T*>(phys_addr + 0xFFFF800000000000);
        }