Recast  1
Game with custom magic
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
GenericScalar.hpp
Go to the documentation of this file.
1 //
2 // Created by Oleg Morozenkov on 14.06.17.
3 //
4 
5 #ifndef RECAST_GENERICSCALAR_H
6 #define RECAST_GENERICSCALAR_H
7 
8 
14 template<typename T>
15 struct GenericScalar {
16 public:
17  GenericScalar(T value) : _value(value) {
18  }
19 
20  inline operator T() const noexcept {
21  return _value;
22  }
23 
24  inline operator T&() noexcept {
25  return _value;
26  }
27 
28 protected:
29  T _value;
30 };
31 
32 
33 #endif //RECAST_GENERICSCALAR_H
Definition: GenericScalar.hpp:15
GenericScalar(T value)
Definition: GenericScalar.hpp:17
T _value
Definition: GenericScalar.hpp:29