From: sgunderson@bigfoot.com <> Date: Wed, 21 Sep 2011 23:25:53 +0000 (+0200) Subject: Add attribute-empty test for C++0x, which passes. X-Git-Url: https://git.sesse.net/?p=xml-template;a=commitdiff_plain;h=d9fe760eebc1e40789f2fd769dcba74e3b0dbcbb Add attribute-empty test for C++0x, which passes. --- 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); +}