Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
cetlib
cetlib
test
registry_via_id_test_2.cc
Go to the documentation of this file.
1
// ======================================================================
2
//
3
// test registry_via_id's requirement that the value type have
4
// a member function that is:
5
// 1) named id, and
6
// 2) returns a value of the key type
7
//
8
// ======================================================================
9
10
#include "
cetlib/registry_via_id.h
"
11
12
typedef
int
success_t
;
13
typedef
char
*
fail_t
;
// anything other than success_t
14
15
struct
val
{
16
success_t
17
// fail_t
18
id
()
const
19
{
20
return
0;
21
}
22
};
23
24
typedef
cet::registry_via_id<success_t, val>
reg
;
25
26
int
27
main
()
28
{
29
reg::put
(
val
());
30
31
return
0;
32
}
// main()
val
Definition:
registry_via_id_test_2.cc:15
val::id
success_t id() const
Definition:
registry_via_id_test_2.cc:18
success_t
int success_t
Definition:
registry_via_id_test_2.cc:12
registry_via_id.h
main
int main()
Definition:
registry_via_id_test_2.cc:27
testsqlite3.val
list val
Definition:
testsqlite3.py:13
cet::registry_via_id::put
static detail::must_have_id< K, V >::type put(V const &value)
Definition:
registry_via_id.h:125
reg
cet::registry_via_id< success_t, val > reg
Definition:
registry_via_id_test_2.cc:24
cet::registry_via_id
Definition:
registry_via_id.h:19
fail_t
char * fail_t
Definition:
registry_via_id_test_2.cc:13
Generated by
1.8.11