File: compile_ansi.cpp

package info (click to toggle)
yyjson 0.12.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,484 kB
  • sloc: ansic: 28,930; xml: 253; javascript: 99; sh: 13; cpp: 8; makefile: 8; objc: 7
file content (14 lines) | stat: -rw-r--r-- 357 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* 
 This file is used to test the compatibility of C++. 
 It should be able to compile successfully in C++ environments.
*/

#include "yyjson.c"

int main(void) {
    yyjson_mut_doc *mdoc = yyjson_mut_doc_new(NULL);
    yyjson_mut_val *root = yyjson_mut_int(mdoc, 0);
    yyjson_mut_doc_set_root(mdoc, root);
    yyjson_mut_doc_free(mdoc);
    return 0;
}