2
3
4
5
6
7
8
11#ifndef _GLSL_STRUCT_VEC_TYPE_HPP_
12 #define _GLSL_STRUCT_VEC_TYPE_HPP_
14 #include <glslstruct/config.hpp>
18 "This is only available for c++17 and greater and when types are not disabled with defined GLSL_STRUCT_DISABLE_TYPES!"
22 #include <glslstruct/type/containers/type.hpp>
26
27
28
31 friend struct std::hash<vec_type>;
33 using base_type = type;
42 vec_type(ValueType type, size_t length, size_t size)
noexcept;
44 vec_type(
const vec_type& other)
noexcept;
46 vec_type(vec_type&& other)
noexcept;
48 ~vec_type()
noexcept override;
51 vec_type& operator=(
const vec_type& other)
noexcept;
53 vec_type& operator=(vec_type&& other)
noexcept;
57 template<type_visitor T>
59 template<
class T, std::enable_if_t<is_type_visitor_v<T>,
bool> =
true>
61 void accept(T& visitor)
const {
66 [[nodiscard]] ValueType get_type()
const noexcept;
68 [[nodiscard]] size_t get_length()
const noexcept;
71 [[nodiscard]] std::string to_string()
const noexcept override;
73 friend bool operator==(
const vec_type& lhs,
const vec_type& rhs)
noexcept;
74 friend bool operator!=(
const vec_type& lhs,
const vec_type& rhs)
noexcept;
78
79
80
81 [[
nodiscard]]
bool operator==(
const vec_type& lhs,
const vec_type& rhs)
noexcept;
83
84
85
86 [[
nodiscard]]
bool operator!=(
const vec_type& lhs,
const vec_type& rhs)
noexcept;
90
91
92
95 [[nodiscard]] size_t operator()(
const glslstruct::vec_type& value)
const noexcept;
#define _GLSL_STRUCT_EXPORT
This is for exporting symbols in shared library setup.
Definition config.hpp:251
#define _GLSL_STRUCT_HAS_CXX20
check if compiler has c++ version greater or equal to c++20 and if user enabled c++20 features using ...
Definition config.hpp:142
#define _GLSL_STRUCT_HAS_TYPES
check if user not disabled type containers using GLSL_STRUCT_DISABLE_TYPES
Definition config.hpp:162
Main namespace of glslstruct library.
Definition contexts.hpp:20