From 9479feb34459b0d1fcdaa6a6545827f3243cb513 Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Thu, 22 Sep 2011 00:46:15 +0200 Subject: [PATCH] Add structure test for C++0x. Passes. --- c++0x/Makefile | 3 +++ c++0x/structure.cpp | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 c++0x/structure.cpp diff --git a/c++0x/Makefile b/c++0x/Makefile index f79d37a..b2528df 100644 --- a/c++0x/Makefile +++ b/c++0x/Makefile @@ -20,3 +20,6 @@ namespace: namespace.o $(LIBS) namespace2: namespace2.o $(LIBS) $(CXX) -o $@ $< $(LIBS) $(LDFLAGS) + +structure: structure.o $(LIBS) + $(CXX) -o $@ $< $(LIBS) $(LDFLAGS) diff --git a/c++0x/structure.cpp b/c++0x/structure.cpp new file mode 100644 index 0000000..2447feb --- /dev/null +++ b/c++0x/structure.cpp @@ -0,0 +1,19 @@ +#include + +#include "xml-template.h" + +using namespace std; + +int main(int argc, char **argv) +{ + Substitute master_directive = { + make_pair("#outer", new Clone { + new Substitute { make_pair("#inner", new Replace("One")) }, + new Substitute { make_pair("#inner", new Replace("Two")) }, + new Substitute { make_pair("#inner", new Replace("Three")) }, + }), + }; + + process_file("../xml/structure.xml", argv[1], &master_directive); + return(0); +} -- 2.39.2