remove \r
[extl.git] / extl / type / yes_no.h
blobf98dc4c4dd0d6d8f974ad83ed9eb5308a9b360b7
1 /* ///////////////////////////////////////////////////////////////////////
2 * File: yes_no.h
4 * Created: 08.03.17
5 * Updated: 08.07.30
7 * Brief: yes_no class - result type wrap
9 * [<Home>]
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
12 #ifndef EXTL_TYPE_YES_NO_H
13 #define EXTL_TYPE_YES_NO_H
15 /*!\file yes_no.h
16 * \brief yes_no class - logical operation
19 /* ///////////////////////////////////////////////////////////////////////
20 * Includes
22 #include "../config/config.h"
24 /* ///////////////////////////////////////////////////////////////////////
25 * ::extl namespace
27 EXTL_BEGIN_NAMESPACE
29 /* ///////////////////////////////////////////////////////////////////////
30 * bool ret = (sizeof(yes_type/no_type) == 1)? true : false
32 // yes_type
33 typedef struct /* sizeof(yes_type) == 1 */
35 e_byte_t padding[1];
36 EXTL_STATIC_MEMBER_CONST(e_bool_t, value = e_true_v);
38 }yes_type;
40 // no_type
41 typedef struct /* sizeof(no_type) !=1 */
43 e_byte_t padding[8];
44 EXTL_STATIC_MEMBER_CONST(e_bool_t, value = e_false_v);
46 }no_type;
48 /* ///////////////////////////////////////////////////////////////////////
49 * ::extl namespace
51 EXTL_END_NAMESPACE
53 /* //////////////////////////////////////////////////////////////////// */
54 #endif /* EXTL_TYPE_YES_NO_H */
55 /* //////////////////////////////////////////////////////////////////// */