Menu

[94f52a]: / none.hpp  Maximize  Restore  History

Download this file

53 lines (41 with data), 987 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef CHILON_NONE_HPP
#define CHILON_NONE_HPP
namespace chilon {
namespace detail {
template <bool Answer = false>
struct none {
template <class T>
bool operator==(T const& t) const { return Answer; }
template <class T>
bool operator!=(T const& t) const { return Answer; }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
template <class... T>
bool test(T const&... in) const { return Answer; }
#else
template <class T>
bool test(T const& in) const { return Answer; }
#endif
};
}; // end detail namespace
struct none : detail::none<> {
typedef none value_type;
#ifdef __GXX_EXPERIMENTAL_CXX0X__
template <class... T>
none(T const&... in) {}
#else
template <class T>
none(T const& in) {}
#endif
};
struct none_true : detail::none<true> {
typedef none_true value_type;
#ifdef __GXX_EXPERIMENTAL_CXX0X__
template <class... T>
none_true(T const&... in) {}
#else
template <class T>
none(T const& in) {}
#endif
};
}
#endif
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.