"...research_projects/mulit_token_textual_inversion/README.md" did not exist on "76d492ea49342b486dfbca1dbcdfbb052fe34112"
convert.cpp 292 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "yaml-cpp/value.h"

namespace YAML
{
	template<>
	Value convert(const std::string& rhs) {
		return Value(rhs);
	}
	
	template<>
	bool convert(const Value& value, std::string& rhs) {
		if(value.Type() != ValueType::Scalar)
			return false;
		rhs = value.scalar();
		return true;
	}
}