Initial import of libdpf.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
e4e666f459
4563 changed files with 1690372 additions and 0 deletions
22
thirdparty/json/docs/examples/operator__equal__nullptr_t.cpp
vendored
Normal file
22
thirdparty/json/docs/examples/operator__equal__nullptr_t.cpp
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create several JSON values
|
||||
json array = {1, 2, 3};
|
||||
json object = {{"A", "a"}, {"B", "b"}};
|
||||
json number = 17;
|
||||
json string = "foo";
|
||||
json null;
|
||||
|
||||
// output values and comparisons
|
||||
std::cout << std::boolalpha;
|
||||
std::cout << array << " == nullptr " << (array == nullptr) << '\n';
|
||||
std::cout << object << " == nullptr " << (object == nullptr) << '\n';
|
||||
std::cout << number << " == nullptr " << (number == nullptr) << '\n';
|
||||
std::cout << string << " == nullptr " << (string == nullptr) << '\n';
|
||||
std::cout << null << " == nullptr " << (null == nullptr) << '\n';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue