#ifndef STLEMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define STLEMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #if defined(_MSC_VER) || \ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 #pragma once #endif #include #include #include #include namespace YAML { template inline Emitter& EmitSeq(Emitter& emitter, const Seq& seq) { emitter << BeginSeq; for (const auto& v : seq) emitter << v; emitter << EndSeq; return emitter; } template inline Emitter& operator<<(Emitter& emitter, const std::vector& v) { return EmitSeq(emitter, v); } template inline Emitter& operator<<(Emitter& emitter, const std::list& v) { return EmitSeq(emitter, v); } template inline Emitter& operator<<(Emitter& emitter, const std::set& v) { return EmitSeq(emitter, v); } template inline Emitter& operator<<(Emitter& emitter, const std::map& m) { emitter << BeginMap; for (const auto& v : m) emitter << Key << v.first << Value << v.second; emitter << EndMap; return emitter; } } #endif // STLEMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66