mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 04:41:16 +00:00
Compiles/links assignment to string
This commit is contained in:
@@ -16,7 +16,7 @@ namespace YAML
|
||||
class node_data
|
||||
{
|
||||
public:
|
||||
explicit node_data(const std::string& data);
|
||||
explicit node_data(const std::string& data) {}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -61,15 +61,13 @@ namespace YAML
|
||||
m_pNode->set_scalar(rhs);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void Value::Assign(const char * const & rhs)
|
||||
inline void Value::Assign(const char *rhs)
|
||||
{
|
||||
EnsureNodeExists();
|
||||
m_pNode->set_scalar(rhs);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void Value::Assign(char * const & rhs)
|
||||
inline void Value::Assign(char *rhs)
|
||||
{
|
||||
EnsureNodeExists();
|
||||
m_pNode->set_scalar(rhs);
|
||||
|
@@ -61,6 +61,8 @@ namespace YAML
|
||||
|
||||
private:
|
||||
template<typename T> void Assign(const T& rhs);
|
||||
void Assign(const char *rhs);
|
||||
void Assign(char *rhs);
|
||||
|
||||
void EnsureNodeExists();
|
||||
void AssignData(const Value& rhs);
|
||||
|
@@ -3,6 +3,7 @@
|
||||
int main()
|
||||
{
|
||||
YAML::Value value;
|
||||
value = "Hello";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user