summaryrefslogtreecommitdiffstats
path: root/test/input
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-29 11:38:28 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-29 11:40:01 (GMT)
commita80084fb43452746b52e33bdf2460f9cec3c274b (patch)
tree7ad7afadc46a58ea39e73562e3635f0f4f059354 /test/input
parent3d9c8c1501ef50d9091344ed5f32734a52bc38b8 (diff)
downloadCastXML-a80084fb43452746b52e33bdf2460f9cec3c274b.zip
CastXML-a80084fb43452746b52e33bdf2460f9cec3c274b.tar.gz
CastXML-a80084fb43452746b52e33bdf2460f9cec3c274b.tar.bz2
Output: Treat lambda classes as anonymous and memberless
In C++11 the compiler synthesizes class types to represent lambda function objects. These types cannot be named directly, so treat them as anonymous. Leave out all their members for now too because they cannot be treated as normal C++98 classes represented by gccxml's format. Issue: #89
Diffstat (limited to 'test/input')
-rw-r--r--test/input/Function-lambda.cxx10
-rw-r--r--test/input/Variable-lambda.cxx1
2 files changed, 11 insertions, 0 deletions
diff --git a/test/input/Function-lambda.cxx b/test/input/Function-lambda.cxx
new file mode 100644
index 0000000..d11a9b1
--- /dev/null
+++ b/test/input/Function-lambda.cxx
@@ -0,0 +1,10 @@
+template <typename F>
+F start(F f)
+{
+ return f;
+}
+
+void instantiate_start_with_lambda()
+{
+ start([]() {});
+}
diff --git a/test/input/Variable-lambda.cxx b/test/input/Variable-lambda.cxx
new file mode 100644
index 0000000..87ac0a7
--- /dev/null
+++ b/test/input/Variable-lambda.cxx
@@ -0,0 +1 @@
+auto start = []() {};