Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
wire-cell-build
util
test
test_type.cxx
Go to the documentation of this file.
1
#include "
WireCellUtil/Type.h
"
2
#include "
WireCellUtil/Testing.h
"
3
4
#include <iostream>
5
#include <vector>
6
using namespace
std
;
7
using namespace
WireCell
;
8
9
int
main
()
10
{
11
int
i;
12
vector<int> vi;
13
14
15
cerr <<
"int: "
<<
type
(i) <<
endl
;
16
cerr <<
"vector<int>: \""
<<
type
(vi) <<
"\"\n"
;
17
18
19
// the two don't give exactly the same pattern....
20
#if defined (__clang__)
21
AssertMsg
(
"std::__1::vector<int, std::__1::allocator<int> >"
==
type
(vi),
"Clang demangling fails"
);
22
#else
23
AssertMsg
(
"std::vector<int, std::allocator<int> >"
==
type
(vi),
"GCC demangling fails"
);
24
#endif
25
26
}
Type.h
std
STL namespace.
Testing.h
WireCell
Definition:
Main.h:22
type
static QCString type
Definition:
declinfo.cpp:672
AssertMsg
#define AssertMsg
Definition:
Testing.h:8
main
int main()
Definition:
test_type.cxx:9
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
Generated by
1.8.11