moved class into "nlohmann" namespace

- fixed issue #9
- also removed std::mutex member variable
- also added “std::” prefix to size_t variables
This commit is contained in:
Niels
2015-01-06 18:41:24 +01:00
parent 4f0afbbe64
commit a53c878c81
5 changed files with 26 additions and 36 deletions
+8 -8
View File
@@ -14,10 +14,12 @@
#include <initializer_list> // std::initializer_list
#include <iostream> // std::istream, std::ostream
#include <map> // std::map
#include <mutex> // std::mutex
#include <string> // std::string
#include <vector> // std::vector
namespace nlohmann
{
/*!
@brief JSON for Modern C++
@@ -274,7 +276,7 @@ class json
const json& at(const char*) const;
/// return the number of stored values
size_t size() const noexcept;
std::size_t size() const noexcept;
/// checks whether object is empty
bool empty() const noexcept;
/// removes all elements from compounds and resets values to default
@@ -317,10 +319,6 @@ class json
/// the payload
value value_ {};
private:
/// mutex to guard payload
static std::mutex token_;
public:
/// an iterator
class iterator
@@ -431,9 +429,11 @@ class json
/// the current character
char current_ {};
/// the position inside the input buffer
size_t pos_ = 0;
std::size_t pos_ = 0;
};
};
}
/// user-defined literal operator to create JSON objects from strings
json operator "" _json(const char*, size_t);
nlohmann::json operator "" _json(const char*, std::size_t);