Implemented some measures to reduce the compile time; #86 (#120)

This commit is contained in:
Dr. Patrick Urbanke (劉自成)
2024-06-15 00:26:05 +02:00
committed by GitHub
parent 41872c48e4
commit e36994084d
17 changed files with 629 additions and 571 deletions
+4 -2
View File
@@ -1,3 +1,5 @@
#include <gtest/gtest.h>
#include <cassert>
#include <iostream>
#include <rfl.hpp>
@@ -5,8 +7,6 @@
#include "rfl/internal/num_fields.hpp"
#include <gtest/gtest.h>
namespace test_inheritance2 {
struct EmptyBase1 {};
@@ -30,6 +30,7 @@ struct EmptyDerived1 : EmptyBase1, BaseX {};
struct EmptyDerived2 : EmptyBase1, EmptyBase2, BaseX {};
TEST(json, test_inheritance2) {
#ifdef REFLECT_CPP_C_ARRAYS_OR_INHERITANCE
Derived1 derived1;
const auto derived1_view = rfl::to_view(derived1);
static_assert(derived1_view.size() == 2);
@@ -51,6 +52,7 @@ TEST(json, test_inheritance2) {
static_assert(empty_derived0_view.size() == 2);
EXPECT_TRUE(true);
#endif
}
} // namespace test_inheritance2