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

MSVC 2015U3 compile error in tvec4<T, P>::tvec4(ctor) #555

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

MSVC 2015U3 compile error in tvec4<T, P>::tvec4(ctor) #555

ma30002000 opened this issue Sep 30, 2016 · 9 comments

Comments

@ma30002000
Copy link

When updating GLM from 0.9.7.6 to 0.9.8.1, the following compile error occurs in MSVC 2015U3:
c:\devel\videosdk\vcsmm\include\glm\detail\type_vec4.inl(182): error C2476: 'constexpr' constructor does not initialize all members 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(42): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::x' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(42): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::y' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(42): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::z' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(42): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::w' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(43): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::r' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(43): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::g' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(43): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::b' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(43): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::a' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(44): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::s' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(44): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::t' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(44): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::p' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(44): note: 'glm::tvec4<float,glm::aligned_lowp>::<unnamed-tag>::q' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(46): note: 'glm::tvec4<float,glm::aligned_lowp>::data' was not initialized by the constructor 1> c:\devel\videosdk\vcsmm\include\glm\detail\type_vec4.inl(183): note: while compiling class template member function 'glm::tvec4<float,glm::aligned_lowp>::tvec4(glm::ctor)' 1> c:\devel\videosdk\vcsmm\include\glm\detail\type_vec4_simd.inl(155): note: see reference to function template instantiation 'glm::tvec4<float,glm::aligned_lowp>::tvec4(glm::ctor)' being compiled 1> c:\devel\videosdk\vcsmm\include\glm\detail\type_vec4_simd.inl(154): note: see reference to class template instantiation 'glm::tvec4<float,glm::aligned_lowp>' being compiled

Adding a default ctor call for all element fixes the issue:

@@ -180,6 +180,7 @@

    template <typename T, precision P>
    GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<T, P>::tvec4(ctor)
+       : x(), y(), z(), w() 
    {}

    template <typename T, precision P>

@rioharu
Copy link

rioharu commented Oct 8, 2016

You don't need to initialize all members, just one will suffice.

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

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

Thanks for reporting,
Christophe

@ma30002000
Copy link
Author

Unfortunately, this issue is still there - the referenced commit only fixes #555, but not this ticket.

@ma30002000
Copy link
Author

Could you please reopen the issue?

@Groovounet Groovounet reopened this Oct 12, 2016
@Groovounet
Copy link
Member

Could you use #define GLM_FORCE_MESSAGES, build and copy paste the information GLM returns?
I couldn't repro.

Thanks,
Christophe

@ma30002000
Copy link
Author

1> GLM: Windows platform detected
1> GLM: version 0.9.8.2
1> GLM: Visual C++ compiler detected
1> GLM: 64 bits model
1> GLM: SSE2 instruction set
1> GLM: C++11
1> GLM: Swizzling operators disabled, #define GLM_SWIZZLE to enable swizzle operators
1> GLM: Depth clip space: negative one to one
1> GLM: Coordinate system: right handed
1> GLM: .length() returns glm::length_t, a typedef of int following the GLSL specification
1> GLM: Core library included
1> GLM: GLM_GTC_constants extension included
1> GLM: GLM_GTC_matrix_transform extension included
1> GLM: GLM_GTX_transform extension included
1> GLM: GLM_GTC_epsilon extension included
1> GLM: GLM_GTC_quaternion extension included
1> GLM: GLM_GTX_norm extension included
1> GLM: GLM_GTX_quaternion extension included
1> GLM: GLM_GTX_rotate_vector extension included
1> GLM: GLM_GTX_vector_angle extension included
1>c:\devel\videosdk\vcsmm\include\glm\detail\type_vec4.inl(182): error C2476: 'constexpr' constructor does not initialize all members
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(42): note: 'glm::tvec4<float,glm::aligned_lowp>::::x' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(42): note: 'glm::tvec4<float,glm::aligned_lowp>::::y' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(42): note: 'glm::tvec4<float,glm::aligned_lowp>::::z' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(42): note: 'glm::tvec4<float,glm::aligned_lowp>::::w' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(43): note: 'glm::tvec4<float,glm::aligned_lowp>::::r' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(43): note: 'glm::tvec4<float,glm::aligned_lowp>::::g' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(43): note: 'glm::tvec4<float,glm::aligned_lowp>::::b' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(43): note: 'glm::tvec4<float,glm::aligned_lowp>::::a' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(44): note: 'glm::tvec4<float,glm::aligned_lowp>::::s' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(44): note: 'glm::tvec4<float,glm::aligned_lowp>::::t' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(44): note: 'glm::tvec4<float,glm::aligned_lowp>::::p' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(44): note: 'glm::tvec4<float,glm::aligned_lowp>::::q' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail/type_vec4.hpp(46): note: 'glm::tvec4<float,glm::aligned_lowp>::data' was not initialized by the constructor
1> c:\devel\videosdk\vcsmm\include\glm\detail\type_vec4.inl(183): note: while compiling class template member function 'glm::tvec4<float,glm::aligned_lowp>::tvec4(glm::ctor)'
1> c:\devel\videosdk\vcsmm\include\glm\detail\type_vec4_simd.inl(155): note: see reference to function template instantiation 'glm::tvec4<float,glm::aligned_lowp>::tvec4(glm::ctor)' being compiled
1> c:\devel\videosdk\vcsmm\include\glm\detail\type_vec4_simd.inl(154): note: see reference to class template instantiation 'glm::tvec4<float,glm::aligned_lowp>' being compiled

@Groovounet
Copy link
Member

Do you have a simple code sample to repro?

@Groovounet
Copy link
Member

How do you get GLM: C++11? Visual C++ 2015 is not fully C++11 compatible and should return C++0x.

Groovounet added a commit that referenced this issue Oct 16, 2016
… known to not fully support the requested C++ version #555
@Groovounet
Copy link
Member

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

I think you are using GLM_FORCE_CXX11 in your code with Visual C++ however Visual C++ doesn't fully support C++11.

By default GLM will automatically detect the compiler and its version to use only the feature set supported by the compiler. Using GLM_FORCE_CXX11, you override this system to use the C++11 features.

Thanks,
Christophe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants