Skip to content
New issue

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

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

Already on GitHub? # to your account

constexpr tvec4<T, P>::tvec4 #556

Closed
ma30002000 opened this issue Sep 30, 2016 · 3 comments
Closed

constexpr tvec4<T, P>::tvec4 #556

ma30002000 opened this issue Sep 30, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@ma30002000
Copy link

ma30002000 commented Sep 30, 2016

In GLM 0.9.8.1,

template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::tvec4(A a, B b, C c, D d)

should rather be declared

template
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec4::tvec4(A a, B b, C c, D d) :

since no SIMD implementation actually exists, allowing the ctor to be used in constexprs when GLM_ARCH != GLM_ARCH_PURE

@patrikhuber
Copy link

I'm getting a very similar error with glm-0.9.8.1 as well as the latest master branch, however, only when GLM_FORCE_UNRESTRICTED_GENTYPE is defined:

Severity    Code    Description Project File    Line    Suppression State
Error   C2475   'glm::tvec4<float,glm::aligned_lowp>::tvec4': redefinition; 'constexpr' specifier mismatch  glm-0.9.8.1\glm\detail\type_vec4_simd.inl   344 
Error   C2475   'glm::tvec4<float,glm::aligned_mediump>::tvec4': redefinition; 'constexpr' specifier mismatch   glm-0.9.8.1\glm\detail\type_vec4_simd.inl   351 
Error   C2475   'glm::tvec4<float,3>::tvec4': redefinition; 'constexpr' specifier mismatch  glm-0.9.8.1\glm\detail\type_vec4_simd.inl   358 

These are the lines:
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_lowp>::tvec4()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_mediump>::tvec4()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_highp>::tvec4()

I wonder why it's parsing type_vec4_simd.inl at all, I'm using the default flags/defines, no SSE or anything.

@patrikhuber
Copy link

Possibly related: #555. I'm on VS2015U3 as well.

@Groovounet Groovounet added the bug label Oct 10, 2016
@Groovounet Groovounet added this to the GLM 0.9.8 milestone Oct 10, 2016
@Groovounet Groovounet self-assigned this Oct 10, 2016
@Groovounet
Copy link
Member

This issue should be fixed in GLM 0.9.8 and master branches.

Thanks for reporting,
Christophe

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants