reorganized repo
This commit is contained in:
parent
4bb5126502
commit
91c330ae01
88 changed files with 313 additions and 321 deletions
16
doc/examples/basic_json__moveconstructor.cpp
Normal file
16
doc/examples/basic_json__moveconstructor.cpp
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include <json.hpp>
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create a JSON value
|
||||
json a = 23;
|
||||
|
||||
// move contents of a to b
|
||||
json b(std::move(a));
|
||||
|
||||
// serialize the JSON arrays
|
||||
std::cout << a << '\n';
|
||||
std::cout << b << '\n';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue