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

Crash on failed lookup #23

Open
asutton opened this issue Apr 26, 2017 · 0 comments
Open

Crash on failed lookup #23

asutton opened this issue Apr 26, 2017 · 0 comments
Labels

Comments

@asutton
Copy link
Owner

asutton commented Apr 26, 2017

Here's a small example that triggers the crash.

#include <cppx/meta>
#include <cppx/compiler>

using namespace cppx::meta;

struct date {
  int y;
  int m;
  int d;

  virtual void f() { }
};

int main() {
  std::cout << $date::f.is_virtual() << '\n';
}

The problem is that std::cout is not in scope, and the compiler is trying to adjust the "typo". The crash comes from a failed transformation of a template argument.

I strongly suspect that this is because we are not forming the template argument to the constructor to the type of the reflection correctly. It probably needs an actual expression, not just an APInt as the argument.

@Jenny-fa Jenny-fa added the bug label Apr 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants