mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Merge from core
This commit is contained in:
@@ -47,11 +47,7 @@ class EmitFromEvents : public EventHandler {
|
||||
Emitter& m_emitter;
|
||||
|
||||
struct State {
|
||||
enum value {
|
||||
WaitingForSequenceEntry,
|
||||
WaitingForKey,
|
||||
WaitingForValue
|
||||
};
|
||||
enum value { WaitingForSequenceEntry, WaitingForKey, WaitingForValue };
|
||||
};
|
||||
std::stack<State::value> m_stateStack;
|
||||
};
|
||||
|
@@ -9,15 +9,7 @@
|
||||
|
||||
namespace YAML {
|
||||
struct EmitterNodeType {
|
||||
enum value {
|
||||
None,
|
||||
Property,
|
||||
Scalar,
|
||||
FlowSeq,
|
||||
BlockSeq,
|
||||
FlowMap,
|
||||
BlockMap
|
||||
};
|
||||
enum value { None, Property, Scalar, FlowSeq, BlockSeq, FlowMap, BlockMap };
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -85,11 +85,7 @@ inline _Anchor Anchor(const std::string content) { return _Anchor(content); }
|
||||
|
||||
struct _Tag {
|
||||
struct Type {
|
||||
enum value {
|
||||
Verbatim,
|
||||
PrimaryHandle,
|
||||
NamedHandle
|
||||
};
|
||||
enum value { Verbatim, PrimaryHandle, NamedHandle };
|
||||
};
|
||||
|
||||
explicit _Tag(const std::string& prefix_, const std::string& content_,
|
||||
|
@@ -10,103 +10,71 @@
|
||||
namespace YAML {
|
||||
template <typename>
|
||||
struct is_numeric {
|
||||
enum {
|
||||
value = false
|
||||
};
|
||||
enum { value = false };
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_numeric<char> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
template <>
|
||||
struct is_numeric<unsigned char> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
template <>
|
||||
struct is_numeric<int> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
template <>
|
||||
struct is_numeric<unsigned int> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
template <>
|
||||
struct is_numeric<long int> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
template <>
|
||||
struct is_numeric<unsigned long int> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
template <>
|
||||
struct is_numeric<short int> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
template <>
|
||||
struct is_numeric<unsigned short int> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1310)
|
||||
template <>
|
||||
struct is_numeric<__int64> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
template <>
|
||||
struct is_numeric<unsigned __int64> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
#else
|
||||
template <>
|
||||
struct is_numeric<long long> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
template <>
|
||||
struct is_numeric<unsigned long long> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
#endif
|
||||
template <>
|
||||
struct is_numeric<float> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
template <>
|
||||
struct is_numeric<double> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
template <>
|
||||
struct is_numeric<long double> {
|
||||
enum {
|
||||
value = true
|
||||
};
|
||||
enum { value = true };
|
||||
};
|
||||
|
||||
template <bool, class T = void>
|
||||
|
Reference in New Issue
Block a user