From d9fe760eebc1e40789f2fd769dcba74e3b0dbcbb Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Thu, 22 Sep 2011 01:25:53 +0200 Subject: [PATCH] Add attribute-empty test for C++0x, which passes. --- c++0x/Makefile | 3 +++ c++0x/attribute-empty.cpp | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 c++0x/attribute-empty.cpp diff --git a/c++0x/Makefile b/c++0x/Makefile index 837cb06..79c4024 100644 --- a/c++0x/Makefile +++ b/c++0x/Makefile @@ -21,6 +21,9 @@ attribute2: attribute2.o $(LIBS) attribute3: attribute3.o $(LIBS) $(CXX) -o $@ $< $(LIBS) $(LDFLAGS) +attribute-empty: attribute-empty.o $(LIBS) + $(CXX) -o $@ $< $(LIBS) $(LDFLAGS) + namespace: namespace.o $(LIBS) $(CXX) -o $@ $< $(LIBS) $(LDFLAGS) diff --git a/c++0x/attribute-empty.cpp b/c++0x/attribute-empty.cpp new file mode 100644 index 0000000..b79836b --- /dev/null +++ b/c++0x/attribute-empty.cpp @@ -0,0 +1,16 @@ +#include + +#include "xml-template.h" + +using namespace std; + +int main(int argc, char **argv) +{ + Substitute master_directive = { + make_pair("color", new Replace("blue")), + make_pair("#things", new Clone { }), + }; + + process_file("../xml/clone.xml", argv[1], &master_directive); + return(0); +} -- 2.39.2