Closed kongdd closed 2 years ago
__PRETTY_FUNCTION__ not being usable in constexpr is a problem in GCC before version 8.1 or so; if possible, update to a later version of GCC (e.g. I have success on GCC 10.2 https://godbolt.org/z/hK184h but fails with your same error if I select GCC 7.5).
If not possible then note that getTypeView is how RareCpp gets types as strings - you may or may not be able to find an alternative method for getting the type strings in earlier versions of GCC; if you can live without constexpr type names you can replace the #if #else's there with just view = "unknown";
and maybe put some similar non-constexpr logic using __PRETTY_FUNCTION__ in TypeToStr for wherever you need to use it.
Thanks for your quick response. I will have a try.
Thank you. Indeed, Reflect.h
works well for GCC higher than version 8.1.
When changed ubuntu v18.04 into v20.04, the error disappears.
https://github.com/kongdd/hello.R/actions/runs/1795099938
Thanks for your awesome work!
I am trying to use
Reflect.h
in R (https://github.com/kongdd/hello.R/blob/master/src/test-reflect.cpp). However, failed in ubuntu-18.04. Any idea how to solve this issue?https://github.com/kongdd/hello.R/runs/5064647738?check_suite_focus=true