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

[Android][GCC 4.7] Compilation errors induced by constexpr #77

Closed
ghost opened this issue Apr 28, 2013 · 1 comment
Closed

[Android][GCC 4.7] Compilation errors induced by constexpr #77

ghost opened this issue Apr 28, 2013 · 1 comment
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Apr 28, 2013

Android NDK r8e with GCC 4.7 toolchain (latest version) seems to have problems with constexpr in GLM:

In file included from glm-0.9.4.0/glm/gtx/../gtc/constants.hpp:184:0,
                 from glm-0.9.4.0/glm/gtx/constants.hpp:27,
glm-0.9.4.0/glm/gtx/../gtc/constants.inl: In function 'constexpr T glm::epsilon() [with T = glm::detail::half]':
glm-0.9.4.0/glm/gtx/../gtc/constants.inl:38:40: error: invalid return type 'glm::half {aka glm::detail::half}' of constexpr function 'constexpr T glm::epsilon() [with T = glm::detail::half]'
In file included from glm-0.9.4.0/glm/./core/type.hpp:32:0,
                 from glm-0.9.4.0/glm/glm.hpp:98,
glm-0.9.4.0/glm/./core/type_half.hpp:42:8: note: 'glm::detail::half' is not literal because:
glm-0.9.4.0/glm/./core/type_half.hpp:42:8: note:   'glm::detail::half' is not an aggregate, does not have a trivial default constructor, and has no constexpr constructor that is not a copy or move constructor

I am not sure what is the cause of that, maybe even a bug in stdlib shipped with that version of NDK (still stdlib's code looks constexpr-ready). The fact is that removing constexpr in GLM (#define GLM_CONSTEXPR) solves the problem. Anyway, this might be worth looking into.

@ghost
Copy link
Author

ghost commented Apr 28, 2013

I'm sorry, I didn't check the latest version from Git repo - this is fixed already. Please close that bug, sorry for your trouble.

@ghost ghost assigned Groovounet Apr 29, 2013
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

1 participant