Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C1202 on MSVC using sizeof(T) >= 256 Bytes #8

Open
MeyerFabian opened this issue Oct 4, 2018 · 3 comments
Open

C1202 on MSVC using sizeof(T) >= 256 Bytes #8

MeyerFabian opened this issue Oct 4, 2018 · 3 comments

Comments

@MeyerFabian
Copy link
Owner

MeyerFabian commented Oct 4, 2018

struct Particle {
  glm::dvec4 a;
  glm::dvec4 b;
  glm::dvec4 c;
  glm::dvec4 d;
  glm::dvec4 e;
  glm::dvec4 f;
  glm::dvec4 g;
  glm::dvec4 h; // 256Bytes
}

Particle particle = {};
boost::pfr::for_each_field(particle, [](const auto& field, std::size_t idx){
  size_t byte_of_field = sizeof(field);
}

throws: fatal error C1202: recursive type or function dependency context too complex

@MeyerFabian
Copy link
Owner Author

MeyerFabian commented Oct 4, 2018

4(/5) Options:

  1. Add another 3rd (C++ only) layer which completely forgoes reflection and take care your self, rework of buffers needed.
  2. Add Rawbuffer and fill information raw, which is even worse than 1. from a using perspective.
    • or fill mostly from a shader except for position+velocity+elastic def_grad (could be manageable)
  3. Split Buffers up to stay under 256 Bytes (easiest solution).
  4. (Use reflection-macro -> complete rework)

@MeyerFabian
Copy link
Owner Author

MeyerFabian commented Oct 5, 2018

mingw-w64 does not seem to support some of the c++17 features (std::execution, std::transform_reduce). Could have been an opt-out for when size critical.

@MeyerFabian
Copy link
Owner Author

MeyerFabian commented Oct 5, 2018

I dont think there is a nice solution w\o reworking everything. So i will split Buffers because it's the solution that still allows for easiest use and functionality. Also very easy to revert.

Will keep open for potential rework.

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

No branches or pull requests

1 participant