Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
json-non-null.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include <string>
5
#include <vector>
6
#include <set>
7
#include <map>
8
#include <list>
9
10
namespace
nix {
11
17
template
<
typename
T>
18
struct
json_avoids_null;
19
23
template
<
typename
T>
24
struct
json_avoids_null : std::bool_constant<std::is_integral<T>::value>
25
{};
26
27
template
<>
28
struct
json_avoids_null<std::nullptr_t> : std::false_type
29
{};
30
31
template
<>
32
struct
json_avoids_null<bool> : std::true_type
33
{};
34
35
template
<>
36
struct
json_avoids_null<std::string> : std::true_type
37
{};
38
39
template
<
typename
T>
40
struct
json_avoids_null<std::vector<T>> : std::true_type
41
{};
42
43
template
<
typename
T>
44
struct
json_avoids_null<std::list<T>> : std::true_type
45
{};
46
47
template
<
typename
T,
typename
Compare>
48
struct
json_avoids_null<std::set<T, Compare>> : std::true_type
49
{};
50
51
template
<
typename
K,
typename
V,
typename
Compare>
52
struct
json_avoids_null<std::map<K, V, Compare>> : std::true_type
53
{};
54
55
}
// namespace nix
libutil
include
nix
util
json-non-null.hh
Generated by
1.18.0