Initial std trivial experiments #263
This commit is contained in:
@@ -527,6 +527,10 @@
|
|||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
|
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
|
||||||
__has_feature(cxx_range_for))
|
__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
|
// OpenMP
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
# if GLM_COMPILER & GLM_COMPILER_GCC
|
# if GLM_COMPILER & GLM_COMPILER_GCC
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ namespace detail
|
|||||||
// Implicit basic constructors
|
// Implicit basic constructors
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec4();
|
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>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
|
GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ namespace detail
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// 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>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<U, P> const & v);
|
GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<U, P> const & v);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
{}
|
{}
|
||||||
#endif
|
#endif
|
||||||
|
/*
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, P> const & v)
|
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, P> const & v)
|
||||||
: x(v.x), y(v.y), z(v.z), w(v.w)
|
: x(v.x), y(v.y), z(v.z), w(v.w)
|
||||||
@@ -101,7 +101,7 @@ namespace glm
|
|||||||
: data(v.data)
|
: data(v.data)
|
||||||
{}
|
{}
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, Q> const & v)
|
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, Q> const & v)
|
||||||
@@ -283,7 +283,7 @@ namespace glm
|
|||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
/*
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<T, P> const & v)
|
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<T, P> const & v)
|
||||||
{
|
{
|
||||||
@@ -309,7 +309,7 @@ namespace glm
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<U, P> const & v)
|
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);
|
int Error(0);
|
||||||
|
|
||||||
|
Error += std::is_copy_constructible<glm::mat4>::value ? 0 : 1;
|
||||||
|
|
||||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||||
glm::mat4 m0(
|
glm::mat4 m0(
|
||||||
glm::vec4(0, 1, 2, 3),
|
glm::vec4(0, 1, 2, 3),
|
||||||
|
|||||||
@@ -42,7 +42,19 @@ enum comp
|
|||||||
int test_vec4_ctor()
|
int test_vec4_ctor()
|
||||||
{
|
{
|
||||||
int Error = 0;
|
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
|
#if GLM_HAS_INITIALIZER_LISTS
|
||||||
{
|
{
|
||||||
glm::vec4 a{ 0, 1, 2, 3 };
|
glm::vec4 a{ 0, 1, 2, 3 };
|
||||||
|
|||||||
Reference in New Issue
Block a user