Skip to content

Commit

Permalink
NeatReflection now stores internally _why_ a class member is not unde…
Browse files Browse the repository at this point in the history
…rstood by NeatReflection. Updates #17
  • Loading branch information
FireFlyForLife committed Jun 23, 2024
1 parent 6b41432 commit 8b84917
Show file tree
Hide file tree
Showing 5 changed files with 224 additions and 143 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@ if(NOT ${CMAKE_GENERATOR} STREQUAL "Visual Studio 17 2022")
message(WARNING "[NeatReflection] Only the Visual Studio 17 2022 generator has support for modules. The current generator is: ${CMAKE_GENERATOR}")
endif()

cmake_policy(SET CMP0143 NEW) # USE_FOLDERS global property is treated as ON by default.
if(${CMP0143})
cmake_policy(SET CMP0143 NEW) # USE_FOLDERS global property is treated as ON by default.
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@
// State neccesairy to pass onto the next functions
struct RecursionContext
{
// Aliases
using TemplateArgumentSets = std::vector<std::vector<reflifc::Expression>>;

// Data
ifc::Environment* environment;
std::vector<std::vector<reflifc::Expression>> template_argument_sets;
TemplateArgumentSets template_argument_sets;

// Functions
std::pair<reflifc::Expression, RecursionContext> get_template_parameter(reflifc::Parameter parameter) const;
};
// Immutably pass the recursion context down to functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,8 @@ bool is_reference_type(reflifc::Declaration decl, RecursionContextArg ctx)

bool is_reference_type(reflifc::Type type, RecursionContextArg ctx)
{
ContextArea area_{ "While checking if the type is a reference type."sv };

switch (type.sort()) {
case ifc::TypeSort::LvalueReference:
case ifc::TypeSort::RvalueReference:
Expand Down
Loading

0 comments on commit 8b84917

Please sign in to comment.