File: trivially_copyable_test.cpp

package info (click to toggle)
simdjson 4.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 31,396 kB
  • sloc: cpp: 195,760; ansic: 20,954; sh: 1,126; python: 885; makefile: 47; ruby: 25; javascript: 13
file content (23 lines) | stat: -rw-r--r-- 736 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// This file is not part of our main, regular tests.
#include "../singleheader/simdjson.h"
#include <iostream>
#include <type_traits>

int main() {
  if (!std::is_trivially_copyable<simdjson::dom::element>::value) {
    std::cerr << "simdjson::dom::element must be trivially copyable"
              << std::endl;
    return EXIT_FAILURE;
  }
  if (!std::is_trivially_copyable<simdjson::dom::array>::value) {
    std::cerr << "simdjson::dom::array must be trivially copyable" << std::endl;
    return EXIT_FAILURE;
  }
  if (!std::is_trivially_copyable<simdjson::dom::object>::value) {
    std::cerr << "simdjson::dom::object must be trivially copyable"
              << std::endl;
    return EXIT_FAILURE;
  }

  return EXIT_SUCCESS;
}