Exemplo n.º 1
0
		static std::uint32_t to(state_t &state, const map_t &map_val)
		{
			::lua_createtable(state, (int)map_val.size(), (int)map_val.size());

			std::for_each(map_val.cbegin(), map_val.cend(), 
				[&state](const typename map_t::value_type &val)
			{
				convertion_t<typename map_t::key_type>::to(state, val.first);
				convertion_t<typename map_t::mapped_type>::to(state, val.second);

				::lua_settable(state, -3);
			});

			return map_val.size() == 0 ? 0 : 1;
		}
Exemplo n.º 2
0
 const_iterator cend() const noexcept { return map_index_n.cend(); }