mirror of
https://github.com/g-truc/glm.git
synced 2025-04-07 22:40:17 +00:00
Initial std trivial experiments #263
This commit is contained in:
parent
41c00872a1
commit
931e72b456
5 changed files with 25 additions and 7 deletions
|
@ -527,6 +527,10 @@
|
|||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
|
||||
__has_feature(cxx_range_for))
|
||||
|
||||
#define GLM_HAS_ASSIGNABLE ( \
|
||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49)))
|
||||
|
||||
// OpenMP
|
||||
#ifdef _OPENMP
|
||||
# if GLM_COMPILER & GLM_COMPILER_GCC
|
||||
|
|
|
@ -148,7 +148,7 @@ namespace detail
|
|||
// Implicit basic constructors
|
||||
|
||||
GLM_FUNC_DECL tvec4();
|
||||
GLM_FUNC_DECL tvec4(tvec4<T, P> const & v);
|
||||
//GLM_FUNC_DECL tvec4(tvec4<T, P> const & v);
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
|
||||
|
||||
|
@ -258,7 +258,7 @@ namespace detail
|
|||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<T, P> const & v);
|
||||
//GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<T, P> const & v);
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<U, P> const & v);
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace glm
|
|||
# endif
|
||||
{}
|
||||
#endif
|
||||
|
||||
/*
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, P> const & v)
|
||||
: x(v.x), y(v.y), z(v.z), w(v.w)
|
||||
|
@ -101,7 +101,7 @@ namespace glm
|
|||
: data(v.data)
|
||||
{}
|
||||
#endif
|
||||
|
||||
*/
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, Q> const & v)
|
||||
|
@ -283,7 +283,7 @@ namespace glm
|
|||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
/*
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<T, P> const & v)
|
||||
{
|
||||
|
@ -309,7 +309,7 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
*/
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<U, P> const & v)
|
||||
|
|
|
@ -188,6 +188,8 @@ int test_ctr()
|
|||
{
|
||||
int Error(0);
|
||||
|
||||
Error += std::is_copy_constructible<glm::mat4>::value ? 0 : 1;
|
||||
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
glm::mat4 m0(
|
||||
glm::vec4(0, 1, 2, 3),
|
||||
|
|
|
@ -42,7 +42,19 @@ enum comp
|
|||
int test_vec4_ctor()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
|
||||
glm::ivec4 A(1, 2, 3, 4);
|
||||
glm::ivec4 B(A);
|
||||
Error += glm::all(glm::equal(A, B)) ? 0 : 1;
|
||||
|
||||
Error += std::is_trivially_copy_assignable<glm::vec4>::value ? 0 : 1;
|
||||
Error += std::is_trivially_copyable<glm::vec4>::value ? 0 : 1;
|
||||
Error += std::is_trivially_copy_assignable<glm::vec3>::value ? 0 : 1;
|
||||
Error += std::is_trivially_copyable<glm::vec3>::value ? 0 : 1;
|
||||
|
||||
Error += std::has_trivial_copy_constructor<glm::vec4>::value ? 0 : 1;
|
||||
Error += std::is_copy_constructible<glm::vec4>::value ? 0 : 1;
|
||||
|
||||
#if GLM_HAS_INITIALIZER_LISTS
|
||||
{
|
||||
glm::vec4 a{ 0, 1, 2, 3 };
|
||||
|
|
Loading…
Add table
Reference in a new issue