37
37
38
38
#include < map> // for map<>
39
39
#include < string> // for string
40
- #include < utility> // for move
40
+ #include < utility> // for move, forward
41
41
#include < vector> // for vector<>
42
42
#include < array> // for array<>
43
43
@@ -62,7 +62,7 @@ Vector<T, decltype(make_prototype<T>())> make_schema(std::vector<T>* ptr, S&& de
62
62
}
63
63
64
64
template <typename T, size_t N, typename P>
65
- Array<T, N, P>::Array(std::array<T, N>* ptr, std::string&& desc)
65
+ Array<T, N, P>::Array(std::array<T, N>* ptr, std::string desc)
66
66
: Array<T, N, P>(ptr, make_prototype<T>(), std::move(desc)) {}
67
67
68
68
template <typename T, size_t N, typename S>
@@ -71,12 +71,12 @@ Array<T, N, decltype(make_prototype<T>())> make_schema(std::array<T, N>* ptr, S&
71
71
}
72
72
73
73
template <typename T, typename P>
74
- Const<T, P>::Const(const T& constant, std::string desc)
74
+ Const<T, P>::Const(T constant, std::string desc)
75
75
: Const<T, P>(constant, make_prototype<T>(), std::move(desc)) {}
76
76
77
77
template <typename T, typename S>
78
- Const<T, decltype(make_prototype<T>())> make_const_schema (const T & constant, S&& desc) {
79
- return Const<T, decltype (make_prototype<T>())>(constant, std::forward<S>(desc));
78
+ Const<T, decltype(make_prototype<T>())> make_const_schema (T& & constant, S&& desc) {
79
+ return Const<T, decltype (make_prototype<T>())>(std::forward<T>( constant) , std::forward<S>(desc));
80
80
}
81
81
82
82
template <typename T, typename P>
0 commit comments