MCPcopy Create free account
hub / github.com/dhbloo/rapfi / get_array_of

Method get_array_of

Rapfi/external/cpptoml/include/cpptoml.h:860–874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

858 */
859 template <class T>
860 inline typename array_of_trait<T>::return_type get_array_of() const
861 {
862 std::vector<T> result;
863 result.reserve(values_.size());
864
865 for (const auto& val : values_)
866 {
867 if (auto v = val->as<T>())
868 result.push_back(v->get());
869 else
870 return {};
871 }
872
873 return {std::move(result)};
874 }
875
876 /**
877 * Obtains an array of arrays. Note that elements may be nullptr

Callers

nothing calls this directly

Calls 4

reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected