示例#1
0
文件: Cnv.hpp 项目: questor/git-ws
				template<typename T> inline static void toVal(Val& mV, T&& mX)
				{
					Arr result; result.reserve(sizeof...(TArgs));
					// TODO: fwd macro?
					tplFor([&result](auto&& mI){ result.emplace_back(fwd<decltype(mI)>(mI)); }, fwd<T>(mX));
					mV.setArr(std::move(result));
				}
示例#2
0
				template<typename T> inline static void toVal(Val& mV, T&& mX)
				{
					mV.setArr(Arr
					{
						Val{moveIfRValue<decltype(mX)>(mX.first)},
						Val{moveIfRValue<decltype(mX)>(mX.second)}
					});
				}
示例#3
0
				template<typename T> inline static void toVal(Val& mV, T&& mX)
				{
					Arr result; result.reserve(TS);
					for(auto i(0u); i < TS; ++i) result.emplace_back(moveIfRValue<decltype(mX)>(mX[i]));
					mV.setArr(std::move(result));
				}
示例#4
0
				template<typename T> inline static void toVal(Val& mV, T&& mX)
				{
					Arr result; result.reserve(mX.size());
					for(const auto& v : mX) result.emplace_back(moveIfRValue<decltype(mX)>(v));
					mV.setArr(std::move(result));
				}
示例#5
0
				template<typename T> inline static void toVal(Val& mV, T&& mX)
				{
					Arr result; result.reserve(sizeof...(TArgs));
					TplCnvHelper::fromTpl<0, TArgs...>(result, fwd<T>(mX));
					mV.setArr(std::move(result));
				}