Просмотр исходного кода

test: avoid using ENTT_NOEXCEPT in the test suite

Michele Caini 3 лет назад
Родитель
Сommit
584cfdf64c

+ 4 - 4
test/entt/common/tracked_memory_resource.hpp

@@ -25,7 +25,7 @@ class tracked_memory_resource: public std::pmr::memory_resource {
         std::pmr::get_default_resource()->deallocate(value, bytes, alignment);
     }
 
-    bool do_is_equal(const std::pmr::memory_resource &other) const ENTT_NOEXCEPT override {
+    bool do_is_equal(const std::pmr::memory_resource &other) const noexcept override {
         return (this == &other);
     }
 
@@ -39,15 +39,15 @@ public:
         : alloc_counter{},
           dealloc_counter{} {}
 
-    size_type do_allocate_counter() const ENTT_NOEXCEPT {
+    size_type do_allocate_counter() const noexcept {
         return alloc_counter;
     }
 
-    size_type do_deallocate_counter() const ENTT_NOEXCEPT {
+    size_type do_deallocate_counter() const noexcept {
         return dealloc_counter;
     }
 
-    void reset() ENTT_NOEXCEPT {
+    void reset() noexcept {
         alloc_counter = 0u;
         dealloc_counter = 0u;
     }

+ 2 - 2
test/entt/core/compressed_pair.cpp

@@ -23,10 +23,10 @@ struct move_only_type {
     move_only_type(const move_only_type &) = delete;
     move_only_type &operator=(const move_only_type &) = delete;
 
-    move_only_type(move_only_type &&other) ENTT_NOEXCEPT
+    move_only_type(move_only_type &&other) noexcept
         : value{std::exchange(other.value, nullptr)} {}
 
-    move_only_type &operator=(move_only_type &&other) ENTT_NOEXCEPT {
+    move_only_type &operator=(move_only_type &&other) noexcept {
         delete value;
         value = std::exchange(other.value, nullptr);
         return *this;

+ 1 - 1
test/entt/core/type_info.cpp

@@ -8,7 +8,7 @@
 
 template<>
 struct entt::type_name<float> final {
-    [[nodiscard]] static constexpr std::string_view value() ENTT_NOEXCEPT {
+    [[nodiscard]] static constexpr std::string_view value() noexcept {
         return std::string_view{""};
     }
 };

+ 4 - 4
test/entt/entity/storage.cpp

@@ -40,11 +40,11 @@ struct update_from_destructor {
         : storage{&ref},
           target{other} {}
 
-    update_from_destructor(update_from_destructor &&other) ENTT_NOEXCEPT
+    update_from_destructor(update_from_destructor &&other) noexcept
         : storage{std::exchange(other.storage, nullptr)},
           target{std::exchange(other.target, entt::null)} {}
 
-    update_from_destructor &operator=(update_from_destructor &&other) ENTT_NOEXCEPT {
+    update_from_destructor &operator=(update_from_destructor &&other) noexcept {
         storage = std::exchange(other.storage, nullptr);
         target = std::exchange(other.target, entt::null);
         return *this;
@@ -69,8 +69,8 @@ struct create_from_constructor {
         }
     }
 
-    create_from_constructor(create_from_constructor &&other) ENTT_NOEXCEPT = default;
-    create_from_constructor &operator=(create_from_constructor &&other) ENTT_NOEXCEPT = default;
+    create_from_constructor(create_from_constructor &&other) noexcept = default;
+    create_from_constructor &operator=(create_from_constructor &&other) noexcept = default;
 
     entt::entity child;
 };

+ 2 - 2
test/entt/resource/resource.cpp

@@ -5,13 +5,13 @@
 struct base {
     virtual ~base() = default;
 
-    virtual const entt::type_info &type() const ENTT_NOEXCEPT {
+    virtual const entt::type_info &type() const noexcept {
         return entt::type_id<base>();
     }
 };
 
 struct derived: base {
-    const entt::type_info &type() const ENTT_NOEXCEPT override {
+    const entt::type_info &type() const noexcept override {
         return entt::type_id<derived>();
     }
 };

+ 3 - 3
test/example/custom_identifier.cpp

@@ -8,13 +8,13 @@ struct entity_id {
     using entity_type = std::uint32_t;
     static constexpr auto null = entt::null;
 
-    constexpr entity_id(entity_type value = null) ENTT_NOEXCEPT
+    constexpr entity_id(entity_type value = null) noexcept
         : entt{value} {}
 
-    constexpr entity_id(const entity_id &other) ENTT_NOEXCEPT
+    constexpr entity_id(const entity_id &other) noexcept
         : entt{other.entt} {}
 
-    constexpr operator entity_type() const ENTT_NOEXCEPT {
+    constexpr operator entity_type() const noexcept {
         return entt;
     }
 

+ 1 - 1
test/lib/meta_plugin_std/types.h

@@ -16,7 +16,7 @@ struct custom_type_hash;
 
 template<typename Type>
 struct entt::type_hash<Type> {
-    static constexpr entt::id_type value() ENTT_NOEXCEPT {
+    static constexpr entt::id_type value() noexcept {
         return custom_type_hash<Type>::value;
     }
 };