Skip to content

GLM_FORCE_CTOR_INIT not working #812

@subGlitch

Description

@subGlitch

GLM_FORCE_CTOR_INIT worked in 0.9.9.0, but not in 0.9.9.1. Vectors are not zero-initialized by default.

Also, code in files detail/type_vec*.inl looks strange - no matter what value GLM_CONFIG_DEFAULTED_FUNCTIONS is - there will be either no Initializer List (with zeros), or no user-provided default Ctor at all. So, it looks like we can't have default zero-initialization in any case...

	// -- Implicit basic constructors --

#	if GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_DISABLE
		template<typename T, qualifier Q>
		GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec()
#			if GLM_CONFIG_DEFAULTED_FUNCTIONS != GLM_DISABLE
				: x(0), y(0)
#			endif
		{}

		template<typename T, qualifier Q>
		GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<2, T, Q> const& v)
			: x(v.x), y(v.y)
		{}
#	endif

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions