Lumiera
0.pre.03
»edit your freedom«
type-demangling-test.cpp
Go to the documentation of this file.
1
/*
2
TypeDemangling(Test) - ensure a helper for C++ demangling works as expected
3
4
Copyright (C)
5
2014, Hermann Vosseler <Ichthyostega@web.de>
6
7
**Lumiera** is free software; you can redistribute it and/or modify it
8
under the terms of the GNU General Public License as published by the
9
Free Software Foundation; either version 2 of the License, or (at your
10
option) any later version. See the file COPYING for further details.
11
12
* *****************************************************************/
13
19
#include "
lib/symbol.hpp
"
20
#include "
lib/test/run.hpp
"
21
#include "
lib/meta/util.hpp
"
22
23
#include <string>
24
#include <iostream>
25
26
using
std::string;
27
using
std::cout;
28
using
std::endl;
29
30
31
namespace
lib
{
32
namespace
meta{
33
namespace
test
{
34
35
template
<
class
T>
36
struct
Outer
37
{
38
struct
Inner
{ };
39
40
static
const
T*
41
cloak (
Inner
const
&&)
42
{
43
return
nullptr
;
44
}
45
};
46
47
struct
Space
{ };
48
49
50
51
52
/**********************************************/
61
class
TypeDemangling_test
:
public
Test
62
{
63
void
64
run (Arg)
65
{
66
Outer<Space>
ship;
67
auto
magic = &ship.cloak;
68
auto
rawType =
typeid
(magic).
name
();
69
70
cout << rawType << endl;
71
cout <<
demangleCxx
(rawType) << endl;
72
}
73
};
74
75
LAUNCHER (
TypeDemangling_test
,
"unit common"
);
76
77
78
}}}
// namespace lib::meta::test
lib::meta::test::Outer
Definition:
type-demangling-test.cpp:36
lib::meta::test::Space
Definition:
type-demangling-test.cpp:47
test
Definition:
run.hpp:40
util.hpp
Simple and lightweight helpers for metaprogramming and type detection.
lib
Implementation namespace for support and library code.
Definition:
common-services.cpp:54
symbol.hpp
Marker types to indicate a literal string and a Symbol.
run.hpp
Simplistic test class runner.
lib::meta::demangleCxx
string demangleCxx(Literal rawName)
Fallback type-ID:
Definition:
format-obj.cpp:159
lib::meta::test::Outer::Inner
Definition:
type-demangling-test.cpp:38
lib::meta::test::TypeDemangling_test
Definition:
type-demangling-test.cpp:61
stage::widget::name
ElementBoxWidget::Config::Qualifier name(string id)
define the name-ID displayed in the caption
Definition:
element-box-widget.hpp:234
library
meta
type-demangling-test.cpp
Generated on Fri Dec 13 2024 05:05:36 for Lumiera by
1.8.13