Skip to content

Conversation

@ChaseOne1
Copy link
Contributor

@ChaseOne1 ChaseOne1 commented Dec 10, 2025

rt, there are some information of this PR:

Code:

// In main.hh
#pragma once

struct Pos
{
    int x, y;
};

#include "mirrow/srefl/srefl_begin.hpp"
srefl_class(Pos,
    fields(
        field(&Pos::x),
        field(&Pos::y)
    )
)
#include "mirrow/srefl/srefl_end.hpp"

// In main.cc
#include <iostream>
#include <main.hh>
int main()
{
    // auto refl = mirrow::srefl::reflect<Pos>();
    // std::cout << refl.name() << std::endl;
    return 0;
}

Error:

> make
g++ main.cc -o main.exe  -std=c++17 -I ./mirrow/mirrow
...
./mirrow/mirrow/mirrow/srefl/srefl_begin.hpp:11:12: error: 'type_info' is not a class template
   11 |     struct type_info<type> : base_type_info<type> { \
      |            ^~~~~~~~~

Compiler:
g++.exe (x86_64-win32-seh-rev2, Built by MinGW-Builds project) 14.2.0

Changes:
include the 'reflect.hpp' in srefl_begin.hpp

Updated paths in documentation to correct test and source directory references.
Added include directive for reflect.hpp in srefl_begin.hpp
@VisualGMQ VisualGMQ self-requested a review December 10, 2025 10:25
@VisualGMQ VisualGMQ merged commit 699bff0 into VisualGMQ:main Dec 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants