All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
traits.h
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_BASE_GF_TRAITS_H
8#define PXR_BASE_GF_TRAITS_H
9
10#include "pxr/pxr.h"
11
12#include <type_traits>
13
14PXR_NAMESPACE_OPEN_SCOPE
15
18template <class T>
19struct GfIsGfVec { static const bool value = false; };
20
24template <class T>
25struct GfIsGfMatrix { static const bool value = false; };
26
29template <class T>
30struct GfIsGfQuat { static const bool value = false; };
31
34template <class T>
35struct GfIsGfDualQuat { static const bool value = false; };
36
39template <class T>
40struct GfIsGfRange { static const bool value = false; };
41
44template <class T>
45struct GfIsFloatingPoint : public std::is_floating_point<T>{};
46
49template <class T>
50struct GfIsArithmetic : public std::integral_constant<
51 bool, GfIsFloatingPoint<T>::value || std::is_arithmetic<T>::value>{};
52
53PXR_NAMESPACE_CLOSE_SCOPE
54
55#endif // PXR_BASE_GF_TRAITS_H
A metafunction which is equivalent to std::arithmetic but also includes any specializations from GfIs...
Definition: traits.h:51
A metafunction which is equivalent to std::is_floating_point but allows for additional specialization...
Definition: traits.h:45
A metafunction with a static const bool member 'value' that is true for GfDualQuat types and false fo...
Definition: traits.h:35
A metafunction with a static const bool member 'value' that is true for GfMatrix types,...
Definition: traits.h:25
A metafunction with a static const bool member 'value' that is true for GfQuat types and false for al...
Definition: traits.h:30
A metafunction with a static const bool member 'value' that is true for GfRange types and false for a...
Definition: traits.h:40
A metafunction with a static const bool member 'value' that is true for GfVec types,...
Definition: traits.h:19