[avida-cvs] avida CVS commits: /current NEWS configure.in /current/source defs.hh /current/source/main population.cc primitive.ncb primitive.sln primitive.suo primitive.vcproj /current/source/qt-viewer activate_watcher.hh activate_watcher_proto.hh avd_avida_thread_drvr_dbg.hh avd_avida_thread_drvr_dbg_proto.hh avd_connections.cc avd_connections.hh avd_message_display.cc avd_message_display.hh avd_message_display_proto.hh avd_message_display_typetrack.hh avd_message_display_typetrack_proto.hh avd_qstr_message_display.cc n_orig_instruction_cpu_widget.cc n_orig_instruction_cpu_widget.hh qt_viewer.ncb qt_viewer.sln qt_viewer.suo qt_viewer.vcproj retainable.cc retainable.hh retainable_dbg.hh retainable_dbg_proto.hh retainable_proto.hh tRList.hh tRList_proto.hh tRetainable_list.hh tRetainable_list_proto.hh watch_retains.cc watch_retains.hh watch_retains_proto.hh /current/source/support genesis genesis.4stack /current/source/third-party/Loki AbstractFactory.h AssocVector.h EmptyType.h Factory.h Functor.h HierarchyGenerators.h Loki.pri Makefile.am MultiMethods.h NullType.h Singleton.cpp Singleton.h SmallObj.cpp SmallObj.h SmartPtr.h Threads.h Tuple.h TypeInfo.h TypeManip.h TypeTraits.h Typelist.h Visitor.h readme.txt static_check.h /current/source/third-party/Loki/Borland AbstractFactory.h AssocVector.h EmptyType.h Factory.h Functor.h HierarchyGenerators.h MultiMethods.h NullType.h Singleton.cpp Singleton.h SmallObj.cpp SmallObj.h SmartPtr.h Threads.h Tuple.h TypeInfo.h TypeManip.h TypeTraits.h Typelist.h Visitor.h loki_typeinfo.h readme.txt static_check.h /current/source/third-party/Loki/MSVC/1200 EmptyType.h NullType.h TypeList.h TypeManip.h TypeTraits.h portby.txt /current/source/third-party/Loki/MSVC/1300 AbstractFactory.h AssocVector.h EmptyType.h Factory.h Functor.h HierarchyGenerators.h MinMax.h MultiMethods.h NullType.h Singleton.cpp Singleton.h SmallObj.cpp SmallObj.h SmartPtr.h Threads.h TypeInfo.h TypeList.h TypeManip.h TypeTraits.h VC_Alignment.h Variant.h Visitor.h portby.txt readme.txt static_check.h /current/source/third-party/Loki/Reference AbstractFactory.h AssocVector.h EmptyType.h Factory.h Functor.h HierarchyGenerators.h MultiMethods.h NullType.h Singleton.cpp Singleton.h SmallObj.cpp SmallObj.h SmartPtr.h Threads.h Tuple.h TypeInfo.h TypeManip.h TypeTraits.h Typelist.h Visitor.h readme.txt static_check.h /current/source/third-party/Loki/tools/HeaderGen HeaderGen.cpp HeaderGen.sln HeaderGen.vcproj Headers.lst readme.txt vendors.lst /current/source/third-party/Loki/tools/RegressionTest RegressionTest.sln Simulate_PS.cpp Test_AbstractFactory.cpp Test_Factory.cpp Test_Functor.cpp Test_HierarchyGenerators1.cpp Test_HierarchyGenerators2.cpp Test_HierarchyGenerators3.cpp Test_HierarchyGenerators4.cpp Test_MultiMethods.cpp Test_Singleton.cpp Test_SmallObj.cpp Test_SmartPtr.cpp Test_SmartPtrWin.cpp Test_Threads.cpp Test_Tuple.cpp Test_TypeList.cpp Test_Variant.cpp Test_Visitor.cpp readme.txt /current/source/third-party/Loki/tools/RegressionTest/AllTest AllTest.cpp AllTest.vcproj /current/source/third-party/Loki/tools/RegressionTest2 AbstractFactoryTest.h AssocVectorTest.h FactoryTest.h FunctorTest.h LokiTest.h SingletonTest.h SmallObjectTest.h SmartPtrTest.h Test.cpp TypeManipTest.h TypeTraitsTest.h TypelistTest.h UnitTest.h /current/source/viewers ncurses_viewer.ncb ncurses_viewer.sln ncurses_viewer.suo ncurses_viewer.vcproj

kaben avida-cvs at alife.org
Wed Sep 24 09:12:14 PDT 2003


kaben		Wed Sep 24 01:12:14 2003 EDT

  Modified files:              
    /avida/current	NEWS configure.in 
    /avida/current/source	defs.hh 
    /avida/current/source/main	primitive.ncb primitive.sln 
                              	primitive.suo primitive.vcproj 
                              	population.cc 
    /avida/current/source/qt-viewer	activate_watcher.hh 
                                   	activate_watcher_proto.hh 
                                   	avd_avida_thread_drvr_dbg.hh 
                                   	avd_avida_thread_drvr_dbg_proto.hh 
                                   	avd_connections.cc 
                                   	avd_connections.hh 
                                   	avd_message_display.cc 
                                   	avd_message_display.hh 
                                   	avd_message_display_proto.hh 
                                   	avd_message_display_typetrack.hh 
                                   	avd_message_display_typetrack_proto.hh 
                                   	avd_qstr_message_display.cc 
                                   	qt_viewer.ncb qt_viewer.sln 
                                   	qt_viewer.suo qt_viewer.vcproj 
                                   	retainable.cc retainable.hh 
                                   	retainable_dbg.hh 
                                   	retainable_dbg_proto.hh 
                                   	retainable_proto.hh tRList.hh 
                                   	tRList_proto.hh tRetainable_list.hh 
                                   	tRetainable_list_proto.hh 
                                   	watch_retains.cc watch_retains.hh 
                                   	watch_retains_proto.hh 
                                   	n_orig_instruction_cpu_widget.cc 
                                   	n_orig_instruction_cpu_widget.hh 
    /avida/current/source/support	genesis genesis.4stack 
    /avida/current/source/third-party/Loki	AbstractFactory.h 
                                          	AssocVector.h EmptyType.h 
                                          	Factory.h Functor.h 
                                          	HierarchyGenerators.h 
                                          	Loki.pri Makefile.am 
                                          	MultiMethods.h NullType.h 
                                          	Singleton.cpp Singleton.h 
                                          	SmallObj.cpp SmallObj.h 
                                          	SmartPtr.h Threads.h Tuple.h 
                                          	TypeInfo.h TypeManip.h 
                                          	TypeTraits.h Typelist.h 
                                          	Visitor.h readme.txt 
                                          	static_check.h 
    /avida/current/source/third-party/Loki/Borland	AbstractFactory.h 
                                                  	AssocVector.h 
                                                  	EmptyType.h 
                                                  	Factory.h Functor.h 
                                                  	HierarchyGenerators.h 
                                                  	MultiMethods.h 
                                                  	NullType.h 
                                                  	Singleton.cpp 
                                                  	Singleton.h 
                                                  	SmallObj.cpp 
                                                  	SmallObj.h 
                                                  	SmartPtr.h Threads.h 
                                                  	Tuple.h TypeInfo.h 
                                                  	TypeManip.h 
                                                  	TypeTraits.h 
                                                  	Typelist.h Visitor.h 
                                                  	loki_typeinfo.h 
                                                  	readme.txt 
                                                  	static_check.h 
    /avida/current/source/third-party/Loki/MSVC/1200	EmptyType.h 
                                                    	NullType.h 
                                                    	TypeList.h 
                                                    	TypeManip.h 
                                                    	TypeTraits.h 
                                                    	portby.txt 
    /avida/current/source/third-party/Loki/MSVC/1300	AbstractFactory.h 
                                                    	AssocVector.h 
                                                    	EmptyType.h 
                                                    	Factory.h 
                                                    	Functor.h 
                                                    	HierarchyGenerators.h 
                                                    	MinMax.h 
                                                    	MultiMethods.h 
                                                    	NullType.h 
                                                    	Singleton.cpp 
                                                    	Singleton.h 
                                                    	SmallObj.cpp 
                                                    	SmallObj.h 
                                                    	SmartPtr.h 
                                                    	Threads.h 
                                                    	TypeInfo.h 
                                                    	TypeList.h 
                                                    	TypeManip.h 
                                                    	TypeTraits.h 
                                                    	VC_Alignment.h 
                                                    	Variant.h 
                                                    	Visitor.h 
                                                    	portby.txt 
                                                    	readme.txt 
                                                    	static_check.h 
    /avida/current/source/third-party/Loki/Reference	AbstractFactory.h 
                                                    	AssocVector.h 
                                                    	EmptyType.h 
                                                    	Factory.h 
                                                    	Functor.h 
                                                    	HierarchyGenerators.h 
                                                    	MultiMethods.h 
                                                    	NullType.h 
                                                    	Singleton.cpp 
                                                    	Singleton.h 
                                                    	SmallObj.cpp 
                                                    	SmallObj.h 
                                                    	SmartPtr.h 
                                                    	Threads.h Tuple.h 
                                                    	TypeInfo.h 
                                                    	TypeManip.h 
                                                    	TypeTraits.h 
                                                    	Typelist.h 
                                                    	Visitor.h 
                                                    	readme.txt 
                                                    	static_check.h 
    /avida/current/source/third-party/Loki/tools/HeaderGen	
                                                          	HeaderGen.cpp 
                                                          	HeaderGen.sln 
                                                          	HeaderGen.vcproj 
                                                          	Headers.lst 
                                                          	readme.txt 
                                                          	vendors.lst 
    /avida/current/source/third-party/Loki/tools/RegressionTest	
                                                               	RegressionTest.sln 
                                                               	Simulate_PS.cpp 
                                                               	Test_AbstractFactory.cpp 
                                                               	Test_Factory.cpp 
                                                               	Test_Functor.cpp 
                                                               	Test_HierarchyGenerators1.cpp 
                                                               	Test_HierarchyGenerators2.cpp 
                                                               	Test_HierarchyGenerators3.cpp 
                                                               	Test_HierarchyGenerators4.cpp 
                                                               	Test_MultiMethods.cpp 
                                                               	Test_Singleton.cpp 
                                                               	Test_SmallObj.cpp 
                                                               	Test_SmartPtr.cpp 
                                                               	Test_SmartPtrWin.cpp 
                                                               	Test_Threads.cpp 
                                                               	Test_Tuple.cpp 
                                                               	Test_TypeList.cpp 
                                                               	Test_Variant.cpp 
                                                               	Test_Visitor.cpp 
                                                               	readme.txt 
    /avida/current/source/third-party/Loki/tools/RegressionTest/AllTest	
                                                                       	AllTest.cpp 
                                                                       	AllTest.vcproj 
    /avida/current/source/third-party/Loki/tools/RegressionTest2	
                                                                	AbstractFactoryTest.h 
                                                                	AssocVectorTest.h 
                                                                	FactoryTest.h 
                                                                	FunctorTest.h 
                                                                	LokiTest.h 
                                                                	SingletonTest.h 
                                                                	SmallObjectTest.h 
                                                                	SmartPtrTest.h 
                                                                	Test.cpp 
                                                                	TypeManipTest.h 
                                                                	TypeTraitsTest.h 
                                                                	TypelistTest.h 
                                                                	UnitTest.h 
    /avida/current/source/viewers	ncurses_viewer.ncb ncurses_viewer.sln 
                                 	ncurses_viewer.suo 
                                 	ncurses_viewer.vcproj 
  Log:
  
  Changes to instruction viewer in GUI:
  - Registers, inputs, and stacks data fields now try to autosize to keep
    their data visible.
  - Added radio buttons to switch between binary, hexadecimal, and decimal
    number formats in registers, inputs, and stacks data fields.
  
  Bumped version to 2.0b6 since this version will be posted on sourceforge
  as downloadable applications and a tarball.
  
  
  
-------------- next part --------------
Index: avida/current/NEWS
diff -u avida/current/NEWS:1.24 avida/current/NEWS:1.25
--- avida/current/NEWS:1.24	Fri Jun  6 14:17:26 2003
+++ avida/current/NEWS	Wed Sep 24 01:11:59 2003
@@ -4,6 +4,65 @@
 [B] = Bug fix; something that used to work wrong will now be correct.
 [M] = Major change; avida will function differently in certain circumstances.
 
+
+For version 2.0 beta 6:
+
+September, 03
+[B] Widened number display fields in CPU viewer so that data can be read
+    correctly.
+
+[F] Added buttons to select number format (binary, decimal, or
+    hexadecimal) in Register, Inputs, and Stacks views of CPU viewer in
+    GUI.
+
+[B] Minor bugfixes in 4-stack cpu parasite code.
+
+[F] Added option to count phenotypes based on tasks completed.
+
+For version 2.0 beta 5:
+
+August, 03
+[B] Workaround for bug in Qt/Windows: setInsideSpacing can't be safely
+    called, so removed those calls.
+
+[F] Addition of CPU stats to instruction viewer in GUI.
+
+[B] Organism inputs are no longer per-cell, but per-organism; resolved
+    related problem of request of now nonexistent inputs.
+
+[B] Restored missing initializations of subclass of cPopulationInterface
+    class in qt-viewer.
+
+[B] Added documentation for some existing events.  Changed some
+    formatting of events.html documentation so file looks better with
+    Safari web browser.
+
+[B] Added missing files to visual studio project.
+
+[B] Restored compatibility with older versions of gcc.
+
+[F] Added parasite tracking for 4-stack cpus, added events
+    "print_dom_parasite" and "detail_parasite_pop", added default
+    organsisms and settings for the 4-stack cpu.
+
+[F] Added Bounded Grid/Torus (world topology) switch to population.
+    Leaving torus as the default.
+
+[B] Fixed some problems in mutation mapping in analyze mode.
+
+July, 03
+[B] Text viewer Zoom Screen Mini-Map fixed; Modified Map screen now in
+    color; Thread Map screen now shows number of threads used by each
+    organism.
+
+[F] Completion of 4 Stack Hardware.  Inject command and parasite
+    abilities now implemented.  Text Viewer environment view mode in
+    progress.
+
+[I] Added integer version WriteBlockElement to file output routines.
+
+[B] Correction of minor logical error in reaction handling.
+
 For version 2.0 beta 3:
 
 June, 03
Index: avida/current/configure.in
diff -u avida/current/configure.in:1.31 avida/current/configure.in:1.32
--- avida/current/configure.in:1.31	Tue Aug 26 18:04:34 2003
+++ avida/current/configure.in	Wed Sep 24 01:11:59 2003
@@ -8,7 +8,7 @@
 dnl ****************************************
 dnl        Package name and version
 dnl ****************************************
-AM_INIT_AUTOMAKE(avida, 2.0b5)
+AM_INIT_AUTOMAKE(avida, 2.0b6)
 
 
 dnl ****************************************
Index: avida/current/source/defs.hh
diff -u avida/current/source/defs.hh:1.31 avida/current/source/defs.hh:1.32
--- avida/current/source/defs.hh:1.31	Tue Aug 26 18:04:35 2003
+++ avida/current/source/defs.hh	Wed Sep 24 01:12:00 2003
@@ -75,7 +75,7 @@
 // the macro VERSION is defined by automake (in the file 'configure.in' in
 // the top-level directory).
 #ifndef VERSION
- #define VERSION "2.0b5"
+ #define VERSION "2.0b6"
 #endif
 #define AVIDA_VERSION VERSION
 
Index: avida/current/source/main/primitive.ncb
Index: avida/current/source/main/primitive.sln
diff -u /dev/null avida/current/source/main/primitive.sln:1.8
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/main/primitive.sln	Wed Sep 24 01:12:03 2003
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "primitive", "primitive.vcproj", "{D090D0B7-F4CE-4998-9447-665551EC2287}"
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		ConfigName.0 = primitive-debug
+		ConfigName.1 = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{D090D0B7-F4CE-4998-9447-665551EC2287}.primitive-debug.ActiveCfg = Debug|Win32
+		{D090D0B7-F4CE-4998-9447-665551EC2287}.primitive-debug.Build.0 = Debug|Win32
+		{D090D0B7-F4CE-4998-9447-665551EC2287}.Release.ActiveCfg = Release|Win32
+		{D090D0B7-F4CE-4998-9447-665551EC2287}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
Index: avida/current/source/main/primitive.suo
Index: avida/current/source/main/primitive.vcproj
diff -u /dev/null avida/current/source/main/primitive.vcproj:1.8
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/main/primitive.vcproj	Wed Sep 24 01:12:03 2003
@@ -0,0 +1,533 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="primitive"
+	ProjectGUID="{461e7351-c13c-48ef-8c3b-d2f22cb33935}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -w34100 -w34189"
+				Optimization="0"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..,..\cpu,..\event,..\main,..\third-party\trio-1.9,..\tools,$(QTDIR)\include,C:\cygwin\home\Kaben\CygwinExperiment\current\source\main,$(QTDIR)\mkspecs\win32-msvc.net"
+				PreprocessorDefinitions="_CONSOLE,UNICODE,WIN32,QT_DLL,QT_THREAD_SUPPORT"
+				GeneratePreprocessedFile="0"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\primitive.pch"
+				AssemblerListingLocation=".\"
+				ObjectFile=".\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="qt-mteval312.lib qtmain.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile=".\primitive.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="$(QTDIR)\lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="primitive.pdb"
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\main\analyze.cc">
+			</File>
+			<File
+				RelativePath="..\main\analyze_util.cc">
+			</File>
+			<File
+				RelativePath="..\main\avida.cc">
+			</File>
+			<File
+				RelativePath="..\tools\b_struct2.cc">
+			</File>
+			<File
+				RelativePath="..\main\birth_chamber.cc">
+			</File>
+			<File
+				RelativePath="..\tools\block_struct.cc">
+			</File>
+			<File
+				RelativePath="..\main\callback_util.cc">
+			</File>
+			<File
+				RelativePath="..\main\config.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_memory.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_stack.cc">
+			</File>
+			<File
+				RelativePath="..\tools\data_entry.cc">
+			</File>
+			<File
+				RelativePath="..\tools\data_manager.cc">
+			</File>
+			<File
+				RelativePath="..\tools\datafile.cc">
+			</File>
+			<File
+				RelativePath="..\main\environment.cc">
+			</File>
+			<File
+				RelativePath="..\event\event.cc">
+			</File>
+			<File
+				RelativePath="..\event\event_factory.cc">
+			</File>
+			<File
+				RelativePath="..\event\event_factory_manager.cc">
+			</File>
+			<File
+				RelativePath="..\event\event_list.cc">
+			</File>
+			<File
+				RelativePath="..\tools\file.cc">
+			</File>
+			<File
+				RelativePath="..\main\fitness_matrix.cc">
+			</File>
+			<File
+				RelativePath="..\main\genebank.cc">
+			</File>
+			<File
+				RelativePath="..\main\genome.cc">
+			</File>
+			<File
+				RelativePath="..\main\genome_util.cc">
+			</File>
+			<File
+				RelativePath="..\main\genotype.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_base.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_cpu.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_factory.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_util.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\head.cc">
+			</File>
+			<File
+				RelativePath="..\tools\help.cc">
+			</File>
+			<File
+				RelativePath="..\main\inst.cc">
+			</File>
+			<File
+				RelativePath="..\main\inst_util.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\label.cc">
+			</File>
+			<File
+				RelativePath="..\main\landscape.cc">
+			</File>
+			<File
+				RelativePath="..\main\lineage.cc">
+			</File>
+			<File
+				RelativePath="..\main\lineage_control.cc">
+			</File>
+			<File
+				RelativePath="..\tools\merit.cc">
+			</File>
+			<File
+				RelativePath="..\tools\message_display.cc">
+			</File>
+			<File
+				RelativePath="..\main\mutations.cc">
+			</File>
+			<File
+				RelativePath="..\main\organism.cc">
+			</File>
+			<File
+				RelativePath="..\main\phenotype.cc">
+			</File>
+			<File
+				RelativePath="..\main\pop_interface.cc">
+			</File>
+			<File
+				RelativePath="..\main\population.cc">
+			</File>
+			<File
+				RelativePath="..\main\population_cell.cc">
+			</File>
+			<File
+				RelativePath="..\event\population_event_factory.cc">
+			</File>
+			<File
+				RelativePath="primitive.cc">
+			</File>
+			<File
+				RelativePath="..\tools\random.cc">
+			</File>
+			<File
+				RelativePath="..\main\reaction.cc">
+			</File>
+			<File
+				RelativePath="..\main\reaction_result.cc">
+			</File>
+			<File
+				RelativePath="..\main\resource.cc">
+			</File>
+			<File
+				RelativePath="..\main\resource_count.cc">
+			</File>
+			<File
+				RelativePath="..\tools\slice.cc">
+			</File>
+			<File
+				RelativePath="..\main\species.cc">
+			</File>
+			<File
+				RelativePath="..\tools\stat.cc">
+			</File>
+			<File
+				RelativePath="..\main\stats.cc">
+			</File>
+			<File
+				RelativePath="..\tools\string.cc">
+			</File>
+			<File
+				RelativePath="..\tools\string_list.cc">
+			</File>
+			<File
+				RelativePath="..\tools\string_util.cc">
+			</File>
+			<File
+				RelativePath="..\main\tasks.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\test_cpu.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\test_util.cc">
+			</File>
+			<File
+				RelativePath="..\tools\tools.cc">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trio.c">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trionan.c">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triostr.c">
+			</File>
+			<File
+				RelativePath="..\tools\weighted_index.cc">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\main\analyze.hh">
+			</File>
+			<File
+				RelativePath="..\main\analyze_util.hh">
+			</File>
+			<File
+				RelativePath="..\main\avida.hh">
+			</File>
+			<File
+				RelativePath="..\tools\b_struct2.hh">
+			</File>
+			<File
+				RelativePath="..\main\birth_chamber.hh">
+			</File>
+			<File
+				RelativePath="..\tools\block_struct.hh">
+			</File>
+			<File
+				RelativePath="..\main\callback_util.hh">
+			</File>
+			<File
+				RelativePath="..\main\config.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_defs.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_memory.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_stack.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_stats.hh">
+			</File>
+			<File
+				RelativePath="..\tools\data_entry.hh">
+			</File>
+			<File
+				RelativePath="..\tools\data_manager.hh">
+			</File>
+			<File
+				RelativePath="..\tools\datafile.hh">
+			</File>
+			<File
+				RelativePath="..\main\environment.hh">
+			</File>
+			<File
+				RelativePath="..\event\event.hh">
+			</File>
+			<File
+				RelativePath="..\event\event_factory.hh">
+			</File>
+			<File
+				RelativePath="..\event\event_factory_manager.hh">
+			</File>
+			<File
+				RelativePath="..\event\event_list.hh">
+			</File>
+			<File
+				RelativePath="..\tools\file.hh">
+			</File>
+			<File
+				RelativePath="..\main\fitness_matrix.hh">
+			</File>
+			<File
+				RelativePath="..\tools\functions.hh">
+			</File>
+			<File
+				RelativePath="..\main\genebank.hh">
+			</File>
+			<File
+				RelativePath="..\main\genome.hh">
+			</File>
+			<File
+				RelativePath="..\main\genome_util.hh">
+			</File>
+			<File
+				RelativePath="..\main\genotype.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_base.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_cpu.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_factory.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_method.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_util.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\head.hh">
+			</File>
+			<File
+				RelativePath="..\tools\help.hh">
+			</File>
+			<File
+				RelativePath="..\main\inst.hh">
+			</File>
+			<File
+				RelativePath="..\main\inst_lib.hh">
+			</File>
+			<File
+				RelativePath="..\main\inst_util.hh">
+			</File>
+			<File
+				RelativePath="..\tools\int.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\label.hh">
+			</File>
+			<File
+				RelativePath="..\main\landscape.hh">
+			</File>
+			<File
+				RelativePath="..\main\lineage.hh">
+			</File>
+			<File
+				RelativePath="..\main\lineage_control.hh">
+			</File>
+			<File
+				RelativePath="..\tools\merit.hh">
+			</File>
+			<File
+				RelativePath="..\tools\message_display.hh">
+			</File>
+			<File
+				RelativePath="..\tools\message_display_hdrs.hh">
+			</File>
+			<File
+				RelativePath="..\main\mutations.hh">
+			</File>
+			<File
+				RelativePath="..\main\organism.hh">
+			</File>
+			<File
+				RelativePath="..\main\phenotype.hh">
+			</File>
+			<File
+				RelativePath="..\main\pop_interface.hh">
+			</File>
+			<File
+				RelativePath="..\main\population.hh">
+			</File>
+			<File
+				RelativePath="..\main\population_cell.hh">
+			</File>
+			<File
+				RelativePath="..\event\population_event_factory.hh">
+			</File>
+			<File
+				RelativePath="..\tools\random.hh">
+			</File>
+			<File
+				RelativePath="..\main\reaction.hh">
+			</File>
+			<File
+				RelativePath="..\main\reaction_result.hh">
+			</File>
+			<File
+				RelativePath="..\main\resource.hh">
+			</File>
+			<File
+				RelativePath="..\main\resource_count.hh">
+			</File>
+			<File
+				RelativePath="..\tools\slice.hh">
+			</File>
+			<File
+				RelativePath="..\main\species.hh">
+			</File>
+			<File
+				RelativePath="..\tools\stat.hh">
+			</File>
+			<File
+				RelativePath="..\main\stats.hh">
+			</File>
+			<File
+				RelativePath="..\tools\string.hh">
+			</File>
+			<File
+				RelativePath="..\tools\string_list.hh">
+			</File>
+			<File
+				RelativePath="..\tools\string_util.hh">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\strio.h">
+			</File>
+			<File
+				RelativePath="..\tools\tArray.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tBuffer.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tDictionary.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tList.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tMatrix.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tVector.hh">
+			</File>
+			<File
+				RelativePath="..\main\tasks.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\test_cpu.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\test_util.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tools.hh">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trio.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triodef.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trionan.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triop.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triostr.h">
+			</File>
+			<File
+				RelativePath="..\tools\weighted_index.hh">
+			</File>
+			<File
+				RelativePath="..\tools\win32_mkdir_hack.hh">
+			</File>
+		</Filter>
+		<File
+			RelativePath="..\cpu\hardware_4stack.cc">
+		</File>
+		<File
+			RelativePath="..\cpu\hardware_4stack.hh">
+		</File>
+		<File
+			RelativePath="inst_set.cc">
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: avida/current/source/main/population.cc
diff -u avida/current/source/main/population.cc:1.115 avida/current/source/main/population.cc:1.116
--- avida/current/source/main/population.cc:1.115	Tue Sep 23 16:01:14 2003
+++ avida/current/source/main/population.cc	Wed Sep 24 01:12:00 2003
@@ -1511,4 +1511,4 @@
   outfile.open(filename, ofstream::app);
   outfile << stats.GetUpdate() << "\t" << ids.size() << endl;
   outfile.close();
-}
\ No newline at end of file
+}
Index: avida/current/source/qt-viewer/activate_watcher.hh
diff -u /dev/null avida/current/source/qt-viewer/activate_watcher.hh:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/activate_watcher.hh	Wed Sep 24 01:12:03 2003
@@ -0,0 +1,15 @@
+#ifndef ACTIVATE_WATCHER_HH
+#define ACTIVATE_WATCHER_HH
+
+#ifndef RETAINABLE_HH
+#include "memory_mgt/retainable.hh"
+#endif
+#ifndef WATCH_RETAINS_HH
+#include "memory_mgt/watch_retains.hh"
+#endif
+
+#ifndef ACTIVATE_WATCHER_PROTO_HH
+#include "activate_watcher_proto.hh"
+#endif
+
+#endif
Index: avida/current/source/qt-viewer/activate_watcher_proto.hh
diff -u /dev/null avida/current/source/qt-viewer/activate_watcher_proto.hh:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/activate_watcher_proto.hh	Wed Sep 24 01:12:03 2003
@@ -0,0 +1,21 @@
+#ifndef ACTIVATE_WATCHER_PROTO_HH
+#define ACTIVATE_WATCHER_PROTO_HH
+
+class cActivateWatcher : public cRetainable {
+private:
+  /* disabled */ cActivateWatcher(const cActivateWatcher &);
+  /* disabled */ cActivateWatcher operator =(const cActivateWatcher &);
+protected:
+  cWatchRetains *m_w;
+protected:
+  void setWatch(cWatchRetains *w){
+    if(w) w->retain(); if(m_w) m_w->release(); m_w = w; }
+  cWatchRetains *getWatch(){ return m_w; }
+public:
+  cActivateWatcher(cWatchRetains *w):m_w(0){
+    setWatch(w); if(getWatch()) getWatch()->activate(); }
+  ~cActivateWatcher(){
+    if(getWatch()) getWatch()->deactivate(); setWatch(0); }
+};
+
+#endif
Index: avida/current/source/qt-viewer/avd_avida_thread_drvr_dbg.hh
diff -u /dev/null avida/current/source/qt-viewer/avd_avida_thread_drvr_dbg.hh:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/avd_avida_thread_drvr_dbg.hh	Wed Sep 24 01:12:03 2003
@@ -0,0 +1,12 @@
+#ifndef AVD_AVIDA_THREAD_DRVR_DBG_HH
+#define AVD_AVIDA_THREAD_DRVR_DBG_HH
+
+#ifndef AVD_MESSAGE_DISPLAY_HH
+#include "avd_message_display.hh"
+#endif
+
+#ifndef AVD_AVIDA_THREAD_DRVR_DBG_PROTO_HH
+#include "avd_avida_thread_drvr_dbg_proto.hh"
+#endif
+
+#endif
Index: avida/current/source/qt-viewer/avd_avida_thread_drvr_dbg_proto.hh
diff -u /dev/null avida/current/source/qt-viewer/avd_avida_thread_drvr_dbg_proto.hh:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/avd_avida_thread_drvr_dbg_proto.hh	Wed Sep 24 01:12:04 2003
@@ -0,0 +1,13 @@
+#ifndef AVD_AVIDA_THREAD_DRVR_DBG_PROTO_HH
+#define AVD_AVIDA_THREAD_DRVR_DBG_PROTO_HH
+
+extern avdMessageType  Info_THRD_DRVR_avdMsg;
+extern avdMessageType Debug_THRD_DRVR_avdMsg;
+extern avdMessageType Error_THRD_DRVR_avdMsg;
+extern avdMessageType Fatal_THRD_DRVR_avdMsg;
+#define  Info  AVD_INFO_MSG(THRD_DRVR)
+#define Debug AVD_DEBUG_MSG(THRD_DRVR)
+#define Error AVD_ERROR_MSG(THRD_DRVR)
+#define Fatal AVD_FATAL_MSG(THRD_DRVR)
+
+#endif
Index: avida/current/source/qt-viewer/avd_connections.cc
diff -u /dev/null avida/current/source/qt-viewer/avd_connections.cc:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/avd_connections.cc	Wed Sep 24 01:12:04 2003
@@ -0,0 +1,11 @@
+#ifndef QOBJECT_H
+#include <qobject.h>
+#endif
+
+#ifndef AVD_CONNECTIONS_HH
+#include "avd_connections.hh"
+#endif
+
+bool avdConnections::add(const char *sender_signal, const char *receiver_member)
+{ return QObject::connect(m_sender, sender_signal, m_receiver, receiver_member); }
+
Index: avida/current/source/qt-viewer/avd_connections.hh
diff -u /dev/null avida/current/source/qt-viewer/avd_connections.hh:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/avd_connections.hh	Wed Sep 24 01:12:04 2003
@@ -0,0 +1,18 @@
+#ifndef AVD_CONNECTIONS_HH
+#define AVD_CONNECTIONS_HH
+
+class QObject;
+class avdConnections {
+private:
+  /* disabled */ avdConnections();
+  /* disabled */ avdConnections(const avdConnections &);
+  /* disabled */ avdConnections& operator=(const avdConnections &);
+protected:
+  const QObject *m_sender, *m_receiver;
+public:
+  avdConnections(const QObject *sender, const QObject *receiver)
+  : m_sender(sender), m_receiver(receiver){}
+  bool add(const char *sender_signal, const char *receiver_member);
+};
+
+#endif
Index: avida/current/source/qt-viewer/avd_message_display.cc
diff -u /dev/null avida/current/source/qt-viewer/avd_message_display.cc:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/avd_message_display.cc	Wed Sep 24 01:12:04 2003
@@ -0,0 +1,203 @@
+#ifndef _LIMITS_H___
+#include <limits.h>
+#endif
+#ifndef _STDIO_H_
+#include <stdio.h>
+#endif
+#ifndef _STDARG_H
+#include <stdarg.h>
+#endif
+
+#ifndef AVD_MESSAGE_DISPLAY_TYPETRACK_HH
+#include "avd_message_display_typetrack.hh"
+#endif
+
+#ifndef TRIO_TRIO_H
+#include "third-party/trio-1.9/trio.h"
+#endif
+
+#ifndef AVD_MESSAGE_DISPLAY_HH
+#include "avd_message_display.hh"
+#endif
+
+using namespace std;
+
+
+avdDefaultMessageDisplay s_avd_info_msg_out(&cout);
+avdDefaultMessageDisplay s_avd_debug_msg_out(&cout);
+avdDefaultMessageDisplay s_avd_error_msg_out(&cerr);
+avdDefaultMessageDisplay s_avd_fatal_msg_out(&cerr);
+avdDefaultMessageDisplay s_avd_plain_msg_out(&cout);
+avdMessageDisplay *s_avd_info_display(&s_avd_info_msg_out);
+avdMessageDisplay *s_avd_debug_display(&s_avd_debug_msg_out);
+avdMessageDisplay *s_avd_error_display(&s_avd_error_msg_out);
+avdMessageDisplay *s_avd_fatal_display(&s_avd_fatal_msg_out);
+avdMessageDisplay *s_avd_plain_display(&s_avd_plain_msg_out);
+avdMessageClass   avdMCInfo("Info:",  &s_avd_info_display, false, false, false);
+avdMessageClass avdMCDebug("Debug:", &s_avd_debug_display, false, false, false);
+avdMessageClass avdMCError("Error:", &s_avd_error_display, false, true, false);
+avdMessageClass avdMCFatal("Fatal:", &s_avd_fatal_display, true, true, false);
+avdMessageClass avdMCPlain("Plain:", &s_avd_plain_display, false, true, true);
+avdMessageType  Info_GEN_avdMsg("General", avdMCInfo);
+avdMessageType Debug_GEN_avdMsg("General", avdMCDebug);
+avdMessageType Error_GEN_avdMsg("General", avdMCError);
+avdMessageType Fatal_GEN_avdMsg("General", avdMCFatal);
+avdMessageType Plain_avdMsg("General", avdMCPlain);
+void setAvdInfoDisplay(avdMessageDisplay &md) { s_avd_info_display = &md; }
+void setAvdDebugDisplay(avdMessageDisplay &md) { s_avd_debug_display = &md; }
+void setAvdErrorDisplay(avdMessageDisplay &md) { s_avd_error_display = &md; }
+void setAvdFatalDisplay(avdMessageDisplay &md) { s_avd_fatal_display = &md; }
+void setAvdPlainDisplay(avdMessageDisplay &md) { s_avd_plain_display = &md; }
+namespace {
+  class DebugMsgTypeSetRegistration {
+  protected: avdMessageTypeSet *m_msg_types;
+  public:
+    DebugMsgTypeSetRegistration():m_msg_types(0){
+      if((m_msg_types = new avdMessageTypeSet)){
+        m_msg_types->Register("Plain",   &Plain_avdMsg);
+        m_msg_types->Register("Info",   &Info_GEN_avdMsg);
+        m_msg_types->Register("Debug", &Debug_GEN_avdMsg);
+        m_msg_types->Register("Error", &Error_GEN_avdMsg);
+        m_msg_types->Register("Fatal", &Fatal_GEN_avdMsg);
+        avdMessageSetTracker::Instance().Register("General", m_msg_types);
+    } }
+    ~DebugMsgTypeSetRegistration(){
+      avdMessageSetTracker::Instance().Unregister("General");
+      if(m_msg_types) delete m_msg_types;
+  } };
+  const DebugMsgTypeSetRegistration s_registration;
+}
+
+void avdDefaultMessageDisplay::out(const cString &final_msg)
+{ *m_out << final_msg << endl; m_out->flush(); }
+void avdMessageClass::configure(avdMessageType *message_type){
+  message_type->m_is_active = true;
+  message_type->m_show_where = true;
+  message_type->m_show_function = true;
+}
+avdMessageType::avdMessageType(
+  const char *type_name,
+  avdMessageClass &message_class
+):m_type_name(type_name),
+  m_message_class(message_class)
+{ message_class.configure(this); }
+avdMessageClosure::avdMessageClosure(
+  avdMessageType &type,
+  const char *function_name,
+  const char *file_name,
+  int line_number
+):m_type(type),
+  m_function(function_name),
+  m_file(file_name),
+  m_line(line_number),
+  m_error(INT_MAX),
+  m_op_count(0)
+{}
+avdMessageClosure::~avdMessageClosure(void){
+  (*m_type.m_message_class.m_msg_display)->out(m_msg);
+  if(m_type.m_message_class.m_is_fatal) (*m_type.m_message_class.m_msg_display)->abort();
+}
+void avdMessageClosure::prefix(void){
+  if(m_op_count++ == 0 && !m_type.m_message_class.m_no_prefix){
+    if(m_type.m_message_class.m_is_prefix){
+      m_msg += m_type.m_type_name;
+      m_msg += '-';
+    }
+    m_msg += m_type.m_message_class.m_class_name;
+    if(!m_type.m_message_class.m_is_prefix
+      ||m_type.m_show_function
+      ||m_type.m_show_where
+    ){
+      bool colon = false;
+      if(!m_type.m_message_class.m_is_prefix){
+        m_msg += m_type.m_type_name;
+        m_msg += ": ";
+      }
+      if(m_type.m_show_function || m_type.m_show_where){
+        m_msg += "<";
+      }
+      if(m_type.m_show_function){
+        m_msg += m_function;
+        colon = true;
+      }
+      if(m_type.m_show_where){
+        if(colon){m_msg += ':';}
+        m_msg += m_file;
+        m_msg += ':';
+        // FIXME:  consider move this varargs gunk to cString.  -- kgn.
+        {
+          int size = trio_snprintf((char *) 0, 0, "%i", m_line);
+          char *buf = new char[size + 1];
+          assert(buf != 0);
+          trio_snprintf(buf, size+1, "%i", m_line);
+          m_msg += buf;
+          delete[] buf;
+        }
+      }
+      if(m_type.m_show_function || m_type.m_show_where){
+        m_msg += ">";
+      }
+      m_msg += ' ';
+    } else {
+      m_msg += ':';
+    }
+  }
+}
+avdMessageClosure &avdMessageClosure::operator<<(char c)
+{ prefix(); m_msg += c; return *this; }
+avdMessageClosure &avdMessageClosure::operator<<(unsigned char c)
+{ prefix(); m_msg += c; return *this; }
+avdMessageClosure &avdMessageClosure::operator<<(const char *s)
+{ prefix(); m_msg += s; return *this; }
+
+//avdMessageClosure &avdMessageClosure::operator<<(int i)
+//{ return va("%d", i); }
+//avdMessageClosure &avdMessageClosure::operator<<(unsigned int i)
+//{ return va("%u", i); }
+//avdMessageClosure &avdMessageClosure::operator<<(long i)
+//{ return va("%ld", i); }
+//avdMessageClosure &avdMessageClosure::operator<<(unsigned long i)
+//{ return va("%lu", i); }
+//avdMessageClosure &avdMessageClosure::operator<<(float f)
+//{ return va("%g", f); }
+//avdMessageClosure &avdMessageClosure::operator<<(double f)
+//{ return va("%g", f); }
+//avdMessageClosure &avdMessageClosure::operator<<(const void *p)
+//{ return va("%p", p); }
+
+avdMessageClosure &avdMessageClosure::operator<<(int i)
+{ char buf[32]; trio_snprintf(buf, 32, "%d", i); m_msg += buf; return *this; }
+avdMessageClosure &avdMessageClosure::operator<<(unsigned int i)
+{ char buf[32]; trio_snprintf(buf, 32, "%u", i); m_msg += buf; return *this; }
+avdMessageClosure &avdMessageClosure::operator<<(long i)
+{ char buf[32]; trio_snprintf(buf, 32, "%ld", i); m_msg += buf; return *this; }
+avdMessageClosure &avdMessageClosure::operator<<(unsigned long i)
+{ char buf[32]; trio_snprintf(buf, 32, "%lu", i); m_msg += buf; return *this; }
+avdMessageClosure &avdMessageClosure::operator<<(float f)
+{ char buf[32]; trio_snprintf(buf, 32, "%g", f); m_msg += buf; return *this; }
+avdMessageClosure &avdMessageClosure::operator<<(double f)
+{ char buf[32]; trio_snprintf(buf, 32, "%g", f); m_msg += buf; return *this; }
+avdMessageClosure &avdMessageClosure::operator<<(const void *p)
+{ char buf[32]; trio_snprintf(buf, 32, "%p", p); m_msg += buf; return *this; }
+
+avdMessageClosure &avdMessageClosure::va(const char *fmt, ...)
+{
+  va_list ap;
+
+  va_start(ap, fmt);
+  int size = trio_vsnprintf((char *) 0, 0, fmt, ap);
+  va_end(ap);
+
+  char *buf = new char[size + 1];
+  assert(buf != 0);
+
+  va_start(ap, fmt);
+  trio_vsnprintf(buf, size+1, fmt, ap);
+  va_end(ap);
+
+  prefix();
+  m_msg += buf;
+  delete[] buf;
+  return *this;
+}
+
Index: avida/current/source/qt-viewer/avd_message_display.hh
diff -u /dev/null avida/current/source/qt-viewer/avd_message_display.hh:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/avd_message_display.hh	Wed Sep 24 01:12:04 2003
@@ -0,0 +1,15 @@
+#ifndef AVD_MESSAGE_DISPLAY_HH
+#define AVD_MESSAGE_DISPLAY_HH
+
+#ifndef _CPP_IOSTREAM
+#include <iostream>
+#endif
+#ifndef STRING_HH
+#include "tools/string.hh"
+#endif
+
+#ifndef AVD_MESSAGE_DISPLAY_PROTO_HH
+#include "avd_message_display_proto.hh"
+#endif
+
+#endif
Index: avida/current/source/qt-viewer/avd_message_display_proto.hh
diff -u /dev/null avida/current/source/qt-viewer/avd_message_display_proto.hh:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/avd_message_display_proto.hh	Wed Sep 24 01:12:04 2003
@@ -0,0 +1,152 @@
+#ifndef AVD_MESSAGE_DISPLAY_PROTO_HH
+#define AVD_MESSAGE_DISPLAY_PROTO_HH
+
+
+class avdMessageDisplay{
+public:
+  virtual void out(const cString &){}
+  virtual void abort(){ abort(); }
+};
+
+class avdDefaultMessageDisplay : public avdMessageDisplay {
+protected:
+  std::ostream *m_out;
+public:
+  avdDefaultMessageDisplay(std::ostream *stream):m_out(stream){}
+  void out(const cString &final_msg);
+};
+extern avdDefaultMessageDisplay s_avd_info_msg_out;
+extern avdDefaultMessageDisplay s_avd_debug_msg_out;
+extern avdDefaultMessageDisplay s_avd_error_msg_out;
+extern avdDefaultMessageDisplay s_avd_fatal_msg_out;
+extern avdDefaultMessageDisplay s_avd_plain_msg_out;
+void setAvdInfoDisplay(avdMessageDisplay &info);
+void setAvdDebugDisplay(avdMessageDisplay &md);
+void setAvdErrorDisplay(avdMessageDisplay &md);
+void setAvdFatalDisplay(avdMessageDisplay &md);
+void setAvdPlainDisplay(avdMessageDisplay &md);
+
+class avdMessageType;
+class avdMessageClass{
+public:
+  avdMessageClass(
+    const char *class_name,
+    avdMessageDisplay **msg_display,
+    bool is_fatal,
+    bool is_prefix,
+    bool no_prefix
+  ):m_class_name(class_name), m_msg_display(msg_display),
+  m_is_fatal(is_fatal), m_is_prefix(is_prefix), m_no_prefix(no_prefix){}
+public:
+  void configure(avdMessageType *message_type);
+public:
+  const char *const m_class_name;
+  avdMessageDisplay **m_msg_display;
+  bool const m_is_fatal;
+  bool const m_is_prefix;
+  bool const m_no_prefix;
+};
+
+class avdMessageType{
+public:
+  avdMessageType(const char *type_name, avdMessageClass &message_class);
+public:
+  const char *m_type_name;
+  const avdMessageClass &m_message_class;
+  bool m_is_active;
+  bool m_show_where;
+  bool m_show_function;
+};
+
+class QString;
+class avdMessageClosure{
+protected:
+  avdMessageType &m_type;
+  const char *m_function;
+  const char *m_file;
+  int m_line;
+  int m_error;
+  int m_op_count;
+  cString m_msg;
+public:
+  avdMessageClosure(
+    avdMessageType &type,
+    const char *function_name,
+    const char *file_name,
+    int line_number
+  );
+  ~avdMessageClosure(void);
+public:
+  avdMessageClosure &operator<<(char c);
+  avdMessageClosure &operator<<(unsigned char c);
+  avdMessageClosure &operator<<(const char *s);
+  avdMessageClosure &operator<<(int i);
+  avdMessageClosure &operator<<(unsigned int i);
+  avdMessageClosure &operator<<(long i);
+  avdMessageClosure &operator<<(unsigned long i);
+  avdMessageClosure &operator<<(float f);
+  avdMessageClosure &operator<<(double f);
+  avdMessageClosure &operator<<(const void *p);
+  avdMessageClosure &operator<<(const QString &s);
+
+  avdMessageClosure &operator()(char c){ return operator<<(c); }
+  avdMessageClosure &operator()(unsigned char c){ return operator<<(c); }
+  avdMessageClosure &operator()(const char *s){ return operator<<(s); }
+  avdMessageClosure &operator()(int i){ return operator<<(i); }
+  avdMessageClosure &operator()(unsigned int i){ return operator<<(i); }
+  avdMessageClosure &operator()(long i){ return operator<<(i); }
+  avdMessageClosure &operator()(unsigned long i){ return operator<<(i); }
+  avdMessageClosure &operator()(float f){ return operator<<(f); }
+  avdMessageClosure &operator()(double f){ return operator<<(f); }
+  avdMessageClosure &operator()(const void *p){ return operator<<(p); }
+  avdMessageClosure &operator()(const QString &s){ return operator<<(s); }
+
+  avdMessageClosure &va(const char *fmt, ...);
+  void prefix(void);
+};
+
+#define AVD_MSG_CLOSURE_FL(x)\
+  avdMessageClosure(\
+    x,\
+    __PRETTY_FUNCTION__,\
+    __FILE__,\
+    __LINE__\
+  )
+
+#define AVD_INFO_MSG(type)\
+  if (Info_ ## type ## _avdMsg.m_is_active)\
+    AVD_MSG_CLOSURE_FL(Info_ ## type ## _avdMsg)
+
+#define AVD_DEBUG_MSG(type)\
+  if (Debug_ ## type ## _avdMsg.m_is_active)\
+    AVD_MSG_CLOSURE_FL(Debug_ ## type ## _avdMsg)
+
+#define AVD_ERROR_MSG(type)\
+  if (Error_ ## type ## _avdMsg.m_is_active)\
+    AVD_MSG_CLOSURE_FL(Error_ ## type ## _avdMsg)
+
+#define AVD_FATAL_MSG(type)\
+  if (Fatal_ ## type ## _avdMsg.m_is_active)\
+    AVD_MSG_CLOSURE_FL(Fatal_ ## type ## _avdMsg)
+
+#define AVD_PLAIN_MSG(type)\
+  if (type ## _avdMsg.m_is_active)\
+    AVD_MSG_CLOSURE_FL(type ## _avdMsg)
+
+extern avdMessageClass avdMCInfo;
+extern avdMessageClass avdMCDebug;
+extern avdMessageClass avdMCError;
+extern avdMessageClass avdMCFatal;
+extern avdMessageClass avdMCPlain;
+extern avdMessageType     Info_GEN_avdMsg;
+extern avdMessageType    Debug_GEN_avdMsg;
+extern avdMessageType    Error_GEN_avdMsg;
+extern avdMessageType    Fatal_GEN_avdMsg;
+#define avdInfo   AVD_INFO_MSG(GEN)
+#define avdDebug AVD_DEBUG_MSG(GEN)
+#define avdError AVD_ERROR_MSG(GEN)
+#define avdFatal AVD_FATAL_MSG(GEN)
+extern avdMessageType Plain_avdMsg;
+#define Message AVD_PLAIN_MSG(Plain)
+
+#endif
Index: avida/current/source/qt-viewer/avd_message_display_typetrack.hh
diff -u /dev/null avida/current/source/qt-viewer/avd_message_display_typetrack.hh:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/avd_message_display_typetrack.hh	Wed Sep 24 01:12:04 2003
@@ -0,0 +1,24 @@
+#ifndef AVD_MESSAGE_DISPLAY_TYPETRACK_HH
+#define AVD_MESSAGE_DISPLAY_TYPETRACK_HH
+
+/* XXX disables the small-object allocator; it crashes under OSX10.2.6. */
+#ifndef MAX_SMALL_OBJECT_SIZE
+#define MAX_SMALL_OBJECT_SIZE 0
+#endif
+/* XXX -- kaben */
+#ifndef ASSOCVECTOR_INC_
+#include "third-party/Loki/AssocVector.h"
+#endif
+#ifndef SINGLETON_INC_
+#include "third-party/Loki/Singleton.h"
+#endif
+
+#ifndef AVD_MESSAGE_DISPLAY_HH
+#include "avd_message_display.hh"
+#endif
+
+#ifndef AVD_MESSAGE_DISPLAY_TYPETRACK_PROTO_HH
+#include "avd_message_display_typetrack_proto.hh"
+#endif
+
+#endif
Index: avida/current/source/qt-viewer/avd_message_display_typetrack_proto.hh
diff -u /dev/null avida/current/source/qt-viewer/avd_message_display_typetrack_proto.hh:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/avd_message_display_typetrack_proto.hh	Wed Sep 24 01:12:04 2003
@@ -0,0 +1,55 @@
+#ifndef AVD_MESSAGE_DISPLAY_TYPETRACK_PROTO_HH
+#define AVD_MESSAGE_DISPLAY_TYPETRACK_PROTO_HH
+
+
+class avdMessageTypeSet{
+public:
+  bool Register(const std::string &id, avdMessageType *mt)
+  { return m_associations.insert(IdToMTMap::value_type(id, mt)).second; }
+  bool Unregister(const std::string &id)
+  { return m_associations.erase(id) == 1; }
+  avdMessageType *GetTypeTracker(const std::string &id){
+    IdToMTMap::iterator i = m_associations.find(id);
+    if (i != m_associations.end()) return i->second;
+    return 0;
+  }
+  Loki::AssocVector<std::string, avdMessageType *>::iterator
+  begin(){ return m_associations.begin(); }
+  Loki::AssocVector<std::string, avdMessageType *>::iterator
+  end(){ return m_associations.end(); }
+  Loki::AssocVector<std::string, avdMessageType *>::size_type
+  size(){ return m_associations.size(); }
+protected:
+  typedef Loki::AssocVector<std::string, avdMessageType *> IdToMTMap;
+  typedef Loki::AssocVector<std::string, avdMessageType *>::iterator Iterator;
+  IdToMTMap m_associations;
+};
+class _avdMessageSetTracker{
+public:
+  bool Register(const std::string &id, avdMessageTypeSet *ts)
+  { return m_associations.insert(IdToTSMap::value_type(id, ts)).second; }
+  bool Unregister(const std::string &id)
+  { return m_associations.erase(id) == 1; }
+  avdMessageTypeSet *GetTypeTracker(const std::string &id){
+    IdToTSMap::iterator i = m_associations.find(id);
+    if (i != m_associations.end()) return i->second;
+    return 0;
+  }
+  Loki::AssocVector<std::string, avdMessageTypeSet *>::iterator
+  begin(){ return m_associations.begin(); }
+  Loki::AssocVector<std::string, avdMessageTypeSet *>::iterator
+  end(){ return m_associations.end(); }
+  Loki::AssocVector<std::string, avdMessageTypeSet *>::size_type
+  size(){ return m_associations.size(); }
+protected:
+  typedef Loki::AssocVector<std::string, avdMessageTypeSet *> IdToTSMap;
+  typedef Loki::AssocVector<std::string, avdMessageTypeSet *>::iterator Iterator;
+  IdToTSMap m_associations;
+};
+typedef Loki::AssocVector<std::string, avdMessageType *>::iterator
+  avdMessageTypeIterator;
+typedef Loki::AssocVector<std::string, avdMessageTypeSet *>::iterator
+  avdMessageSetTrackerIterator;
+typedef Loki::SingletonHolder<_avdMessageSetTracker> avdMessageSetTracker;
+
+#endif
Index: avida/current/source/qt-viewer/avd_qstr_message_display.cc
diff -u /dev/null avida/current/source/qt-viewer/avd_qstr_message_display.cc:1.2
--- /dev/null	Wed Sep 24 01:12:11 2003
+++ avida/current/source/qt-viewer/avd_qstr_message_display.cc	Wed Sep 24 01:12:04 2003
@@ -0,0 +1,14 @@
+#ifndef QSTRING_H
+#include <qstring.h>
+#endif
+
+#ifndef AVD_MESSAGE_DISPLAY_HH
+#include "avd_message_display.hh"
+#endif
+
+avdMessageClosure &avdMessageClosure::operator<<(const QString &s){
+  prefix();
+  m_msg += (QString::null == s)?("(null)"):(s.latin1());
+  return *this;
+}
+
Index: avida/current/source/qt-viewer/qt_viewer.ncb
Index: avida/current/source/qt-viewer/qt_viewer.sln
diff -u /dev/null avida/current/source/qt-viewer/qt_viewer.sln:1.8
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/qt_viewer.sln	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qt-viewer", "qt_viewer.vcproj", "{341F7ED6-63EA-4C06-92D4-9F1F02A15288}"
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		ConfigName.0 = Debug
+		ConfigName.1 = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{341F7ED6-63EA-4C06-92D4-9F1F02A15288}.Debug.ActiveCfg = Release|Win32
+		{341F7ED6-63EA-4C06-92D4-9F1F02A15288}.Debug.Build.0 = Release|Win32
+		{341F7ED6-63EA-4C06-92D4-9F1F02A15288}.Release.ActiveCfg = Release|Win32
+		{341F7ED6-63EA-4C06-92D4-9F1F02A15288}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
Index: avida/current/source/qt-viewer/qt_viewer.suo
Index: avida/current/source/qt-viewer/qt_viewer.vcproj
diff -u /dev/null avida/current/source/qt-viewer/qt_viewer.vcproj:1.8
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/qt_viewer.vcproj	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,1460 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="qt-viewer"
+	ProjectGUID="{564914ad-b4de-46d0-9d7f-6b777aa3ffcc}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -w34100 -w34189"
+				Optimization="1"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..,..\cpu,..\event,..\main,..\third-party\trio-1.9,..\tools,$(QTDIR)\include,,c:\cygwin\home\Kaben\local\exp\current\source\qt-viewer,$(QTDIR)\mkspecs\win32-msvc.net"
+				PreprocessorDefinitions="QT_NO_DEBUG,NDEBUG,_CONSOLE,UNICODE,WIN32,QT_DLL,QT_THREAD_SUPPORT"
+				GeneratePreprocessedFile="0"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\qt-viewer.pch"
+				AssemblerListingLocation=".\"
+				ObjectFile=".\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/FORCE:MULTIPLE"
+				AdditionalDependencies="qt-mteval312.lib qtmain.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile=".\qt-viewer.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="$(QTDIR)\lib"
+				DelayLoadDLLs="comdlg32.dll,oleaut32.dll,winmm.dll,wsock32.dll,winspool.dll"
+				ProgramDatabaseFile="qt-viewer.pdb"
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\main\analyze.cc">
+			</File>
+			<File
+				RelativePath="..\main\analyze_util.cc">
+			</File>
+			<File
+				RelativePath="apocalypse_widget.cc">
+			</File>
+			<File
+				RelativePath="avd_avida_driver.cc">
+			</File>
+			<File
+				RelativePath="avd_driver_controller.cc">
+			</File>
+			<File
+				RelativePath="avd_event_viewer_controller.cc">
+			</File>
+			<File
+				RelativePath="avd_godbox_controller.cc">
+			</File>
+			<File
+				RelativePath="avd_help_controller.cc">
+			</File>
+			<File
+				RelativePath="avd_help_viewer.cc">
+			</File>
+			<File
+				RelativePath="avd_instruction_viewer_controller.cc">
+			</File>
+			<File
+				RelativePath="avd_lograte_widget.cc">
+			</File>
+			<File
+				RelativePath="avd_main_window.cc">
+			</File>
+			<File
+				RelativePath="avd_main_window_controller.cc">
+			</File>
+			<File
+				RelativePath="avd_mission_control.cc">
+			</File>
+			<File
+				RelativePath="avd_plot_viewer_controller.cc">
+			</File>
+			<File
+				RelativePath="avd_rate_slider2.cc">
+			</File>
+			<File
+				RelativePath="avd_rate_validator2.cc">
+			</File>
+			<File
+				RelativePath="..\main\avida.cc">
+			</File>
+			<File
+				RelativePath="avida_data.cc">
+			</File>
+			<File
+				RelativePath="avida_plot_widget.cc">
+			</File>
+			<File
+				RelativePath="..\tools\b_struct2.cc">
+			</File>
+			<File
+				RelativePath="..\main\birth_chamber.cc">
+			</File>
+			<File
+				RelativePath="..\tools\block_struct.cc">
+			</File>
+			<File
+				RelativePath="..\main\callback_util.cc">
+			</File>
+			<File
+				RelativePath="color_scale_widget.cc">
+			</File>
+			<File
+				RelativePath="..\main\config.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_memory.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_stack.cc">
+			</File>
+			<File
+				RelativePath="..\tools\data_entry.cc">
+			</File>
+			<File
+				RelativePath="..\tools\data_manager.cc">
+			</File>
+			<File
+				RelativePath="..\tools\datafile.cc">
+			</File>
+			<File
+				RelativePath="double_slider.cc">
+			</File>
+			<File
+				RelativePath="..\main\environment.cc">
+			</File>
+			<File
+				RelativePath="..\event\event.cc">
+			</File>
+			<File
+				RelativePath="..\event\event_factory.cc">
+			</File>
+			<File
+				RelativePath="..\event\event_factory_manager.cc">
+			</File>
+			<File
+				RelativePath="..\event\event_list.cc">
+			</File>
+			<File
+				RelativePath="event_view_widget.cc">
+			</File>
+			<File
+				RelativePath="..\tools\file.cc">
+			</File>
+			<File
+				RelativePath="..\main\fitness_matrix.cc">
+			</File>
+			<File
+				RelativePath="..\main\genebank.cc">
+			</File>
+			<File
+				RelativePath="..\main\genome.cc">
+			</File>
+			<File
+				RelativePath="..\main\genome_util.cc">
+			</File>
+			<File
+				RelativePath="..\main\genotype.cc">
+			</File>
+			<File
+				RelativePath="godbox_widget2.cc">
+			</File>
+			<File
+				RelativePath="gui_message_display.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_base.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_cpu.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_factory.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_util.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\head.cc">
+			</File>
+			<File
+				RelativePath="..\tools\help.cc">
+			</File>
+			<File
+				RelativePath="..\main\inst.cc">
+			</File>
+			<File
+				RelativePath="..\main\inst_util.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\label.cc">
+			</File>
+			<File
+				RelativePath="..\main\landscape.cc">
+			</File>
+			<File
+				RelativePath="..\main\lineage.cc">
+			</File>
+			<File
+				RelativePath="..\main\lineage_control.cc">
+			</File>
+			<File
+				RelativePath="main.cc">
+			</File>
+			<File
+				RelativePath="map_view.cc">
+			</File>
+			<File
+				RelativePath="map_view_cell_entry.cc">
+			</File>
+			<File
+				RelativePath="map_view_widget.cc">
+			</File>
+			<File
+				RelativePath="..\tools\merit.cc">
+			</File>
+			<File
+				RelativePath="..\tools\message_display.cc">
+			</File>
+			<File
+				RelativePath="messaging_population_wrapper.cc">
+			</File>
+			<File
+				RelativePath="..\main\mutations.cc">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_buttons_widget.cc">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_cpu_widget.cc">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_field_widget.cc">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_line_pixmap_pair.cc">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_line_widget.cc">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_pixmapstructs.cc">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_scrollview.cc">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_scrollview_config.cc">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_view_widget.cc">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_viewer.cc">
+			</File>
+			<File
+				RelativePath="..\main\organism.cc">
+			</File>
+			<File
+				RelativePath="..\main\phenotype.cc">
+			</File>
+			<File
+				RelativePath="plot_select_dia_impl.cc">
+			</File>
+			<File
+				RelativePath="plot_widget.cc">
+			</File>
+			<File
+				RelativePath="..\main\pop_interface.cc">
+			</File>
+			<File
+				RelativePath="..\main\population.cc">
+			</File>
+			<File
+				RelativePath="..\main\population_cell.cc">
+			</File>
+			<File
+				RelativePath="population_cell_wrapped_accessors.cc">
+			</File>
+			<File
+				RelativePath="population_cell_wrapper.cc">
+			</File>
+			<File
+				RelativePath="..\event\population_event_factory.cc">
+			</File>
+			<File
+				RelativePath="..\tools\random.cc">
+			</File>
+			<File
+				RelativePath="..\main\reaction.cc">
+			</File>
+			<File
+				RelativePath="..\main\reaction_result.cc">
+			</File>
+			<File
+				RelativePath="repopulate_widget.cc">
+			</File>
+			<File
+				RelativePath="..\main\resource.cc">
+			</File>
+			<File
+				RelativePath="..\main\resource_count.cc">
+			</File>
+			<File
+				RelativePath="setup_avida.cc">
+			</File>
+			<File
+				RelativePath="setup_file.cc">
+			</File>
+			<File
+				RelativePath="setup_genesis.cc">
+			</File>
+			<File
+				RelativePath="setup_wizard.cc">
+			</File>
+			<File
+				RelativePath="setup_wizard2.cc">
+			</File>
+			<File
+				RelativePath="setup_wizard_config.cc">
+			</File>
+			<File
+				RelativePath="setup_wizard_constants.cc">
+			</File>
+			<File
+				RelativePath="setup_wizard_page.cc">
+			</File>
+			<File
+				RelativePath="setup_wizard_page2.cc">
+			</File>
+			<File
+				RelativePath="..\tools\slice.cc">
+			</File>
+			<File
+				RelativePath="..\main\species.cc">
+			</File>
+			<File
+				RelativePath="..\tools\stat.cc">
+			</File>
+			<File
+				RelativePath="..\main\stats.cc">
+			</File>
+			<File
+				RelativePath="..\tools\string.cc">
+			</File>
+			<File
+				RelativePath="..\tools\string_list.cc">
+			</File>
+			<File
+				RelativePath="..\tools\string_util.cc">
+			</File>
+			<File
+				RelativePath="..\main\tasks.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\test_cpu.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\test_util.cc">
+			</File>
+			<File
+				RelativePath="testwizard.cc">
+			</File>
+			<File
+				RelativePath="testwizard_loadgen.cc">
+			</File>
+			<File
+				RelativePath="testwizard_validators.cc">
+			</File>
+			<File
+				RelativePath="..\tools\tools.cc">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trio.c">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trionan.c">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triostr.c">
+			</File>
+			<File
+				RelativePath="..\tools\weighted_index.cc">
+			</File>
+			<File
+				RelativePath="wizard.ui.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\main\analyze.hh">
+			</File>
+			<File
+				RelativePath="..\main\analyze_util.hh">
+			</File>
+			<File
+				RelativePath="apocalypse_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing apocalypse_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe apocalypse_widget.hh -o moc_apocalypse_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_apocalypse_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_avida_driver.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_avida_driver.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_avida_driver.hh -o moc_avd_avida_driver.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_avida_driver.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_driver_controller.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_driver_controller.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_driver_controller.hh -o moc_avd_driver_controller.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_driver_controller.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_event_viewer_controller.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_event_viewer_controller.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_event_viewer_controller.hh -o moc_avd_event_viewer_controller.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_event_viewer_controller.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_godbox_controller.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_godbox_controller.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_godbox_controller.hh -o moc_avd_godbox_controller.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_godbox_controller.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_gui_msg_event.hh">
+			</File>
+			<File
+				RelativePath="avd_help_controller.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_help_controller.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_help_controller.hh -o moc_avd_help_controller.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_help_controller.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_help_viewer.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_help_viewer.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_help_viewer.hh -o moc_avd_help_viewer.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_help_viewer.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_instruction_viewer_controller.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_instruction_viewer_controller.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_instruction_viewer_controller.hh -o moc_avd_instruction_viewer_controller.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_instruction_viewer_controller.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_lograte_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_lograte_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_lograte_widget.hh -o moc_avd_lograte_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_lograte_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_main_window.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_main_window.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_main_window.hh -o moc_avd_main_window.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_main_window.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_main_window_controller.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_main_window_controller.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_main_window_controller.hh -o moc_avd_main_window_controller.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_main_window_controller.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_message_queue.hh">
+			</File>
+			<File
+				RelativePath="avd_mission_control.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_mission_control.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_mission_control.hh -o moc_avd_mission_control.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_mission_control.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_plot_viewer_controller.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_plot_viewer_controller.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_plot_viewer_controller.hh -o moc_avd_plot_viewer_controller.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_plot_viewer_controller.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_rate_slider2.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avd_rate_slider2.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avd_rate_slider2.hh -o moc_avd_rate_slider2.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avd_rate_slider2.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="avd_rate_validator2.hh">
+			</File>
+			<File
+				RelativePath="..\main\avida.hh">
+			</File>
+			<File
+				RelativePath="avida_data.hh">
+			</File>
+			<File
+				RelativePath="avida_plot_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing avida_plot_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe avida_plot_widget.hh -o moc_avida_plot_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_avida_plot_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\tools\b_struct2.hh">
+			</File>
+			<File
+				RelativePath="..\main\birth_chamber.hh">
+			</File>
+			<File
+				RelativePath="..\tools\block_struct.hh">
+			</File>
+			<File
+				RelativePath="..\main\callback_util.hh">
+			</File>
+			<File
+				RelativePath="color_scale_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing color_scale_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe color_scale_widget.hh -o moc_color_scale_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_color_scale_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\main\config.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_defs.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_memory.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_stack.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_stats.hh">
+			</File>
+			<File
+				RelativePath="..\tools\data_entry.hh">
+			</File>
+			<File
+				RelativePath="..\tools\data_manager.hh">
+			</File>
+			<File
+				RelativePath="..\tools\datafile.hh">
+			</File>
+			<File
+				RelativePath="double_slider.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing double_slider.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe double_slider.hh -o moc_double_slider.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_double_slider.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\main\environment.hh">
+			</File>
+			<File
+				RelativePath="..\event\event.hh">
+			</File>
+			<File
+				RelativePath="..\event\event_factory.hh">
+			</File>
+			<File
+				RelativePath="..\event\event_factory_manager.hh">
+			</File>
+			<File
+				RelativePath="..\event\event_list.hh">
+			</File>
+			<File
+				RelativePath="event_view_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing event_view_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe event_view_widget.hh -o moc_event_view_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_event_view_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\tools\file.hh">
+			</File>
+			<File
+				RelativePath="..\main\fitness_matrix.hh">
+			</File>
+			<File
+				RelativePath="..\tools\functions.hh">
+			</File>
+			<File
+				RelativePath="..\main\genebank.hh">
+			</File>
+			<File
+				RelativePath="..\main\genome.hh">
+			</File>
+			<File
+				RelativePath="..\main\genome_util.hh">
+			</File>
+			<File
+				RelativePath="..\main\genotype.hh">
+			</File>
+			<File
+				RelativePath="godbox_widget2.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing godbox_widget2.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe godbox_widget2.hh -o moc_godbox_widget2.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_godbox_widget2.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_base.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_cpu.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_factory.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_method.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_util.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\head.hh">
+			</File>
+			<File
+				RelativePath="..\tools\help.hh">
+			</File>
+			<File
+				RelativePath="..\main\inst.hh">
+			</File>
+			<File
+				RelativePath="..\main\inst_lib.hh">
+			</File>
+			<File
+				RelativePath="..\main\inst_util.hh">
+			</File>
+			<File
+				RelativePath="..\tools\int.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\label.hh">
+			</File>
+			<File
+				RelativePath="..\main\landscape.hh">
+			</File>
+			<File
+				RelativePath="..\main\lineage.hh">
+			</File>
+			<File
+				RelativePath="..\main\lineage_control.hh">
+			</File>
+			<File
+				RelativePath="map_view.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing map_view.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe map_view.hh -o moc_map_view.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_map_view.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="map_view_cell_entry.hh">
+			</File>
+			<File
+				RelativePath="map_view_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing map_view_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe map_view_widget.hh -o moc_map_view_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_map_view_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\tools\merit.hh">
+			</File>
+			<File
+				RelativePath="..\tools\message_display.hh">
+			</File>
+			<File
+				RelativePath="..\tools\message_display_hdrs.hh">
+			</File>
+			<File
+				RelativePath="messaging_population_wrapper.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing messaging_population_wrapper.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe messaging_population_wrapper.hh -o moc_messaging_population_wrapper.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_messaging_population_wrapper.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\main\mutations.hh">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_buttons_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing n_orig_instruction_buttons_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe n_orig_instruction_buttons_widget.hh -o moc_n_orig_instruction_buttons_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_n_orig_instruction_buttons_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="n_orig_instruction_cpu_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing n_orig_instruction_cpu_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe n_orig_instruction_cpu_widget.hh -o moc_n_orig_instruction_cpu_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_n_orig_instruction_cpu_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="n_orig_instruction_field_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing n_orig_instruction_field_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe n_orig_instruction_field_widget.hh -o moc_n_orig_instruction_field_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_n_orig_instruction_field_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="n_orig_instruction_line_pixmap_pair.hh">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_line_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing n_orig_instruction_line_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe n_orig_instruction_line_widget.hh -o moc_n_orig_instruction_line_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_n_orig_instruction_line_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="n_orig_instruction_pixmapstructs.hh">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_scrollview.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing n_orig_instruction_scrollview.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe n_orig_instruction_scrollview.hh -o moc_n_orig_instruction_scrollview.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_n_orig_instruction_scrollview.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="n_orig_instruction_scrollview_config.hh">
+			</File>
+			<File
+				RelativePath="n_orig_instruction_view_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing n_orig_instruction_view_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe n_orig_instruction_view_widget.hh -o moc_n_orig_instruction_view_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_n_orig_instruction_view_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="n_orig_instruction_viewer.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing n_orig_instruction_viewer.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe n_orig_instruction_viewer.hh -o moc_n_orig_instruction_viewer.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_n_orig_instruction_viewer.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\main\organism.hh">
+			</File>
+			<File
+				RelativePath="..\main\phenotype.hh">
+			</File>
+			<File
+				RelativePath="plot_select_dia_impl.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing plot_select_dia_impl.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe plot_select_dia_impl.hh -o moc_plot_select_dia_impl.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_plot_select_dia_impl.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="plot_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing plot_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe plot_widget.hh -o moc_plot_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_plot_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\main\pop_interface.hh">
+			</File>
+			<File
+				RelativePath="..\main\population.hh">
+			</File>
+			<File
+				RelativePath="..\main\population_cell.hh">
+			</File>
+			<File
+				RelativePath="population_cell_wrapped_accessors.hh">
+			</File>
+			<File
+				RelativePath="population_cell_wrapper.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing population_cell_wrapper.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe population_cell_wrapper.hh -o moc_population_cell_wrapper.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_population_cell_wrapper.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\event\population_event_factory.hh">
+			</File>
+			<File
+				RelativePath="population_wrapper.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing population_wrapper.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe population_wrapper.hh -o moc_population_wrapper.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_population_wrapper.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\tools\random.hh">
+			</File>
+			<File
+				RelativePath="..\main\reaction.hh">
+			</File>
+			<File
+				RelativePath="..\main\reaction_result.hh">
+			</File>
+			<File
+				RelativePath="repopulate_widget.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing repopulate_widget.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe repopulate_widget.hh -o moc_repopulate_widget.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_repopulate_widget.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\main\resource.hh">
+			</File>
+			<File
+				RelativePath="..\main\resource_count.hh">
+			</File>
+			<File
+				RelativePath="setup_file.hh">
+			</File>
+			<File
+				RelativePath="setup_genesis.hh">
+			</File>
+			<File
+				RelativePath="setup_wizard.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing setup_wizard.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe setup_wizard.hh -o moc_setup_wizard.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_setup_wizard.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="setup_wizard2.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing setup_wizard2.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe setup_wizard2.hh -o moc_setup_wizard2.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_setup_wizard2.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="setup_wizard_config.hh">
+			</File>
+			<File
+				RelativePath="setup_wizard_constants.hh">
+			</File>
+			<File
+				RelativePath="setup_wizard_page.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing setup_wizard_page.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe setup_wizard_page.hh -o moc_setup_wizard_page.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_setup_wizard_page.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="setup_wizard_page2.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing setup_wizard_page2.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe setup_wizard_page2.hh -o moc_setup_wizard_page2.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_setup_wizard_page2.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\tools\slice.hh">
+			</File>
+			<File
+				RelativePath="..\main\species.hh">
+			</File>
+			<File
+				RelativePath="..\tools\stat.hh">
+			</File>
+			<File
+				RelativePath="..\main\stats.hh">
+			</File>
+			<File
+				RelativePath="..\tools\string.hh">
+			</File>
+			<File
+				RelativePath="..\tools\string_list.hh">
+			</File>
+			<File
+				RelativePath="..\tools\string_util.hh">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\strio.h">
+			</File>
+			<File
+				RelativePath="..\tools\tArray.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tBuffer.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tDictionary.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tList.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tMatrix.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tVector.hh">
+			</File>
+			<File
+				RelativePath="..\main\tasks.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\test_cpu.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\test_util.hh">
+			</File>
+			<File
+				RelativePath="testwizard.hh">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Moc&apos;ing testwizard.hh..."
+						CommandLine="$(QTDIR)\bin\moc.exe testwizard.hh -o moc_testwizard.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe"
+						Outputs="moc_testwizard.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\tools\tools.hh">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trio.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triodef.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trionan.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triop.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triostr.h">
+			</File>
+			<File
+				RelativePath="..\tools\weighted_index.hh">
+			</File>
+			<File
+				RelativePath="..\tools\win32_mkdir_hack.hh">
+			</File>
+		</Filter>
+		<Filter
+			Name="Generated MOC Files"
+			Filter="cpp;c;cxx;moc">
+			<File
+				RelativePath="moc_apocalypse_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_avida_driver.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_driver_controller.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_event_viewer_controller.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_godbox_controller.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_help_controller.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_help_viewer.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_instruction_viewer_controller.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_lograte_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_main_window.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_main_window_controller.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_mission_control.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_plot_viewer_controller.cpp">
+			</File>
+			<File
+				RelativePath="moc_avd_rate_slider2.cpp">
+			</File>
+			<File
+				RelativePath="moc_avida_plot_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_color_scale_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_double_slider.cpp">
+			</File>
+			<File
+				RelativePath="moc_event_chooser.cpp">
+			</File>
+			<File
+				RelativePath="moc_event_list_editor.cpp">
+			</File>
+			<File
+				RelativePath="moc_event_view_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_godbox_widget2.cpp">
+			</File>
+			<File
+				RelativePath="moc_map_view.cpp">
+			</File>
+			<File
+				RelativePath="moc_map_view_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_messaging_population_wrapper.cpp">
+			</File>
+			<File
+				RelativePath="moc_n_orig_instruction_buttons_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_n_orig_instruction_cpu_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_n_orig_instruction_field_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_n_orig_instruction_line_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_n_orig_instruction_scrollview.cpp">
+			</File>
+			<File
+				RelativePath="moc_n_orig_instruction_view_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_n_orig_instruction_viewer.cpp">
+			</File>
+			<File
+				RelativePath="moc_plot_select_dia.cpp">
+			</File>
+			<File
+				RelativePath="moc_plot_select_dia_impl.cpp">
+			</File>
+			<File
+				RelativePath="moc_plot_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_population_cell_wrapper.cpp">
+			</File>
+			<File
+				RelativePath="moc_population_wrapper.cpp">
+			</File>
+			<File
+				RelativePath="moc_repopulate_widget.cpp">
+			</File>
+			<File
+				RelativePath="moc_setup_wizard.cpp">
+			</File>
+			<File
+				RelativePath="moc_setup_wizard2.cpp">
+			</File>
+			<File
+				RelativePath="moc_setup_wizard_page.cpp">
+			</File>
+			<File
+				RelativePath="moc_setup_wizard_page2.cpp">
+			</File>
+			<File
+				RelativePath="moc_testwizard.cpp">
+			</File>
+			<File
+				RelativePath="moc_wizard.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Generated UI Files"
+			Filter="cpp;c;cxx;h;hpp;hxx;">
+			<File
+				RelativePath="event_chooser.cpp">
+			</File>
+			<File
+				RelativePath="event_chooser.h">
+			</File>
+			<File
+				RelativePath="event_list_editor.cpp">
+			</File>
+			<File
+				RelativePath="event_list_editor.h">
+			</File>
+			<File
+				RelativePath="plot_select_dia.cpp">
+			</File>
+			<File
+				RelativePath="plot_select_dia.h">
+			</File>
+			<File
+				RelativePath="wizard.cpp">
+			</File>
+			<File
+				RelativePath="wizard.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Forms"
+			Filter="ui"
+			ParseFiles="FALSE">
+			<File
+				RelativePath="event_chooser.ui">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Uic&apos;ing event_chooser.ui..."
+						CommandLine="$(QTDIR)\bin\uic.exe event_chooser.ui -o .\event_chooser.h &amp;&amp; $(QTDIR)\bin\uic.exe event_chooser.ui -i event_chooser.h -o .\event_chooser.cpp &amp;&amp; $(QTDIR)\bin\moc.exe .\event_chooser.h -o moc_event_chooser.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe"
+						Outputs=".\event_chooser.h;.\event_chooser.cpp;moc_event_chooser.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="event_list_editor.ui">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Uic&apos;ing event_list_editor.ui..."
+						CommandLine="$(QTDIR)\bin\uic.exe event_list_editor.ui -o .\event_list_editor.h &amp;&amp; $(QTDIR)\bin\uic.exe event_list_editor.ui -i event_list_editor.h -o .\event_list_editor.cpp &amp;&amp; $(QTDIR)\bin\moc.exe .\event_list_editor.h -o moc_event_list_editor.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe"
+						Outputs=".\event_list_editor.h;.\event_list_editor.cpp;moc_event_list_editor.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="plot_select_dia.ui">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Uic&apos;ing plot_select_dia.ui..."
+						CommandLine="$(QTDIR)\bin\uic.exe plot_select_dia.ui -o .\plot_select_dia.h &amp;&amp; $(QTDIR)\bin\uic.exe plot_select_dia.ui -i plot_select_dia.h -o .\plot_select_dia.cpp &amp;&amp; $(QTDIR)\bin\moc.exe .\plot_select_dia.h -o moc_plot_select_dia.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe"
+						Outputs=".\plot_select_dia.h;.\plot_select_dia.cpp;moc_plot_select_dia.cpp"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="wizard.ui">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Uic&apos;ing wizard.ui..."
+						CommandLine="$(QTDIR)\bin\uic.exe wizard.ui -o .\wizard.h &amp;&amp; $(QTDIR)\bin\uic.exe wizard.ui -i wizard.h -o .\wizard.cpp &amp;&amp; $(QTDIR)\bin\moc.exe .\wizard.h -o moc_wizard.cpp
+"
+						AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe"
+						Outputs=".\wizard.h;.\wizard.cpp;moc_wizard.cpp"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<File
+			RelativePath="..\cpu\hardware_4stack.cc">
+		</File>
+		<File
+			RelativePath="..\cpu\hardware_4stack.hh">
+		</File>
+		<File
+			RelativePath="..\main\inst_set.cc">
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: avida/current/source/qt-viewer/retainable.cc
diff -u /dev/null avida/current/source/qt-viewer/retainable.cc:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/retainable.cc	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,38 @@
+#ifndef RETAINABLE_DBG_HH
+#include "retainable_dbg.hh"
+#endif
+#ifndef WATCH_RETAINS_HH
+#include "watch_retains.hh"
+#endif
+
+#ifndef RETAINABLE_HH
+#include "retainable.hh"
+#endif
+
+// This is for displaying error messages.
+cMessageType Error_cRetainable_Msg("Memory", MCError);
+
+
+tRList<cWatchRetains> cRetainable::s_retain_watchlist;
+cString cRetainable::s_noname_str("(unnamed)");
+cString cRetainable::s_copyof_str("(copy of)");
+
+void cRetainable::nameWatched(const cString &name){
+  m_ret_name = name;
+  if(!m_watcher){
+    cRetainableError
+    << "Warning: told to watch object \"" << watchedName() << "\"";
+    cRetainableError
+    << " for memory leaks, but no leak-watch is installed.";
+} }
+void cRetainable::endWatch(){
+  if(m_watcher) m_watcher->m_watchset.erase(this);
+  m_watcher = 0;
+}
+void cRetainable::beWatched(){
+  if(0 < s_retain_watchlist.GetSize()){
+    m_watcher = s_retain_watchlist.GetFirst();
+    m_watcher->m_watchset.insert(this);
+  } else m_watcher = 0;
+}
+
Index: avida/current/source/qt-viewer/retainable.hh
diff -u /dev/null avida/current/source/qt-viewer/retainable.hh:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/retainable.hh	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,15 @@
+#ifndef RETAINABLE_HH
+#define RETAINABLE_HH
+
+#ifndef STRING_HH
+#include "tools/string.hh"
+#endif
+#ifndef TRLIST_HH
+#include "tRList.hh"
+#endif
+
+#ifndef RETAINABLE_PROTO_HH
+#include "retainable_proto.hh"
+#endif
+
+#endif /* RETAINABLE_HH */
Index: avida/current/source/qt-viewer/retainable_dbg.hh
diff -u /dev/null avida/current/source/qt-viewer/retainable_dbg.hh:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/retainable_dbg.hh	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,12 @@
+#ifndef RETAINABLE_DBG_HH
+#define RETAINABLE_DBG_HH
+
+#ifndef MESSAGE_DISPLAY_HDRS_HH
+#include "tools/message_display_hdrs.hh"
+#endif
+
+#ifndef RETAINABLE_DBG_PROTO_HH
+#include "retainable_dbg_proto.hh"
+#endif
+
+#endif
Index: avida/current/source/qt-viewer/retainable_dbg_proto.hh
diff -u /dev/null avida/current/source/qt-viewer/retainable_dbg_proto.hh:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/retainable_dbg_proto.hh	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,7 @@
+#ifndef RETAINABLE_DBG_PROTO_HH
+#define RETAINABLE_DBG_PROTO_HH
+
+extern cMessageType Error_cRetainable_Msg;
+#define cRetainableError _ERROR_MSG(cRetainable)
+
+#endif
Index: avida/current/source/qt-viewer/retainable_proto.hh
diff -u /dev/null avida/current/source/qt-viewer/retainable_proto.hh:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/retainable_proto.hh	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,258 @@
+#ifndef RETAINABLE_PROTO_HH
+#define RETAINABLE_PROTO_HH
+
+/*
+Inherit from cRetainable to provide primitive garbage collection via
+retain counting a la Objective C.  The important part of the exposed
+interface:
+
+  class cRetainable {
+  public:
+    void retain();
+    void release();
+    int refs() const;
+  };
+
+where:
+
+  void retain()
+    Increments its retain count.
+  void release()
+    Decrements its retain count.
+    If the retain count drops to zero, deletes itself.
+  int refs()
+    Returns its retain count (for debugging).
+  void nameWatched(const cString &name)
+    For debugging purposes, gives it a name.
+  const cString &watchedName()
+    Retrieves its name, for debugging purposes.
+
+The following discussion is adapted from Don Yackman's article "Hold
+Me, Use Me, Free Me" on StepWise.com:
+
+  http://www.stepwise.com/Articles/Technical/HoldMe.html
+
+(Note:  use QGuardedPtr<> to store any object inheriting from both
+cRetainable and QObject.  See Rule 7 for an explanation.)
+
+Rule 1:  The retention count rule:
+
+- Within a given block the use of new and retain() should equal the use
+  of release().
+  - Example:
+    void Foo::hello(){
+      cSomethingRetainable *bar = new cSomethingRetainable;
+      // do stuff.
+      bar->release();
+      // bar deletes itself if nobody else has retained bar.
+    }
+
+Rule 2:  Always use accessor methods:
+
+- Sometimes it might seem tedious or pedantic, but if you use accessor
+  methods consistently the chances of problems with memory management
+  will decrease considerably. 
+- If you are using retain() and release() on a class' instance variables
+  throughout your code, you're almost certainly doing the wrong thing.
+- Example:
+
+  class MyRetainableClass : public cRetainable {
+    ...
+  };
+
+  class I_use_a_retainable_class {
+    MyRetainableClass *m_retainable;
+  public:
+    // To get and set m_retainable we should use two accessor methods:
+    MyRetainableClass *getRetainableThing(){
+      return m_retainable;
+      // no retain or release since we're just passing back a variable.
+    }
+    void setRetainableThing(MyRetainableClass *retainable){
+      if(retainable) retainable->retain();
+      if(m_retainable) m_retainable->release();
+      m_retainable = retainable;
+    }
+
+    // In the class constructors, initialize m_retainable to 'null'.
+    I_use_a_retainable_class():m_retainable(0){
+      // do stuff.
+    }
+    // Since we have a retainable instance variable, we must deallocate
+    // it in the class destructors.
+    ~I_use_a_retainable_class(){
+      setRetainableThing(0);
+      // Whatever m_retainable contained earlier has had its retain
+      // count decremented.  If nobody else has retained it, it deletes
+      // itself.
+    }
+
+    // Suppose we want to implement a method to reset the retainable
+    // instance variable.  According to the retention count rule, we
+    // must balance the 'new' with a release.
+    void reset(){
+      MyRetainableClass *retainable = new MyRetainableClass();
+      // 'retainable' now has a retain count of 1.
+      setRetainableThing(retainable);
+      // 'retainable' now has a retain count of 2;
+      // whatever m_retainable contained earlier has had its retain
+      // count decremented.  If nobody else has retained it, it deletes
+      // itself.
+      retainable->release().
+      // 'retainable' now has a retain count of 1.
+    }
+
+    // Common mistakes:
+      // The following will almost certainly work for some simple cases,
+      // but tempting as it may be to eschew accessor methods, this will
+      // almost certainly lead to a mistake at some stage (if for
+      // example you forget to release the retainable thing, or try to
+      // reference a null pointer).
+      void reset(){
+        MyRetainableClass *retainable = new MyRetainableClass();
+        if(m_retainable) m_retainable->release();
+        m_retainable = retainable;
+      }
+      // The following results in a memory leak; the retain count of the
+      // new retainable thing is 1 from 'new' and 2 from
+      // setRetainableThing(), and we have not balanced the 'new' with a
+      // release within the scope of the block.
+      void reset(){
+        MyRetainableClass *retainable = new MyRetainableClass();
+        setRetainableThing(retainable);
+      }
+  };
+
+
+Rules 1 & 2 should be sufficient.  But read further discussion if you
+wish.
+
+
+If you follow the retention and accessor rules then:
+
+Rule 3: If a block of code did not allocate or retain an object, then
+that block of code should not release it.
+
+Rule 4: When you obtain an object as a result of a method call it should
+remain valid until the end of your code block, and your code block can
+safely return the object.  If you need the object to live longer than
+this -- for example if you plan to store it in an instance variable --
+then you need to retain() it.
+
+Rule 5: Factory methods are an exception.  A factory method should
+behave like 'new' in that the factory method returns an object with
+retain count of 1, and relinquishes ownership of the object to the
+caller.
+
+
+There is a problem that the preceding rules do *not* handle: the problem
+of "retain cycles".  A retain cycle is a special kind of memory leak
+that can occur with a retain counting scheme when object A retains
+object B, and object B retains object A.  These two objects never reach
+a zero retain count, but when they are no longer used by any part of the
+program, they hit a count of one, so never delete themselves.  It is
+possible to have very complex retain cycles where the minimum retain
+count is higher than one (multiple objects referring to each other), or
+a long chain of objects retaining each other in what looks like a
+circular linked list.
+
+The best solution to the problem is to be careful with your designs;
+decide who owns who, and retain accordingly.  For example, in a
+child-parent relationship in which the child knows about the parent and
+the parent knows about the child, you can have the parent retain() the
+child but not the other way around.  This would seem to break rule 4
+above since the child wants a guarantee that the parent will stick
+around, but with careful design the retain() is not needed to guarantee
+this condition and would, in effect, be redundant.  The one thing that
+should be done for safety is that the parent should instruct the child
+to set its parent pointer to 'null' when the parent releases the child.
+As long as the parent is retaining the child, the childs pointer to the
+parent will be valid.  When the child is released, the pointer will be
+taken away.  No problem.
+
+Unfortunately there isn't a much better solution to this problem than
+starting with a careful design.  Be sure to expend adequate thought
+about how your program's object will interact.
+
+
+On the other hand (as you might have noticed) say you want to give the
+child to another parent.  If you just remove it from its current parent
+then the child will be released and destroyed.  You must first obtain
+the child, retain() it, remove it from its parent, hand it off to its
+new parent, and then release() it.  Which leads to a sixth rule:
+
+Rule 6: Use retain() and release() when you want to prevent an object
+from being destroyed as a side effect of the operations you're
+performing.
+
+
+Note: interactions with Qt's QObject class: any object inheriting from
+both cRetainable and QObject can be deleted by Qt, even if the object is
+retained.  To prevent dangling pointers to deleted QObjects:
+
+Rule 7: Use QGuardedPtr<> to store retainable QObjects.  If you follow
+this rule, your accessor getThingy() will return 0 (as it should) when
+the thingy has been deleted.  The code looks like this:
+
+  class MyClass {
+    // m_thing behaves like a pointer, so *m_thingy, m_thingy->, and
+    // m_thingy= all work fine.
+    QGuardedPtr<cThingy> m_thingy;
+  public:
+    void setThingy(cThingy *thingy){ 
+      if(thingy) thingy->retain();
+      // don't worry, if m_thingy was deleted by Qt, it won't be
+      // released below.
+      if(m_thingy) m_thingy->release();
+      m_thingy = thingy;
+    }
+    // m_thingy is automatically converted to a pointer below, unless it
+    // was deleted by Qt, in which case it's converted to 0.
+    cThingy *getThingy(){ return m_thingy; }
+  }
+*/
+
+
+class cWatchRetains;
+class cRetainable {
+  friend class cWatchRetains;
+private:
+  /* disabled */ cRetainable operator =(const cRetainable &other);
+protected:
+  static tRList<cWatchRetains> s_retain_watchlist;
+  static cString s_noname_str;
+  static cString s_copyof_str;
+protected:
+  cWatchRetains *m_watcher;
+  int m_retain_count;
+  cString m_ret_name;
+protected:
+  cRetainable()
+  : m_retain_count(0)
+  , m_ret_name(s_noname_str)
+  { beWatched(); retain(); }
+  cRetainable(const cRetainable &other)
+  : m_retain_count(0)
+  , m_ret_name(s_copyof_str + other.watchedName())
+  { beWatched(); retain(); }
+  virtual ~cRetainable(){ endWatch(); }
+  void endWatch();
+  void beWatched();
+public:
+  const int refs() const { return m_retain_count; }
+  void retain(){ ++m_retain_count; }
+  void release(){ if(--m_retain_count < 1) delete this; }
+  const cString &watchedName() const { return m_ret_name; }
+  void nameWatched(const cString &name);
+};
+
+
+#define SETretainable(storage,arg) \
+{ \
+  if(arg) (arg)->retain(); \
+  if(storage) (storage)->release(); \
+  (storage) = (arg); \
+}
+
+
+#endif /* RETAINABLE_PROTO_HH */
Index: avida/current/source/qt-viewer/tRList.hh
diff -u /dev/null avida/current/source/qt-viewer/tRList.hh:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/tRList.hh	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,15 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (C) 1993 - 2003 California Institute of Technology             //
+//                                                                          //
+// Read the COPYING and README files, or contact 'avida at alife.org',         //
+// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef TRLIST_HH
+#define TRLIST_HH
+
+#ifndef TRLIST_PROTO_HH
+#include "tRList_proto.hh"
+#endif
+
+#endif
Index: avida/current/source/qt-viewer/tRList_proto.hh
diff -u /dev/null avida/current/source/qt-viewer/tRList_proto.hh:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/tRList_proto.hh	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,510 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (C) 1993 - 2003 California Institute of Technology             //
+//                                                                          //
+// Read the COPYING and README files, or contact 'avida at alife.org',         //
+// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef TRLIST_PROTO_HH
+#define TRLIST_PROTO_HH
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+template <class T> class pUseRetains {
+public:
+  T * Retain(T * _in){ if(_in) _in->retain(); return _in; }
+  T * Release(T * _in){ if(_in) _in->release(); return _in; }
+};
+
+template <class T> class pNoRetains {
+public:
+  T * Retain(T * _in){ return _in; }
+  T * Release(T * _in){ return _in; }
+};
+
+template <
+  class T,
+	template <class> class RetainPolicy = pNoRetains
+> class tRListNode {
+public:
+  T * data;
+  tRListNode<T, RetainPolicy> * next;
+  tRListNode<T, RetainPolicy> * prev;
+
+  tRListNode() : data(NULL), next(this), prev(this) { ; }
+};
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> class tRList;
+
+template <
+  class T,
+	template <class> class RetainPolicy = pNoRetains
+> class tRBaseIterator {
+  friend class tRList<T, RetainPolicy>;
+protected:
+  virtual const tRList<T, RetainPolicy> & GetConstList() = 0;
+  virtual const tRListNode<T, RetainPolicy> * GetConstNode() = 0;
+public:
+  tRBaseIterator() { ; }
+  virtual ~tRBaseIterator() { ; }
+
+  virtual const T * GetConst() = 0;
+  virtual const T * NextConst() = 0;
+  virtual const T * PrevConst() = 0;
+
+  virtual bool AtRoot() const = 0;
+  virtual bool AtEnd() const = 0;
+};
+
+template <
+  class T,
+	template <class> class RetainPolicy = pNoRetains
+> class tRListIterator
+: public tRBaseIterator<T, RetainPolicy>
+{
+  friend class tRList<T, RetainPolicy>;
+private:
+  tRList<T, RetainPolicy> & list;
+  tRListNode<T, RetainPolicy> * node;
+
+  const tRList<T, RetainPolicy> & GetConstList() { return list; }
+  const tRListNode<T, RetainPolicy> * GetConstNode() { return node; }
+public:
+  explicit tRListIterator(tRList<T, RetainPolicy> & _list);
+  ~tRListIterator();
+
+  void Reset();
+
+  T * Get();
+  T * Next();
+  T * Prev();
+  const T * GetConst() { return Get(); }
+  const T * NextConst() { return Next(); }
+  const T * PrevConst() { return Prev(); }
+
+  bool Find(T * test_data);
+
+  bool AtRoot() const;
+  bool AtEnd() const;
+
+  // Unique methods...
+  T * Remove();
+};
+
+template <
+  class T,
+	template <class> class RetainPolicy = pNoRetains
+> class tConstRListIterator : public tRBaseIterator<T, RetainPolicy> {
+  friend class tRList<T, RetainPolicy>;
+private:
+  const tRList<T, RetainPolicy> & list;
+  const tRListNode<T, RetainPolicy> * node;
+
+  const tRList<T, RetainPolicy> & GetConstList() { return list; }
+  const tRListNode<T, RetainPolicy> * GetConstNode() { return node; }
+public:
+  explicit tConstRListIterator(const tRList<T, RetainPolicy> & _list);
+  ~tConstRListIterator();
+
+  void Reset();
+
+  const T * Get();
+  const T * Next();
+  const T * Prev();
+  const T * GetConst() { return Get(); }
+  const T * NextConst() { return Next(); }
+  const T * PrevConst() { return Prev(); }
+  bool Find(const T * test_data);
+
+  bool AtRoot() const;
+  bool AtEnd() const;
+};
+
+template <
+  class T,
+	template <class> class RetainPolicy = pNoRetains
+> class tRList : public RetainPolicy<T> {
+  friend class tRBaseIterator<T, RetainPolicy>;
+  friend class tRListIterator<T, RetainPolicy>;
+  friend class tConstRListIterator<T, RetainPolicy>;
+protected:
+  tRListNode<T, RetainPolicy> root;                     // Data root
+  int size;
+  mutable tRListNode< tRBaseIterator<T, RetainPolicy>, RetainPolicy > it_root; // Iterator root
+  mutable int it_count;
+
+  T * RemoveNode(tRListNode<T, RetainPolicy> * out_node) {
+    // Make sure we're not trying to delete the root node!
+    if (out_node == &root) return NULL;
+
+    // Adjust any iterators on the deleted node.
+    tRListNode< tRBaseIterator<T, RetainPolicy>, RetainPolicy > * test_it = it_root.next;
+    while (test_it != &it_root) {
+      // If this iterator is on this node, move it back one.
+      if (test_it->data->GetConstNode() == out_node) {
+	      test_it->data->PrevConst();
+      }
+      test_it = test_it->next;
+    }
+
+    // Save the data and patch up the linked list.
+    T * out_data = out_node->data;
+    out_node->prev->next = out_node->next;
+    out_node->next->prev = out_node->prev;
+
+    // Cleanup and return
+    size--;
+    delete out_node;
+    Release(out_data);
+    return out_data;
+  }
+
+  // To be called from iterator constructor only!
+  void AddIterator(tRBaseIterator<T, RetainPolicy> * new_it) const {
+    tRListNode< tRBaseIterator<T, RetainPolicy>, RetainPolicy > * new_node =
+      new tRListNode< tRBaseIterator<T, RetainPolicy>, RetainPolicy >;
+    new_node->data = new_it;
+    new_node->next = it_root.next;
+    new_node->prev = &it_root;
+    it_root.next->prev = new_node;
+    it_root.next = new_node;
+    it_count++;
+  }
+
+  // To be called from iterator destructor only!
+  void RemoveIterator(tRBaseIterator<T, RetainPolicy> * old_it) const {
+    tRListNode< tRBaseIterator<T, RetainPolicy>, RetainPolicy > * test_it =
+      it_root.next;
+    while (test_it->data != old_it) test_it = test_it->next;
+    test_it->prev->next = test_it->next;
+    test_it->next->prev = test_it->prev;
+    delete test_it;
+    it_count--;
+  }
+
+public:
+  T * Pop() { return RemoveNode(root.next); }
+  T * PopRear() { return RemoveNode(root.prev); }
+
+  void Push(T * _in) {
+    Retain(_in);
+    tRListNode<T, RetainPolicy> * new_node = new tRListNode<T, RetainPolicy>;
+    new_node->data = _in;
+    new_node->next = root.next;
+    new_node->prev = &root;
+    root.next->prev = new_node;
+    root.next = new_node;
+    size++;
+  }
+
+  void PushRear(T * _in) {
+    Retain(_in);
+    tRListNode<T, RetainPolicy> * new_node = new tRListNode<T, RetainPolicy>;
+    new_node->data = _in;
+    new_node->next = &root;
+    new_node->prev = root.prev;
+    root.prev->next = new_node;
+    root.prev = new_node;
+    size++;
+  }
+
+  void Clear() { while (size > 0) Pop(); }
+
+  const T * GetFirst() const { return root.next->data; }
+  const T * GetLast()  const { return root.prev->data; }
+  T * GetFirst()             { return root.next->data; }
+  T * GetLast()              { return root.prev->data; }
+
+  T * GetPos(int pos) {
+    if (pos >= GetSize()) return NULL;
+    tRListNode<T, RetainPolicy> * test_node = root.next;
+    for (int i = 0; i < pos; i++) test_node = test_node->next;
+    return test_node->data;
+  }
+
+  const T * GetPos(int pos) const {
+    if (pos >= GetSize()) return NULL;
+    tRListNode<T, RetainPolicy> * test_node = root.next;
+    for (int i = 0; i < pos; i++) test_node = test_node->next;
+    return test_node->data;
+  }
+
+  void CircNext() { if (size > 0) PushRear(Pop()); }
+  void CircPrev() { if (size > 0) Push(PopRear()); }
+
+  T * Remove(tRListIterator<T, RetainPolicy> & other) {
+    if (&(other.list) != this) return NULL;
+    return RemoveNode(other.node);
+  }
+
+  T * Insert(tRBaseIterator<T, RetainPolicy> & list_it, T * in_data) {
+    Retain(in_data);
+    tRListNode<T, RetainPolicy> * new_node = new tRListNode<T, RetainPolicy>;
+    new_node->data = in_data;
+    new_node->next = list_it.node->next;
+    new_node->prev = list_it.node;
+
+    list_it.node->next->prev = new_node;
+    list_it.node->next = new_node;
+    size++;
+    return in_data;
+  }
+
+
+  bool Remove(T * other) {
+    tRListNode<T, RetainPolicy> * test = root.next;
+    while (test != &root) {
+      if (test->data == other) {
+	      RemoveNode(test);
+	      return true;
+      }
+      test = test->next;
+    }
+    return false;
+  }
+
+  int GetSize() const { return size; }
+
+  void Append(tRList<T, RetainPolicy> & other_list) {
+    tRListIterator<T, RetainPolicy> other_it(other_list);
+    while (other_it.Next() != NULL) PushRear(other_it.Get());
+  }
+
+  T * Find(T * _in) const {
+    tRListNode<T, RetainPolicy> * test = root.next;
+    while (test != &root) {
+      if ( *(test->data) == *(_in) ) return test->data;
+      test = test->next;
+    }
+    return NULL;
+  }
+
+  T * PopIntValue(int (T::*fun)() const, int value) {
+    tRListNode<T, RetainPolicy> * test = root.next;
+    while (test != &root) {
+      if ( (test->data->*fun)() == value) return RemoveNode(test);
+      test = test->next;
+    }
+    return NULL;
+  }
+
+  T * PopIntMax(int (T::*fun)() const) { 
+    if (size == 0) return NULL;
+    tRListNode<T, RetainPolicy> * test = root.next;
+    tRListNode<T, RetainPolicy> * best = test;
+    int max_val = (test->data->*fun)();
+    while (test != &root) {
+      const int cur_val = (test->data->*fun)();
+      if ( cur_val > max_val ) {
+	      max_val = cur_val;
+	      best = test;
+      }
+      test = test->next;
+    }
+    return RemoveNode(best);
+  }
+
+  T * PopDoubleMax(double (T::*fun)() const) {
+    if (size == 0) return NULL;
+    tRListNode<T, RetainPolicy> * test = root.next;
+    tRListNode<T, RetainPolicy> * best = test;
+    double max_val = (test->data->*fun)();
+    while (test != &root) {
+      const double cur_val = (test->data->*fun)();
+      if ( cur_val > max_val ) {
+	      max_val = cur_val;
+	      best = test;
+      }
+      test = test->next;
+    }
+    return RemoveNode(best);
+  }
+public:
+  tRList() : size(0), it_count(0) { }
+  ~tRList() { Clear(); }
+private:
+  tRList(tRList & _list) { ; }  // Never should be used...
+};
+
+////////////////////
+//  tRListIterator
+
+template <
+  class T,
+  template <class> class RetainPolicy
+> tRListIterator<T, RetainPolicy>::tRListIterator(
+  tRList<T, RetainPolicy> & _list)
+  : list(_list), node(&(_list.root))
+{
+  list.AddIterator(this);
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> tRListIterator<T, RetainPolicy>::~tRListIterator()
+{
+  list.RemoveIterator(this);
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> void tRListIterator<T, RetainPolicy>::Reset()
+{
+  node = &(list.root);
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> T * tRListIterator<T, RetainPolicy>::Get()
+{
+  return node->data;
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> T * tRListIterator<T, RetainPolicy>::Next()
+{
+  node = node->next;
+  return node->data;
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> T * tRListIterator<T, RetainPolicy>::Prev()
+{
+  node = node->prev;
+  return node->data;
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> bool tRListIterator<T, RetainPolicy>::Find(T * test_data)
+{
+  for (node = list.root.next;
+       node != &(list.root);
+       node = node->next) {
+    if (node->data == test_data) return true;
+  }
+  return false;
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> bool tRListIterator<T, RetainPolicy>::AtRoot() const
+{
+  return (node == &(list.root));
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> bool tRListIterator<T, RetainPolicy>::AtEnd() const
+{
+  return (node->next == &(list.root));
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> T* tRListIterator<T, RetainPolicy>::Remove()
+{
+  return list.RemoveNode(node);
+}
+
+/////////////////////////
+//  tConstRListIterator
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> tConstRListIterator<T, RetainPolicy>::tConstRListIterator(
+  const tRList<T, RetainPolicy> & _list)
+  : list(_list), node(&(_list.root))
+{
+  list.AddIterator(this);
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> tConstRListIterator<T, RetainPolicy>::~tConstRListIterator()
+{
+  list.RemoveIterator(this);
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> void tConstRListIterator<T, RetainPolicy>::Reset()
+{
+  node = &(list.root);
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> const T * tConstRListIterator<T, RetainPolicy>::Get()
+{
+  return node->data;
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> const T * tConstRListIterator<T, RetainPolicy>::Next()
+{
+  node = node->next;
+  return node->data;
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> const T * tConstRListIterator<T, RetainPolicy>::Prev()
+{
+  node = node->prev;
+  return node->data;
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> bool tConstRListIterator<T, RetainPolicy>::Find(const T * test_data)
+{
+  for (node = list.root.next;
+       node != &(list.root);
+       node = node->next) {
+    if (node->data == test_data) return true;
+  }
+  return false;
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> bool tConstRListIterator<T, RetainPolicy>::AtRoot() const
+{
+  return (node == &(list.root));
+}
+
+template <
+  class T,
+	template <class> class RetainPolicy
+> bool tConstRListIterator<T, RetainPolicy>::AtEnd() const
+{
+  return (node->next == &(list.root));
+}
+
+#endif
Index: avida/current/source/qt-viewer/tRetainable_list.hh
diff -u /dev/null avida/current/source/qt-viewer/tRetainable_list.hh:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/tRetainable_list.hh	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,23 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (C) 1993 - 2003 California Institute of Technology             //
+//                                                                          //
+// Read the COPYING and README files, or contact 'avida at alife.org',         //
+// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef TRETAINABLE_LIST_HH
+#define TRETAINABLE_LIST_HH
+
+#ifndef RETAINABLE_HH
+#include "retainable.hh"
+#endif
+
+#ifndef TRLIST_HH
+#include "tRList.hh"
+#endif
+
+#ifndef TRETAINABLE_LIST_PROTO_HH
+#include "tRetainable_list_proto.hh"
+#endif
+
+#endif /* TRETAINABLE_LIST_HH */
Index: avida/current/source/qt-viewer/tRetainable_list_proto.hh
diff -u /dev/null avida/current/source/qt-viewer/tRetainable_list_proto.hh:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/tRetainable_list_proto.hh	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,30 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (C) 1993 - 2003 California Institute of Technology             //
+//                                                                          //
+// Read the COPYING and README files, or contact 'avida at alife.org',         //
+// before continuing.  SOME RESTRICTIONS MAY APPLY TO USE OF THIS FILE.     //
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef TRETAINABLE_LIST_PROTO_HH
+#define TRETAINABLE_LIST_PROTO_HH
+
+template <class T> class tRetainableList
+: public tRList<T, pUseRetains>, public cRetainable {};
+
+template <class T> class tRetainableListIter
+: public tRListIterator<T, pUseRetains>, public cRetainable {
+public:
+  explicit tRetainableListIter(
+    tRetainableList<T> & _list
+  ):tRListIterator<T, pUseRetains>(_list){}
+};
+
+template <class T> class tRetainableConstListIter
+: public tConstRListIterator<T, pUseRetains>, public cRetainable {
+public:
+  explicit tRetainableConstListIter(
+    const tRetainableList<T> & _list
+  ):tConstRListIterator<T, pUseRetains>(_list){}
+};
+
+#endif /* TRETAINABLE_LIST_PROTO_HH */
Index: avida/current/source/qt-viewer/watch_retains.cc
diff -u /dev/null avida/current/source/qt-viewer/watch_retains.cc:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/watch_retains.cc	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,23 @@
+#ifndef RETAINABLE_DBG_HH
+#include "retainable_dbg.hh"
+#endif
+
+#ifndef WATCH_RETAINS_HH
+#include "watch_retains.hh"
+#endif
+
+cWatchRetains::~cWatchRetains(){
+  cRetainable::s_retain_watchlist.Remove(this);
+  for(std::set<cRetainable *>::const_iterator i(m_watchset.begin());
+      i != m_watchset.end(); i++){
+    cRetainableError
+    << "Warning: possible memory leak of object \""
+    << (*i)->watchedName() << "\"";
+    cRetainableError
+    << " (retain count " << (*i)->refs()
+    << " at finish of leak-watch \"" << watchedName() << "\").";
+    (*i)->m_watcher = 0;
+} }
+void cWatchRetains::nameWatched(const cString &name){ m_ret_name = name; }
+
+
Index: avida/current/source/qt-viewer/watch_retains.hh
diff -u /dev/null avida/current/source/qt-viewer/watch_retains.hh:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/watch_retains.hh	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,16 @@
+#ifndef WATCH_RETAINS_HH
+#define WATCH_RETAINS_HH
+
+#ifndef _CPP_SET
+#include <set>
+#endif
+
+#ifndef RETAINABLE_HH
+#include "retainable.hh"
+#endif
+
+#ifndef WATCH_RETAINS_PROTO_HH
+#include "watch_retains_proto.hh"
+#endif
+
+#endif
Index: avida/current/source/qt-viewer/watch_retains_proto.hh
diff -u /dev/null avida/current/source/qt-viewer/watch_retains_proto.hh:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/qt-viewer/watch_retains_proto.hh	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,54 @@
+#ifndef WATCH_RETAINS_PROTO_HH
+#define WATCH_RETAINS_PROTO_HH
+
+/*
+Instantiate cWatchRetains "watcher" objects to check for memory leaks of
+cRetainable ("watched") objects.  Any cRetainable objects created
+between instantiation and deletion of a watcher will be
+watched for memory leaks.
+
+Multiple watchers can be instantiated, but only the most recently
+created watcher will be used to track new cRetainable objects, until
+the watcher is deleted; then the previously created watcher, if one
+exists, will be used to track new cRetainable objects.
+
+The watched objects can be named using nameWatched(); the watcher object
+can be named using nameWatcher().  When a watcher is deleted, it prints
+a list of objects it was watching that haven't been deleted.  The
+printout includes the name of the watched objects, its retain count, and
+the name of the watcher.
+
+Here's a good way to use watcher objects:
+
+void Foo::bar(){
+  cWatchRetains watcher;
+  // Do a bunch of stuff that causes cRetainable to be instantiated and
+  // hopefully, eventually, deleted.
+
+  // As Foo::bar() finishes, "watcher" will go out of scope and be
+  // deleted, listing the undeleted cRetainable objects it was
+  // watching.
+}
+*/
+
+
+class cActivateWatcher;
+class cWatchRetains : public cRetainable {
+  friend class cRetainable;
+  friend class cActivateWatcher;
+private:
+  /* disabled */ cWatchRetains(const cWatchRetains &);
+  /* disabled */ cWatchRetains operator =(const cWatchRetains &);
+protected:
+  std::set<cRetainable *> m_watchset;
+protected:
+  void activate(){ deactivate(); cRetainable::s_retain_watchlist.Push(this); }
+  void deactivate(){ cRetainable::s_retain_watchlist.Remove(this); }
+public:
+  cWatchRetains(){ cRetainable::s_retain_watchlist.Push(this); }
+  ~cWatchRetains();
+  void nameWatched(const cString &name);
+};
+
+
+#endif
Index: avida/current/source/qt-viewer/n_orig_instruction_cpu_widget.cc
diff -u avida/current/source/qt-viewer/n_orig_instruction_cpu_widget.cc:1.19 avida/current/source/qt-viewer/n_orig_instruction_cpu_widget.cc:1.20
--- avida/current/source/qt-viewer/n_orig_instruction_cpu_widget.cc:1.19	Thu Aug 28 13:49:31 2003
+++ avida/current/source/qt-viewer/n_orig_instruction_cpu_widget.cc	Wed Sep 24 01:12:04 2003
@@ -10,6 +10,8 @@
 #endif
 #ifndef QDESKTOPWIDGET_H
 #include <qdesktopwidget.h>
+#ifndef QHBUTTONGROUP_H
+#include <qhbuttongroup.h>
 #endif
 #ifndef QLAYOUT_H
 #include <qlayout.h>
@@ -20,6 +22,9 @@
 #ifndef QPUSHBUTTON_H
 #include <qpushbutton.h>
 #endif
+#ifndef QRADIOBUTTON_H
+#include <qradiobutton.h>
+#endif
 #ifndef QSCROLLVIEW_H
 #include <qscrollview.h>
 #endif
@@ -76,11 +81,17 @@
 : QWidget(parent, name, f)
 {
   GenDebug("entered.");
+
   m_hboxlayout = new QHBoxLayout(this);
   m_title_label = new QLabel(this);
+  QFont new_font(m_title_label->font());
+  new_font.setPointSize(new_font.pointSize() - 4);
+  setFont(new_font);
+  m_title_label->setFont(new_font);
   m_hboxlayout->addWidget(m_title_label);
 
   m_data1_label = new QLabel(this);
+  m_data1_label->setFont(new_font);
   m_data1_label->setAlignment((m_data1_label->alignment() & !(Qt::AlignRight)) | Qt::AlignRight);
   m_data1_label->setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
   m_hboxlayout->addWidget(m_data1_label);
@@ -93,7 +104,9 @@
 void cLabeledField::setTitle(const QString &title)
 { m_title_label->setText(title); }
 void cLabeledField::setData1Text(const QString &text)
-{ m_data1_label->setText(text); }
+{
+  m_data1_label->setText(text);
+}
 void cLabeledField::setData2Text(const QString &text)
 { m_data2_label->setText(text); }
 void cLabeledField::setData2Binary(unsigned int value)
@@ -104,12 +117,23 @@
 }
 void cLabeledField::setData1DecimalWidth(void){
   int zwidth = QApplication::fontMetrics().width("0");
-  m_data1_label->setMinimumWidth(7 * zwidth);
+  m_data1_label->setMinimumWidth(11 * zwidth);
 }
 void cLabeledField::showData2Text(bool yes){
   if(yes) m_data2_label->show();
   else m_data2_label->hide();
 }
+void cLabeledField::setBase(int base){
+  m_base = base;
+  int zwidth = QApplication::fontMetrics().width("0");
+  if(base<10){
+    m_data1_label->setMinimumWidth(34 * zwidth);
+  } else if (10<=base && base<16){
+    m_data1_label->setMinimumWidth(11 * zwidth);
+  } else if (16<=base){
+    m_data1_label->setMinimumWidth(9 * zwidth);
+  }
+}
 
 
 cSummaryWidget::cSummaryWidget(QWidget *parent, const char *name)
@@ -355,7 +379,8 @@
     int i = 0;
     cLabeledField *labeled_field = m_registers.first();
     for(; i < NUM_REGISTERS && 0 != labeled_field; i++, labeled_field = m_registers.next()){
-      labeled_field->setData1Text(QString("%1").arg(hardware->Register(i)));
+      labeled_field->setData1Text(QString("%1").arg(
+        hardware->Register(i), 0, labeled_field->getBase()));
       labeled_field->setData2Binary(hardware->Register(i));
     }
   }
@@ -367,6 +392,15 @@
   for(; i < NUM_REGISTERS && 0 != labeled_field; i++, labeled_field = m_registers.next())
   { labeled_field->showData2Text(should_show); }
 }
+void cRegistersWidget::chooseBaseSlot(int base){
+  GenDebug("entered.  base")(base)(".");
+  int i = 0;
+  cLabeledField *labeled_field = m_registers.first();
+  for(; i < NUM_REGISTERS && 0 != labeled_field; i++, labeled_field = m_registers.next())
+  { labeled_field->setBase(base); }
+  updateState();
+  GenDebug("done.");
+}
 
 cInputsWidget::cInputsWidget(QWidget *parent, const char *name)
 : QGroupBox(parent, name)
@@ -412,8 +446,9 @@
     int i = 0;
     cLabeledField *labeled_field = m_inputs.first();
     for(; i < IO_SIZE && 0 != labeled_field; i++, labeled_field = m_inputs.next()){
-      labeled_field->setData1Text(QString("%1").arg(pop_cell->GetInput(i)));
-      labeled_field->setData2Binary(pop_cell->GetInput(i));
+      labeled_field->setData1Text(QString("%1").arg(
+        pop_cell->GetInput(i), 0, labeled_field->getBase()));
+      //labeled_field->setData2Binary(pop_cell->GetInput(i));
     }
   }
   m_mission_control->unlock();
@@ -424,6 +459,15 @@
   for(; i < IO_SIZE && 0 != labeled_field; i++, labeled_field = m_inputs.next())
   { labeled_field->showData2Text(should_show); }
 }
+void cInputsWidget::chooseBaseSlot(int base){
+  GenDebug("entered.  base")(base)(".");
+  int i = 0;
+  cLabeledField *labeled_field = m_inputs.first();
+  for(; i < IO_SIZE && 0 != labeled_field; i++, labeled_field = m_inputs.next())
+  { labeled_field->setBase(base); }
+  updateState();
+  GenDebug("done.");
+}
 
 cStackField::cStackField(QWidget *parent, const char *name, WFlags f)
 : cLabeledField(parent, name, f)
@@ -495,8 +539,8 @@
     setData2Text("");
     useFrame(false);
   } else {
-    setData1Text(QString("%1").arg(hardware->GetStack(0, m_stack_no)));
-    setData2Binary(hardware->GetStack(0, m_stack_no));
+    setData1Text(QString("%1").arg( hardware->GetStack(0, m_stack_no), 0, getBase()));
+    //setData2Binary(hardware->GetStack(0, m_stack_no));
     GenDebug(" --- m_stack_no ")(m_stack_no);
     GenDebug(" --- m_cell_id ")(m_cell_id);
     GenDebug(" --- stack top ")(hardware->GetStack(0, m_stack_no));
@@ -515,6 +559,13 @@
   m_stack_popup->showData2Text(should_show);
   cLabeledField::showData2Text(should_show);  
 }
+void cStackField::chooseBaseSlot(int base){
+  GenDebug("entered.  base")(base)(".");
+  m_stack_popup->chooseBaseSlot(base);
+  cLabeledField::setBase(base);  
+  updateState();
+  GenDebug("done.");
+}
 
 cStackPopup::cStackPopup(QWidget *parent, const char *name)
 : QWidget(parent, name, WType_Popup)
@@ -574,8 +625,9 @@
     int i = 0;
     cLabeledField *labeled_field = m_stacklines.first();
     for(; i < STACK_SIZE && 0 != labeled_field; i++, labeled_field = m_stacklines.next()){
-      labeled_field->setData1Text(QString("%1").arg(hardware->GetStack(i, m_stack_no)));
-      labeled_field->setData2Binary(hardware->GetStack(i, m_stack_no));
+      labeled_field->setData1Text(
+        QString("%1").arg(hardware->GetStack(i, m_stack_no), 0, labeled_field->getBase()));
+      //labeled_field->setData2Binary(hardware->GetStack(i, m_stack_no));
     }
   }
   m_mission_control->unlock();
@@ -586,7 +638,15 @@
   for(; i < STACK_SIZE && 0 != labeled_field; i++, labeled_field = m_stacklines.next())
   { labeled_field->showData2Text(should_show); }
 }
-
+void cStackPopup::chooseBaseSlot(int base){
+  GenDebug("entered.  base")(base)(".");
+  int i = 0;
+  cLabeledField *labeled_field = m_stacklines.first();
+  for(; i < STACK_SIZE && 0 != labeled_field; i++, labeled_field = m_stacklines.next())
+  { labeled_field->setBase(base); }
+  updateState();
+  GenDebug("done.");
+}
 
 cStacksWidget::cStacksWidget(QWidget *parent, const char *name)
 : QGroupBox(parent, name)
@@ -628,9 +688,15 @@
   m_stackln1->showData2Text(should_show);
   m_stackln2->showData2Text(should_show);
 }
+void cStacksWidget::chooseBaseSlot(int base){
+  GenDebug("entered.  base")(base)(".");
+  m_stackln1->chooseBaseSlot(base);
+  m_stackln2->chooseBaseSlot(base);
+  GenDebug("done.");
+}
 
 
-cHideShowBinary::cHideShowBinary(
+cBaseChoiceBtns::cBaseChoiceBtns(
   QWidget *parent,
   const char *name,
   WFlags f
@@ -639,8 +705,8 @@
 {
   GenDebug("entered.");
 
-  //QHBoxLayout *layout = new QHBoxLayout(this);
-  //
+  QHBoxLayout *layout = new QHBoxLayout(this);
+  
   //layout->addItem(new QSpacerItem(20, 20));
 
   //m_widgetstack = new QWidgetStack(this); 
@@ -648,10 +714,10 @@
 
   //layout->addItem(new QSpacerItem(20, 20));
 
-  /*
-  FIXME:
-  restore hide/show binary after fixups.  -- kgn
-  */
+  ///*
+  //FIXME:
+  //restore hide/show binary after fixups.  -- kgn
+  //*/
   //m_show_binary_pbutton = new QPushButton("Show Binary", m_widgetstack);
   //m_hide_binary_pbutton = new QPushButton("Hide Binary", m_widgetstack);
 
@@ -666,27 +732,39 @@
   //);
 
   //m_widgetstack->raiseWidget(m_show_binary_pbutton);
+  QHButtonGroup *hbg = new QHButtonGroup(
+    "Number System",
+    this,
+    "<cBaseChoiceBtns::cBaseChoiceBtns(hbg)>"
+  );
+  layout->addWidget(hbg);
+  hbg->insert(new QRadioButton("bin", hbg, "<cBaseChoiceBtns::cBaseChoiceBtns('bin')>"), 2);
+  hbg->insert(new QRadioButton("hex", hbg, "<cBaseChoiceBtns::cBaseChoiceBtns('hex')>"), 16);
+  hbg->insert(new QRadioButton("dec", hbg, "<cBaseChoiceBtns::cBaseChoiceBtns('dec')>"), 10);
+  hbg->setRadioButtonExclusive(true);
+  hbg->setButton(10);
+  connect(hbg, SIGNAL(clicked(int)), this, SIGNAL(chooseBaseSig(int)));
 }
 
 void
-cHideShowBinary::showBinary(void){
+cBaseChoiceBtns::showBinary(void){
   GenDebug("entered.");
   /*
   FIXME:
   restore hide/show binary after fixups.  -- kgn
   */
-  //m_widgetstack->raiseWidget(m_hide_binary_pbutton);
+  m_widgetstack->raiseWidget(m_hide_binary_pbutton);
   emit showBinarySig(true);
 }
 
 void
-cHideShowBinary::hideBinary(void){
+cBaseChoiceBtns::hideBinary(void){
   GenDebug("entered.");
   /*
   FIXME:
   restore hide/show binary after fixups.  -- kgn
   */
-  //m_widgetstack->raiseWidget(m_show_binary_pbutton);
+  m_widgetstack->raiseWidget(m_show_binary_pbutton);
   emit showBinarySig(false);
 }
 
@@ -755,15 +833,16 @@
 {
   GenDebug("entered.");
     m_component_vbox = new QVBox(this, "<N_Instruction_CPUWidget::m_component_vbox>");
-     
       QHBox *hbox = new QHBox(m_component_vbox);
         m_registers = new cRegistersWidget(hbox);
         m_inputs = new cInputsWidget(hbox);
       m_stacks = new cStacksWidget(m_component_vbox);
-      m_hideshow_binary = new cHideShowBinary(m_component_vbox);
-      connect(m_hideshow_binary, SIGNAL(showBinarySig(bool)), this, SLOT(showData2Text(bool)));
-      m_hideshow_binary->hideBinary();
-       m_summary1 = new cSummaryWidget(m_component_vbox);
+      m_basechoice_btns = new cBaseChoiceBtns(m_component_vbox);
+      connect(m_basechoice_btns, SIGNAL(showBinarySig(bool)), this, SLOT(showData2Text(bool)));
+      connect(m_basechoice_btns, SIGNAL(chooseBaseSig(int)), this, SLOT(chooseBaseSlot(int)));
+      m_basechoice_btns->hideBinary();
+      m_basechoice_btns->emitChooseBaseSig(10);
+      m_summary1 = new cSummaryWidget(m_component_vbox);
   addTab(m_component_vbox, "CPU");
   //  m_stats_vbox = new QVBox(this, "<N_Instruction_CPUWidget::m_stats_vbox>");
   //    m_summary2 = new cSummaryWidget(m_stats_vbox);
@@ -810,4 +889,11 @@
   m_registers->showData2Text(should_show);
   m_stacks->showData2Text(should_show);
   m_inputs->showData2Text(should_show);
+}
+void N_Instruction_CPUWidget::chooseBaseSlot(int base){
+  GenDebug("entered.  base")(base)(".");
+  m_registers->chooseBaseSlot(base);
+  m_stacks->chooseBaseSlot(base);
+  m_inputs->chooseBaseSlot(base);
+  GenDebug("done.");
 }
Index: avida/current/source/qt-viewer/n_orig_instruction_cpu_widget.hh
diff -u avida/current/source/qt-viewer/n_orig_instruction_cpu_widget.hh:1.8 avida/current/source/qt-viewer/n_orig_instruction_cpu_widget.hh:1.9
--- avida/current/source/qt-viewer/n_orig_instruction_cpu_widget.hh:1.8	Wed Aug 27 03:22:22 2003
+++ avida/current/source/qt-viewer/n_orig_instruction_cpu_widget.hh	Wed Sep 24 01:12:04 2003
@@ -41,6 +41,7 @@
   QLabel *m_title_label;
   QLabel *m_data1_label;
   QLabel *m_data2_label;
+  int m_base;
 public:
   cLabeledField(
     QWidget *parent = 0,
@@ -53,6 +54,8 @@
   void setData2Binary(unsigned int value);
   void setData1DecimalWidth(void);
   void setData2BinaryWidth(void);
+  void setBase(int base);
+  int getBase(){ return m_base; }
 public slots:
   void showData2Text(bool);
 };
@@ -116,6 +119,7 @@
   void setPopulationCell(int cell_id);
   void updateState(void);
   void showData2Text(bool);
+  void chooseBaseSlot(int base);
 };
 
 class cInputsWidget : public QGroupBox {
@@ -134,6 +138,7 @@
   void setPopulationCell(int cell_id);
   void updateState(void);
   void showData2Text(bool);
+  void chooseBaseSlot(int base);
 };
 
 class cStackPopup : public QWidget {
@@ -158,6 +163,7 @@
   void setStackNumber(int stack_number);
   void updateState(void);
   void showData2Text(bool);
+  void chooseBaseSlot(int base);
 };
 
 class cStackField : public cLabeledField {
@@ -181,6 +187,7 @@
   void setStackNumber(int stack_number);
   void updateState(void);
   void showData2Text(bool);
+  void chooseBaseSlot(int base);
 protected slots:
   void displayPopupSlot(void);
 };
@@ -202,25 +209,28 @@
   void setPopulationCell(int cell_id);
   void updateState(void);
   void showData2Text(bool);
+  void chooseBaseSlot(int base);
 };
 
-class cHideShowBinary : public QWidget {
+class cBaseChoiceBtns : public QWidget {
   Q_OBJECT
 protected:
   QWidgetStack *m_widgetstack;
     QPushButton *m_show_binary_pbutton;
     QPushButton *m_hide_binary_pbutton;
 public:
-  cHideShowBinary(
+  cBaseChoiceBtns(
     QWidget *parent = 0,
     const char *name = 0,
     WFlags f = WDestructiveClose
   );
+  void emitChooseBaseSig(int base){ emit chooseBaseSig(base); }
 public slots:
   void showBinary(void);
   void hideBinary(void);
 signals:
   void showBinarySig(bool);
+  void chooseBaseSig(int);
 };
 
 class QVBox;
@@ -254,7 +264,7 @@
     cRegistersWidget *m_registers;
     cStacksWidget *m_stacks;
     cInputsWidget *m_inputs;
-    cHideShowBinary *m_hideshow_binary;
+    cBaseChoiceBtns *m_basechoice_btns;
   QVBox *m_stats_vbox;
     cSummaryWidget *m_summary2;
   QVBox *m_tasks_vbox;
@@ -273,6 +283,7 @@
   void setPopulationCell(int cell_id);
   void updateState(void);
   void showData2Text(bool);
+  void chooseBaseSlot(int base);
 };
 
 #endif /* !N_ORIG_INSTRUCTION_CPU_WIDGET_HH */
Index: avida/current/source/support/genesis
diff -u avida/current/source/support/genesis:1.42 avida/current/source/support/genesis:1.43
--- avida/current/source/support/genesis:1.42	Thu Aug  7 09:28:32 2003
+++ avida/current/source/support/genesis	Wed Sep 24 01:12:07 2003
@@ -3,7 +3,7 @@
 # For more information, see doc/genesis.html
 #############################################################################
 
-VERSION_ID 2.0b4		# Do not change this value!
+VERSION_ID 2.0b6		# Do not change this value!
 
 ### Architecture Variables ###
 MAX_UPDATES  -1         # Maximum updates to run simulation (-1 = no limit)
Index: avida/current/source/support/genesis.4stack
diff -u avida/current/source/support/genesis.4stack:1.2 avida/current/source/support/genesis.4stack:1.3
--- avida/current/source/support/genesis.4stack:1.2	Thu Aug  7 20:41:05 2003
+++ avida/current/source/support/genesis.4stack	Wed Sep 24 01:12:07 2003
@@ -3,7 +3,7 @@
 # For more information, see doc/genesis.html
 #############################################################################
 
-VERSION_ID 2.0b1		# Do not change this value!
+VERSION_ID 2.0b6		# Do not change this value!
 
 ### Architecture Variables ###
 MAX_UPDATES  -1         # Maximum updates to run simulation (-1 = no limit)
Index: avida/current/source/third-party/Loki/AbstractFactory.h
diff -u /dev/null avida/current/source/third-party/Loki/AbstractFactory.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/AbstractFactory.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+///////////////////////////////////////
+// Generated header: AbstractFactory.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+///////////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/AbstractFactory.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/AbstractFactory.h"
+#	elif (__MWERKS__)
+#		include "Reference/AbstractFactory.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/AbstractFactory.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/AbstractFactory.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/AbstractFactory.h"
+#	else
+#		include "Reference/AbstractFactory.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/AssocVector.h
diff -u /dev/null avida/current/source/third-party/Loki/AssocVector.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/AssocVector.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+///////////////////////////////////
+// Generated header: AssocVector.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+///////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/AssocVector.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/AssocVector.h"
+#	elif (__MWERKS__)
+#		include "Reference/AssocVector.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/AssocVector.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/AssocVector.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/AssocVector.h"
+#	else
+#		include "Reference/AssocVector.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/EmptyType.h
diff -u /dev/null avida/current/source/third-party/Loki/EmptyType.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/EmptyType.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+/////////////////////////////////
+// Generated header: EmptyType.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+/////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/EmptyType.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/EmptyType.h"
+#	elif (__MWERKS__)
+#		include "Reference/EmptyType.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/EmptyType.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/EmptyType.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/EmptyType.h"
+#	else
+#		include "Reference/EmptyType.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/Factory.h
diff -u /dev/null avida/current/source/third-party/Loki/Factory.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Factory.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+///////////////////////////////
+// Generated header: Factory.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+///////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/Factory.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/Factory.h"
+#	elif (__MWERKS__)
+#		include "Reference/Factory.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/Factory.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/Factory.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/Factory.h"
+#	else
+#		include "Reference/Factory.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/Functor.h
diff -u /dev/null avida/current/source/third-party/Loki/Functor.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Functor.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+///////////////////////////////
+// Generated header: Functor.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+///////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/Functor.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/Functor.h"
+#	elif (__MWERKS__)
+#		include "Reference/Functor.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/Functor.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/Functor.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/Functor.h"
+#	else
+#		include "Reference/Functor.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/HierarchyGenerators.h
diff -u /dev/null avida/current/source/third-party/Loki/HierarchyGenerators.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/HierarchyGenerators.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+///////////////////////////////////////////
+// Generated header: HierarchyGenerators.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+///////////////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/HierarchyGenerators.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/HierarchyGenerators.h"
+#	elif (__MWERKS__)
+#		include "Reference/HierarchyGenerators.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/HierarchyGenerators.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/HierarchyGenerators.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/HierarchyGenerators.h"
+#	else
+#		include "Reference/HierarchyGenerators.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/Loki.pri
diff -u /dev/null avida/current/source/third-party/Loki/Loki.pri:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Loki.pri	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,27 @@
+
+loki {
+  HEADERS += \
+    $$LOKI_HH/AbstractFactory.h \
+    $$LOKI_HH/AssocVector.h \
+    $$LOKI_HH/EmptyType.h \
+    $$LOKI_HH/Factory.h \
+    $$LOKI_HH/Functor.h \
+    $$LOKI_HH/HierarchyGenerators.h \
+    $$LOKI_HH/MultiMethods.h \
+    $$LOKI_HH/NullType.h \
+    $$LOKI_HH/Singleton.h \
+    $$LOKI_HH/SmallObj.h \
+    $$LOKI_HH/SmartPtr.h \
+    $$LOKI_HH/static_check.h \
+    $$LOKI_HH/Threads.h \
+    $$LOKI_HH/Tuple.h \
+    $$LOKI_HH/TypeInfo.h \
+    $$LOKI_HH/Typelist.h \
+    $$LOKI_HH/TypeManip.h \
+    $$LOKI_HH/TypeTraits.h \
+    $$LOKI_HH/Visitor.h
+
+  SOURCES += \
+    $$LOKI_CC/Singleton.cpp \
+    $$LOKI_CC/SmallObj.cpp
+}
Index: avida/current/source/third-party/Loki/Makefile.am
diff -u /dev/null avida/current/source/third-party/Loki/Makefile.am:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Makefile.am	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,27 @@
+
+noinst_LIBRARIES = libLoki.a
+libLoki_a_SOURCES = \
+  AbstractFactory.h \
+  AssocVector.h \
+  EmptyType.h \
+  Factory.h \
+  Functor.h \
+  HierarchyGenerators.h \
+  MultiMethods.h \
+  NullType.h \
+  Singleton.h \
+  SmallObj.h \
+  SmartPtr.h \
+  static_check.h \
+  Threads.h \
+  Tuple.h \
+  TypeInfo.h \
+  Typelist.h \
+  TypeManip.h \
+  TypeTraits.h \
+  Visitor.h \
+  Singleton.cpp \
+  SmallObj.cpp
+
+EXTRA_DIST = Loki.pri
+
Index: avida/current/source/third-party/Loki/MultiMethods.h
diff -u /dev/null avida/current/source/third-party/Loki/MultiMethods.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MultiMethods.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+////////////////////////////////////
+// Generated header: MultiMethods.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+////////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/MultiMethods.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/MultiMethods.h"
+#	elif (__MWERKS__)
+#		include "Reference/MultiMethods.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/MultiMethods.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/MultiMethods.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/MultiMethods.h"
+#	else
+#		include "Reference/MultiMethods.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/NullType.h
diff -u /dev/null avida/current/source/third-party/Loki/NullType.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/NullType.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+////////////////////////////////
+// Generated header: NullType.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/NullType.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/NullType.h"
+#	elif (__MWERKS__)
+#		include "Reference/NullType.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/NullType.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/NullType.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/NullType.h"
+#	else
+#		include "Reference/NullType.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/Singleton.cpp
diff -u /dev/null avida/current/source/third-party/Loki/Singleton.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Singleton.cpp	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+///////////////////////////////////
+// Generated header: Singleton.cpp
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+///////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/Singleton.cpp"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/Singleton.cpp"
+#	elif (__MWERKS__)
+#		include "Reference/Singleton.cpp"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/Singleton.cpp"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/Singleton.cpp"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/Singleton.cpp"
+#	else
+#		include "Reference/Singleton.cpp"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/Singleton.h
diff -u /dev/null avida/current/source/third-party/Loki/Singleton.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Singleton.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+/////////////////////////////////
+// Generated header: Singleton.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+/////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/Singleton.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/Singleton.h"
+#	elif (__MWERKS__)
+#		include "Reference/Singleton.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/Singleton.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/Singleton.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/Singleton.h"
+#	else
+#		include "Reference/Singleton.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/SmallObj.cpp
diff -u /dev/null avida/current/source/third-party/Loki/SmallObj.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/SmallObj.cpp	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+//////////////////////////////////
+// Generated header: SmallObj.cpp
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+//////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/SmallObj.cpp"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/SmallObj.cpp"
+#	elif (__MWERKS__)
+#		include "Reference/SmallObj.cpp"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/SmallObj.cpp"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/SmallObj.cpp"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/SmallObj.cpp"
+#	else
+#		include "Reference/SmallObj.cpp"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/SmallObj.h
diff -u /dev/null avida/current/source/third-party/Loki/SmallObj.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/SmallObj.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+////////////////////////////////
+// Generated header: SmallObj.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/SmallObj.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/SmallObj.h"
+#	elif (__MWERKS__)
+#		include "Reference/SmallObj.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/SmallObj.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/SmallObj.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/SmallObj.h"
+#	else
+#		include "Reference/SmallObj.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/SmartPtr.h
diff -u /dev/null avida/current/source/third-party/Loki/SmartPtr.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/SmartPtr.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+////////////////////////////////
+// Generated header: SmartPtr.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/SmartPtr.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/SmartPtr.h"
+#	elif (__MWERKS__)
+#		include "Reference/SmartPtr.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/SmartPtr.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/SmartPtr.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/SmartPtr.h"
+#	else
+#		include "Reference/SmartPtr.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/Threads.h
diff -u /dev/null avida/current/source/third-party/Loki/Threads.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Threads.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+///////////////////////////////
+// Generated header: Threads.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+///////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/Threads.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/Threads.h"
+#	elif (__MWERKS__)
+#		include "Reference/Threads.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/Threads.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/Threads.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/Threads.h"
+#	else
+#		include "Reference/Threads.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/Tuple.h
diff -u /dev/null avida/current/source/third-party/Loki/Tuple.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Tuple.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+/////////////////////////////
+// Generated header: Tuple.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+/////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/Tuple.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/Tuple.h"
+#	elif (__MWERKS__)
+#		include "Reference/Tuple.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/Tuple.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/Tuple.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/Tuple.h"
+#	else
+#		include "Reference/Tuple.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/TypeInfo.h
diff -u /dev/null avida/current/source/third-party/Loki/TypeInfo.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/TypeInfo.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+////////////////////////////////
+// Generated header: TypeInfo.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/TypeInfo.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/TypeInfo.h"
+#	elif (__MWERKS__)
+#		include "Reference/TypeInfo.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/TypeInfo.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/TypeInfo.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/TypeInfo.h"
+#	else
+#		include "Reference/TypeInfo.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/TypeManip.h
diff -u /dev/null avida/current/source/third-party/Loki/TypeManip.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/TypeManip.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+/////////////////////////////////
+// Generated header: TypeManip.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+/////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/TypeManip.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/TypeManip.h"
+#	elif (__MWERKS__)
+#		include "Reference/TypeManip.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/TypeManip.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/TypeManip.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/TypeManip.h"
+#	else
+#		include "Reference/TypeManip.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/TypeTraits.h
diff -u /dev/null avida/current/source/third-party/Loki/TypeTraits.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/TypeTraits.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+//////////////////////////////////
+// Generated header: TypeTraits.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+//////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/TypeTraits.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/TypeTraits.h"
+#	elif (__MWERKS__)
+#		include "Reference/TypeTraits.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/TypeTraits.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/TypeTraits.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/TypeTraits.h"
+#	else
+#		include "Reference/TypeTraits.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/Typelist.h
diff -u /dev/null avida/current/source/third-party/Loki/Typelist.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Typelist.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+////////////////////////////////
+// Generated header: Typelist.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/Typelist.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/Typelist.h"
+#	elif (__MWERKS__)
+#		include "Reference/Typelist.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/Typelist.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/Typelist.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/Typelist.h"
+#	else
+#		include "Reference/Typelist.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/Visitor.h
diff -u /dev/null avida/current/source/third-party/Loki/Visitor.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Visitor.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+///////////////////////////////
+// Generated header: Visitor.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+///////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/Visitor.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/Visitor.h"
+#	elif (__MWERKS__)
+#		include "Reference/Visitor.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/Visitor.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/Visitor.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/Visitor.h"
+#	else
+#		include "Reference/Visitor.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/readme.txt
diff -u /dev/null avida/current/source/third-party/Loki/readme.txt:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/readme.txt	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,36 @@
+Last update: Aug 29, 2002
+
+Directions:
+
+To use Loki, simply extract the files from the archive, give your compiler access to their path, and include them appropriately in your code via #include.
+
+If you use the small object allocator directly or indirectly (through the Functor class) you must add SmallObj.cpp to your project/makefile.
+
+If you use Singletons with longevity you must add Singleton.cpp to your project/makefile.
+
+
+Compatibility:
+
+Supported Compilers:
+Gcc v2.95.3
+Microsoft Visual C++ v7.0
+Borland C++ Builder v6.0
+
+Mostly Supported:
+CodeWarrior 6.0
+
+TypeList:
+Microsoft Visual C++ v6.0
+
+
+CodeWarrior has a problem with the Conversion template (see TypeManip.h) and, though it compiles it, it doesn't provide correct results. Consequently, the DerivedToFront algorithm in Typelist.h does not function. This affects the static dispatcher in Multimethods.h. As a fix, you must order the types (putting the most derived ones in the front) when providing the typelist argument to StaticDispatcher.
+
+
+
+More info:
+
+http://moderncppdesign.com
+http://sourceforge.net/projects/loki-lib/
+http://sourceforge.net/projects/loki-exp/
+
+
Index: avida/current/source/third-party/Loki/static_check.h
diff -u /dev/null avida/current/source/third-party/Loki/static_check.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/static_check.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,24 @@
+////////////////////////////////////
+// Generated header: static_check.h
+// Forwards to the appropriate code
+// that works on the detected compiler
+// Generated on Sun Sep 15 15:31:17 2002
+////////////////////////////////////
+
+#ifdef LOKI_USE_REFERENCE
+#	include "Reference/static_check.h"
+#else
+#	if (__INTEL_COMPILER)
+#		include "Reference/static_check.h"
+#	elif (__MWERKS__)
+#		include "Reference/static_check.h"
+#	elif (__BORLANDC__ >= 0x560)
+#		include "Borland/static_check.h"
+#	elif (_MSC_VER >= 1300)
+#		include "MSVC/1300/static_check.h"
+#	elif (_MSC_VER >= 1200)
+#		include "MSVC/1200/static_check.h"
+#	else
+#		include "Reference/static_check.h"
+#	endif
+#endif
Index: avida/current/source/third-party/Loki/Borland/AbstractFactory.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/AbstractFactory.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/AbstractFactory.h	Wed Sep 24 01:12:07 2003
@@ -0,0 +1,165 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef ABSTRACTFACTORY_INC_
+#define ABSTRACTFACTORY_INC_
+
+#include "Typelist.h"
+#include "TypeManip.h"
+#include "HierarchyGenerators.h"
+
+#include <cassert>
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AbstractFactoryUnit
+// The building block of an Abstract Factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class AbstractFactoryUnit
+    {
+    public:
+        virtual T* DoCreate(Type2Type<T>) = 0;
+        virtual ~AbstractFactoryUnit() {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AbstractFactory
+// Defines an Abstract Factory interface starting from a typelist
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class TList,
+        template <class> class Unit = AbstractFactoryUnit
+    >
+    class AbstractFactory : public GenScatterHierarchy<TList, Unit>
+    {
+    public:
+        typedef TList ProductList;
+        
+        template <class T> T* Create()
+        {
+            Unit<T>& unit = *this;
+            return unit.DoCreate(Type2Type<T>());
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template OpNewFactoryUnit
+// Creates an object by invoking the new operator
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ConcreteProduct, class Base>
+    class OpNewFactoryUnit : public Base
+    {
+        typedef typename Base::ProductList BaseProductList;
+    
+    protected:
+        typedef typename BaseProductList::Tail ProductList;
+    
+    public:
+        typedef typename BaseProductList::Head AbstractProduct;
+        ConcreteProduct* DoCreate(Type2Type<AbstractProduct>)
+        {
+            return new ConcreteProduct;
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template PrototypeFactoryUnit
+// Creates an object by cloning a prototype
+// There is a difference between the implementation herein and the one described
+//     in the book: GetPrototype and SetPrototype use the helper friend 
+//     functions DoGetPrototype and DoSetPrototype. The friend functions avoid
+//     name hiding issues. Plus, GetPrototype takes a reference to pointer
+//     instead of returning the pointer by value.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ConcreteProduct, class Base>
+    class PrototypeFactoryUnit : public Base
+    {
+        typedef typename Base::ProductList BaseProductList;
+    
+    protected:
+        typedef typename BaseProductList::Tail ProductList;
+
+    public:
+        typedef typename BaseProductList::Head AbstractProduct;
+
+        PrototypeFactoryUnit(AbstractProduct* p = 0)
+            : pPrototype_(p)
+        {}
+        
+        friend void DoGetPrototype(const PrototypeFactoryUnit& me,
+            AbstractProduct*& pPrototype)
+        { pPrototype = me.pPrototype_; }
+        
+        friend void DoSetPrototype(PrototypeFactoryUnit& me, 
+            AbstractProduct* pObj)
+        { me.pPrototype_ = pObj; }
+        
+        template <class U>
+        void GetPrototype(AbstractProduct*& p)
+        { return DoGetPrototype(*this, p); }
+        
+        template <class U>
+        void SetPrototype(U* pObj)
+        { DoSetPrototype(*this, pObj); }
+        
+        AbstractProduct* DoCreate(Type2Type<AbstractProduct>)
+        {
+            assert(pPrototype_);
+            return pPrototype_->Clone();
+        }
+        
+    private:
+        AbstractProduct* pPrototype_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ConcreteFactory
+// Implements an AbstractFactory interface
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class AbstractFact,
+        template <class, class> class Creator = OpNewFactoryUnit,
+        class TList = typename AbstractFact::ProductList
+    >
+    class ConcreteFactory
+        : public GenLinearHierarchy<
+            typename TL::Reverse<TList>::Result, Creator, AbstractFact>
+    {
+    public:
+        typedef typename AbstractFact::ProductList ProductList;
+        typedef TList ConcreteProductList;
+    };
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// July 16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // ABSTRACTFACTORY_INC_
Index: avida/current/source/third-party/Loki/Borland/AssocVector.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/AssocVector.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/AssocVector.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,338 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef ASSOCVECTOR_INC_
+#define ASSOCVECTOR_INC_
+
+#include <algorithm>
+#include <functional>
+#include <vector>
+#include <utility>
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template AssocVectorCompare
+// Used by AssocVector
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class Value, class C>
+        class AssocVectorCompare : public C
+        {
+            typedef std::pair<typename C::first_argument_type, Value>
+                Data;
+            typedef typename C::first_argument_type first_argument_type;
+
+        public:
+            AssocVectorCompare()
+            {}
+            
+            AssocVectorCompare(const C& src) : C(src)
+            {}
+            
+            bool operator()(const first_argument_type& lhs, 
+                const first_argument_type& rhs) const
+            { return C::operator()(lhs, rhs); }
+            
+            bool operator()(const Data& lhs, const Data& rhs) const
+            { return operator()(lhs.first, rhs.first); }
+            
+            bool operator()(const Data& lhs, 
+                const first_argument_type& rhs) const
+            { return operator()(lhs.first, rhs); }
+            
+            bool operator()(const first_argument_type& lhs,
+                const Data& rhs) const
+            { return operator()(lhs, rhs.first); }
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AssocVector
+// An associative vector built as a syntactic drop-in replacement for std::map
+// BEWARE: AssocVector doesn't respect all map's guarantees, the most important
+//     being:
+// * iterators are invalidated by insert and erase operations
+// * the complexity of insert/erase is O(N) not O(log N)
+// * value_type is std::pair<K, V> not std::pair<const K, V>
+// * iterators are random
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class K,
+        class V,
+        class C = std::less<K>,
+        class A = std::allocator< std::pair<K, V> >
+    >
+    class AssocVector 
+        : private std::vector< std::pair<K, V>, A >
+        , private Private::AssocVectorCompare<V, C>
+    {
+        typedef std::vector<std::pair<K, V>, A> Base;
+        typedef Private::AssocVectorCompare<V, C> MyCompare;
+
+    public:
+        typedef K key_type;
+        typedef V mapped_type;
+        typedef typename Base::value_type value_type;
+
+        typedef C key_compare;
+        typedef A allocator_type;
+        typedef typename A::reference reference;
+        typedef typename A::const_reference const_reference;
+        typedef typename Base::iterator iterator;
+        typedef typename Base::const_iterator const_iterator;
+        typedef typename Base::size_type size_type;
+        typedef typename Base::difference_type difference_type;
+        typedef typename A::pointer pointer;
+        typedef typename A::const_pointer const_pointer;
+        typedef typename Base::reverse_iterator reverse_iterator;
+        typedef typename Base::const_reverse_iterator const_reverse_iterator;
+
+        class value_compare
+            : public std::binary_function<value_type, value_type, bool>
+            , private key_compare
+        {
+            friend class AssocVector;
+        
+        protected:
+            value_compare(key_compare pred) : key_compare(pred)
+            {}
+
+        public:
+            bool operator()(const value_type& lhs, const value_type& rhs) const
+            { return key_compare::operator()(lhs.first, rhs.first); }
+        };
+        
+        // 23.3.1.1 construct/copy/destroy
+
+        explicit AssocVector(const key_compare& comp = key_compare(), 
+            const A& alloc = A())
+        : Base(alloc), MyCompare(comp)
+        {}
+        
+        template <class InputIterator>
+        AssocVector(InputIterator first, InputIterator last, 
+            const key_compare& comp = key_compare(), 
+            const A& alloc = A())
+        : Base(first, last, alloc), MyCompare(comp)
+        {
+            MyCompare& me = *this;
+            std::sort(begin(), end(), me);
+        }
+        
+        AssocVector& operator=(const AssocVector& rhs)
+        { 
+            AssocVector<K, V, C, A>(rhs).swap(*this);  // ### Borland fix: template params added to cast
+            return *this;
+        }
+
+        // iterators:
+        // The following are here because MWCW gets 'using' wrong
+        iterator begin() { return Base::begin(); }
+        const_iterator begin() const { return Base::begin(); }
+        iterator end() { return Base::end(); }
+        const_iterator end() const { return Base::end(); }
+        reverse_iterator rbegin() { return Base::rbegin(); }
+        const_reverse_iterator rbegin() const { return Base::rbegin(); }
+        reverse_iterator rend() { return Base::rend(); }
+        const_reverse_iterator rend() const { return Base::rend(); }
+        
+        // capacity:
+        bool empty() const { return Base::empty(); }
+        size_type size() const { return Base::size(); }
+        size_type max_size() { return Base::max_size(); }
+
+        // 23.3.1.2 element access:
+        mapped_type& operator[](const key_type& key)
+        { return insert(value_type(key, mapped_type())).first->second; }
+
+        // modifiers:
+        std::pair<iterator, bool> insert(const value_type& val)
+        {
+            bool found(true);
+            iterator i(lower_bound(val.first));
+
+            if (i == end() || operator()(val.first, i->first))
+            {
+                i = Base::insert(i, val);
+                found = false;
+            }
+            return std::make_pair(i, !found);
+        }
+
+        iterator insert(iterator pos, const value_type& val)
+        {
+            if (pos != end() && operator()(*pos, val) && 
+                (pos == end() - 1 ||
+                    !operator()(val, pos[1]) &&
+                        operator()(pos[1], val)))
+            {
+                return Base::insert(pos, val);
+            }
+            return insert(val).first;
+        }
+       
+        template <class InputIterator>
+        void insert(InputIterator first, InputIterator last)
+        { for (; first != last; ++first) insert(*first); }
+        
+        void erase(iterator pos)
+        { Base::erase(pos); }
+
+        size_type erase(const key_type& k)
+        {
+            iterator i(find(k));
+            if (i == end()) return 0;
+            erase(i);
+            return 1;
+        }
+
+        void erase(iterator first, iterator last)
+        { Base::erase(first, last); }
+
+        void swap(AssocVector& other)
+        {
+            using std::swap;
+            Base::swap(other);
+            MyCompare& me = *this;
+            MyCompare& rhs = other;
+            swap(me, rhs);
+        }
+        
+        void clear()
+        { Base::clear(); }
+
+        // observers:
+        key_compare key_comp() const
+        { return *this; }
+
+        value_compare value_comp() const
+        {
+            const key_compare& comp = *this;
+            return value_compare(comp);
+        }
+
+        // 23.3.1.3 map operations:
+        iterator find(const key_type& k)
+        {
+            iterator i(lower_bound(k));
+            if (i != end() && operator()(k, i->first))
+            {
+                i = end();
+            }
+            return i;
+        }
+
+        const_iterator find(const key_type& k) const
+        {       
+            const_iterator i(lower_bound(k));
+            if (i != end() && operator()(k, i->first))
+            {
+                i = end();
+            }
+            return i;
+        }
+
+        size_type count(const key_type& k) const
+        { return find(k) != end(); }
+
+        iterator lower_bound(const key_type& k)
+        {
+            MyCompare& me = *this;
+            return std::lower_bound(begin(), end(), k, me);
+        }
+
+        const_iterator lower_bound(const key_type& k) const
+        {
+            const MyCompare& me = *this;
+            return std::lower_bound(begin(), end(), k, me);
+        }
+
+        iterator upper_bound(const key_type& k)
+        {
+            MyCompare& me = *this;
+            return std::upper_bound(begin(), end(), k, me);
+        }
+
+        const_iterator upper_bound(const key_type& k) const
+        {
+            const MyCompare& me = *this;
+            return std::upper_bound(begin(), end(), k, me);
+        }
+
+        std::pair<iterator, iterator> equal_range(const key_type& k)
+        {
+            MyCompare& me = *this;
+            return std::equal_range(begin(), end(), k, me);
+        }
+
+        std::pair<const_iterator, const_iterator> equal_range(
+            const key_type& k) const
+        {
+            const MyCompare& me = *this;
+            return std::equal_range(begin(), end(), k, me);
+        }
+        
+        friend bool operator==(const AssocVector& lhs, const AssocVector& rhs)
+        {
+            const Base& me = lhs;
+            return me == rhs;
+        } 
+
+        bool operator<(const AssocVector& rhs) const
+        {
+            const Base& me = *this;
+            const Base& yo = rhs;
+            return me < yo;
+        } 
+
+        friend bool operator!=(const AssocVector& lhs, const AssocVector& rhs)
+        { return !(lhs == rhs); } 
+
+        friend bool operator>(const AssocVector& lhs, const AssocVector& rhs)
+        { return rhs < lhs; }
+
+        friend bool operator>=(const AssocVector& lhs, const AssocVector& rhs)
+        { return !(lhs < rhs); } 
+
+        friend bool operator<=(const AssocVector& lhs, const AssocVector& rhs)
+        { return !(rhs < lhs); }
+    };
+
+    // specialized algorithms:
+    template <class K, class V, class C, class A>
+    void swap(AssocVector<K, V, C, A>& lhs, AssocVector<K, V, C, A>& rhs)
+    { lhs.swap(rhs); }
+    
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// May     20, 2001: change operator= - credit due to Cristoph Koegl
+// June    11, 2001: remove paren in equal_range - credit due to Cristoph Koegl
+// June    20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// January 22, 2002: fixed operator= - credit due to Tom Hyer
+// June    25, 2002: fixed template insert() - credit due to Robert Minsk
+// June    27, 2002: fixed member swap() - credit due to David Brookman
+// July    16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // ASSOCVECTOR_INC_
Index: avida/current/source/third-party/Loki/Borland/EmptyType.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/EmptyType.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/EmptyType.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef EMPTYTYPE_INC_
+#define EMPTYTYPE_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class EmptyType
+// Used as a class type that doesn't hold anything
+// Useful as a strawman class
+////////////////////////////////////////////////////////////////////////////////
+
+    class EmptyType {};
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// July 16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // EMPTYTYPE_INC_
Index: avida/current/source/third-party/Loki/Borland/Factory.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/Factory.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/Factory.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,150 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef FACTORY_INC_
+#define FACTORY_INC_
+
+#include "Loki_TypeInfo.h"
+#include "AssocVector.h"
+#include <exception>
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DefaultFactoryError
+// Manages the "Unknown Type" error in an object factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename IdentifierType, class AbstractProduct>
+    struct DefaultFactoryError
+    {
+        struct Exception : public std::exception
+        {
+            const char* what() const throw() { return "Unknown Type"; }
+        };
+        
+        static AbstractProduct* OnUnknownType(IdentifierType)
+        {
+            throw Exception();
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Factory
+// Implements a generic object factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class AbstractProduct, 
+        typename IdentifierType,
+        typename ProductCreator = AbstractProduct* (*)(),
+        template<typename, class>
+            class FactoryErrorPolicy = DefaultFactoryError
+    >
+    class Factory 
+        : public FactoryErrorPolicy<IdentifierType, AbstractProduct>
+    {
+    public:
+        typedef ProductCreator ProductCreator; //### added for convenience, Pavel
+        
+        bool Register(const IdentifierType& id, ProductCreator creator)
+        {
+            return associations_.insert(
+                IdToProductMap::value_type(id, creator)).second;
+        }
+        
+        bool Unregister(const IdentifierType& id)
+        {
+            return associations_.erase(id) == 1;
+        }
+        
+        AbstractProduct* CreateObject(const IdentifierType& id)
+        {
+            typename IdToProductMap::iterator i = associations_.find(id);
+            if (i != associations_.end())
+            {
+                return (i->second)();
+            }
+            return OnUnknownType(id);
+        }
+        
+    private:
+        typedef AssocVector<IdentifierType, ProductCreator> IdToProductMap;
+        IdToProductMap associations_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template CloneFactory
+// Implements a generic cloning factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class AbstractProduct, 
+        class ProductCreator =
+            AbstractProduct* (*)(const AbstractProduct*),
+        template<typename, class>
+            class FactoryErrorPolicy = DefaultFactoryError
+    >
+    class CloneFactory
+        : public FactoryErrorPolicy<TypeInfo, AbstractProduct>
+    {
+    public:
+        typedef ProductCreator ProductCreator; //### added for convenience, Pavel
+        
+        bool Register(const TypeInfo& ti, ProductCreator creator)
+        {
+            return associations_.insert(
+                IdToProductMap::value_type(ti, creator)).second;
+        }
+        
+        bool Unregister(const TypeInfo& id)
+        {
+            return associations_.erase(id) == 1;
+        }
+        
+        AbstractProduct* CreateObject(const AbstractProduct* model)
+        {
+            if (model == 0) return 0;
+            
+            typename IdToProductMap::iterator i = 
+                associations_.find(typeid(*model));
+            if (i != associations_.end())
+            {
+                return (i->second)(model);
+            }
+            return OnUnknownType(typeid(*model));
+        }
+        
+    private:
+        typedef AssocVector<TypeInfo, ProductCreator> IdToProductMap;
+        IdToProductMap associations_;
+    };
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  08, 2002: replaced const_iterator with iterator so that self-modifying
+//                ProductCreators are supported. Also, added a throw() spec to what().
+//                Credit due to Jason Fischl.
+// July 16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // FACTORY_INC_
Index: avida/current/source/third-party/Loki/Borland/Functor.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/Functor.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/Functor.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,1145 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef FUNCTOR_INC_
+#define FUNCTOR_INC_
+
+#include "Typelist.h"
+#include "EmptyType.h"
+#include "SmallObj.h"
+#include "TypeTraits.h"
+#include <typeinfo>
+#include <memory>
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl (internal)
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <typename R, template <class> class ThreadingModel>
+        struct FunctorImplBase : public SmallObject<ThreadingModel>
+        {
+            typedef R ResultType;
+            
+            typedef EmptyType Parm1;
+            typedef EmptyType Parm2;
+            typedef EmptyType Parm3;
+            typedef EmptyType Parm4;
+            typedef EmptyType Parm5;
+            typedef EmptyType Parm6;
+            typedef EmptyType Parm7;
+            typedef EmptyType Parm8;
+            typedef EmptyType Parm9;
+            typedef EmptyType Parm10;
+            typedef EmptyType Parm11;
+            typedef EmptyType Parm12;
+            typedef EmptyType Parm13;
+            typedef EmptyType Parm14;
+            typedef EmptyType Parm15;
+
+            virtual FunctorImplBase* DoClone() const = 0;
+            template <class U>
+            static U* Clone(U* pObj)
+            {
+                if (!pObj) return 0;
+                U* pClone = static_cast<U*>(pObj->DoClone());
+                assert(typeid(*pClone) == typeid(*pObj));
+                return pClone;
+            }
+        };
+    }
+    
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFINE_CLONE_FUNCTORIMPL
+// Implements the DoClone function for a functor implementation
+////////////////////////////////////////////////////////////////////////////////
+
+#define DEFINE_CLONE_FUNCTORIMPL(Cls) \
+    virtual Cls* DoClone() const { return new Cls(*this); }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// The base class for a hierarchy of functors. The FunctorImpl class is not used
+//     directly; rather, the Functor class manages and forwards to a pointer to
+//     FunctorImpl
+// You may want to derive your own functors from FunctorImpl.
+// Specializations of FunctorImpl for up to 15 parameters follow
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, class TList, 
+        template <class> class ThreadingModel = DEFAULT_THREADING>
+    class FunctorImpl;
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 0 (zero) parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, template <class> class ThreadingModel>
+    class FunctorImpl<R, NullType, ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        virtual R operator()() = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 1 parameter
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_1(P1), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        virtual R operator()(Parm1) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 2 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, 
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_2(P1, P2), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        virtual R operator()(Parm1, Parm2) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 3 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_3(P1, P2, P3), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        virtual R operator()(Parm1, Parm2, Parm3) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 4 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_4(P1, P2, P3, P4), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 5 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_5(P1, P2, P3, P4, P5), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 6 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_6(P1, P2, P3, P4, P5, P6), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 7 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_7(P1, P2, P3, P4, P5, P6, P7), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 8 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_8(P1, P2, P3, P4, P5, P6, P7, P8),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 9 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_9(P1, P2, P3, P4, P5, P6, P7, P8, P9),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 10 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_10(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 11 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10, typename P11,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R,
+            TYPELIST_11(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        typedef typename TypeTraits<P11>::ParameterType Parm11;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10, Parm11) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 12 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10, typename P11, typename P12,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R,
+            TYPELIST_12(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        typedef typename TypeTraits<P11>::ParameterType Parm11;
+        typedef typename TypeTraits<P12>::ParameterType Parm12;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10, Parm11, Parm12) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 13 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10, typename P11, typename P12, typename P13,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R,
+            TYPELIST_13(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        typedef typename TypeTraits<P11>::ParameterType Parm11;
+        typedef typename TypeTraits<P12>::ParameterType Parm12;
+        typedef typename TypeTraits<P13>::ParameterType Parm13;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10, Parm11, Parm12, Parm13) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 14 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10, typename P11, typename P12, typename P13, typename P14,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R,
+            TYPELIST_14(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13,
+                P14),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        typedef typename TypeTraits<P11>::ParameterType Parm11;
+        typedef typename TypeTraits<P12>::ParameterType Parm12;
+        typedef typename TypeTraits<P13>::ParameterType Parm13;
+        typedef typename TypeTraits<P14>::ParameterType Parm14;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10, Parm11, Parm12, Parm13, Parm14) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 15 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10, typename P11, typename P12, typename P13, typename P14,
+        typename P15, template <class> class ThreadingModel>
+    class FunctorImpl<R,
+            TYPELIST_15(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13,
+                P14, P15),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        typedef typename TypeTraits<P11>::ParameterType Parm11;
+        typedef typename TypeTraits<P12>::ParameterType Parm12;
+        typedef typename TypeTraits<P13>::ParameterType Parm13;
+        typedef typename TypeTraits<P14>::ParameterType Parm14;
+        typedef typename TypeTraits<P15>::ParameterType Parm15;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10, Parm11, Parm12, Parm13, Parm14,
+            Parm15) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorHandler
+// Wraps functors and pointers to functions
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ParentFunctor, typename Fun>
+    class FunctorHandler
+        : public ParentFunctor::Impl
+    {
+        typedef typename ParentFunctor::Impl Base;
+
+    public:
+        typedef typename Base::ResultType ResultType;
+        typedef typename Base::Parm1 Parm1;
+        typedef typename Base::Parm2 Parm2;
+        typedef typename Base::Parm3 Parm3;
+        typedef typename Base::Parm4 Parm4;
+        typedef typename Base::Parm5 Parm5;
+        typedef typename Base::Parm6 Parm6;
+        typedef typename Base::Parm7 Parm7;
+        typedef typename Base::Parm8 Parm8;
+        typedef typename Base::Parm9 Parm9;
+        typedef typename Base::Parm10 Parm10;
+        typedef typename Base::Parm11 Parm11;
+        typedef typename Base::Parm12 Parm12;
+        typedef typename Base::Parm13 Parm13;
+        typedef typename Base::Parm14 Parm14;
+        typedef typename Base::Parm15 Parm15;
+        
+        FunctorHandler(const Fun& fun) : f_(fun) {}
+        
+        DEFINE_CLONE_FUNCTORIMPL(FunctorHandler)
+
+        // operator() implementations for up to 15 arguments
+                
+        ResultType operator()()
+        { return f_(); }
+
+        ResultType operator()(Parm1 p1)
+        { return f_(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return f_(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return f_(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return f_(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return f_(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return f_(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return f_(p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                p14, p15);
+        }
+        
+    private:
+        Fun f_;
+    };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorHandler
+// Wraps pointers to member functions
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ParentFunctor, typename PointerToObj,
+        typename PointerToMemFn>
+    class MemFunHandler : public ParentFunctor::Impl
+    {
+        typedef typename ParentFunctor::Impl Base;
+
+    public:
+        typedef typename Base::ResultType ResultType;
+        typedef typename Base::Parm1 Parm1;
+        typedef typename Base::Parm2 Parm2;
+        typedef typename Base::Parm3 Parm3;
+        typedef typename Base::Parm4 Parm4;
+        typedef typename Base::Parm5 Parm5;
+        typedef typename Base::Parm6 Parm6;
+        typedef typename Base::Parm7 Parm7;
+        typedef typename Base::Parm8 Parm8;
+        typedef typename Base::Parm9 Parm9;
+        typedef typename Base::Parm10 Parm10;
+        typedef typename Base::Parm11 Parm11;
+        typedef typename Base::Parm12 Parm12;
+        typedef typename Base::Parm13 Parm13;
+        typedef typename Base::Parm14 Parm14;
+        typedef typename Base::Parm15 Parm15;
+
+        MemFunHandler(const PointerToObj& pObj, PointerToMemFn pMemFn) 
+        : pObj_(pObj), pMemFn_(pMemFn)
+        {}
+        
+        DEFINE_CLONE_FUNCTORIMPL(MemFunHandler)
+        
+        ResultType operator()()
+        { return ((*pObj_).*pMemFn_)(); }
+
+        ResultType operator()(Parm1 p1)
+        { return ((*pObj_).*pMemFn_)(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return ((*pObj_).*pMemFn_)(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12, p13);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12, p13, p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12, p13, p14, p15);
+        }
+        
+    private:
+        PointerToObj pObj_;
+        PointerToMemFn pMemFn_;
+    };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template Functor
+// A generalized functor implementation with value semantics
+////////////////////////////////////////////////////////////////////////////////
+       
+    template <typename R = void, class TList = NullType,
+        template<class> class ThreadingModel = DEFAULT_THREADING>
+    class Functor
+    {
+    public:
+        // Handy type definitions for the body type
+        typedef FunctorImpl<R, TList, ThreadingModel> Impl;
+        typedef R ResultType;
+        typedef TList ParmList;
+        typedef typename Impl::Parm1 Parm1;
+        typedef typename Impl::Parm2 Parm2;
+        typedef typename Impl::Parm3 Parm3;
+        typedef typename Impl::Parm4 Parm4;
+        typedef typename Impl::Parm5 Parm5;
+        typedef typename Impl::Parm6 Parm6;
+        typedef typename Impl::Parm7 Parm7;
+        typedef typename Impl::Parm8 Parm8;
+        typedef typename Impl::Parm9 Parm9;
+        typedef typename Impl::Parm10 Parm10;
+        typedef typename Impl::Parm11 Parm11;
+        typedef typename Impl::Parm12 Parm12;
+        typedef typename Impl::Parm13 Parm13;
+        typedef typename Impl::Parm14 Parm14;
+        typedef typename Impl::Parm15 Parm15;
+
+        // Member functions
+
+        Functor() : spImpl_(0)
+        {}
+        
+        Functor(const Functor& rhs) : spImpl_(Impl::Clone(rhs.spImpl_.get()))
+        {}
+        
+        Functor(std::auto_ptr<Impl> spImpl) : spImpl_(spImpl)
+        {}
+        
+        template <typename Fun>
+        Functor(Fun fun)
+        : spImpl_(new FunctorHandler<Functor, Fun>(fun))
+        {}
+
+        template <class PtrObj, typename MemFn>
+        Functor(const PtrObj& p, MemFn memFn)
+        : spImpl_(new MemFunHandler<Functor, PtrObj, MemFn>(p, memFn))
+        {}
+
+        Functor& operator=(const Functor& rhs)
+        {
+            Functor copy(rhs);
+            // swap auto_ptrs by hand
+            Impl* p = spImpl_.release();
+            spImpl_.reset(copy.spImpl_.release());
+            copy.spImpl_.reset(p);
+            return *this;
+        }
+        
+        ResultType operator()()
+        { return (*spImpl_)(); }
+
+        ResultType operator()(Parm1 p1)
+        { return (*spImpl_)(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return (*spImpl_)(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return (*spImpl_)(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return (*spImpl_)(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return (*spImpl_)(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, 
+                p12);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11,
+            p12, p13);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, 
+                p12, p13, p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, 
+                p12, p13, p14, p15);
+        }
+
+    private:
+        std::auto_ptr<Impl> spImpl_;
+    };
+    
+    namespace Private
+    {
+        template <class Fctor> struct BinderFirstTraits;
+
+        template <typename R, class TList, template <class> class ThreadingModel>
+        struct BinderFirstTraits< Functor<R, TList, ThreadingModel> >
+        {
+            typedef typename TL::Erase<TList, 
+                    typename TL::TypeAt<TList, 0>::Result>::Result
+                ParmList;
+            typedef Functor<R, ParmList, ThreadingModel> BoundFunctorType;
+            typedef typename BoundFunctorType::Impl Impl;
+        };        
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BinderFirst
+// Binds the first parameter of a Functor object to a specific value
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class OriginalFunctor>
+    class BinderFirst 
+        : public Private::BinderFirstTraits<OriginalFunctor>::Impl
+    {
+        typedef typename Private::BinderFirstTraits<OriginalFunctor>::Impl Base;
+        typedef typename OriginalFunctor::ResultType ResultType;
+
+        typedef typename OriginalFunctor::Parm1 BoundType;
+
+        typedef typename OriginalFunctor::Parm2 Parm1;
+        typedef typename OriginalFunctor::Parm3 Parm2;
+        typedef typename OriginalFunctor::Parm4 Parm3;
+        typedef typename OriginalFunctor::Parm5 Parm4;
+        typedef typename OriginalFunctor::Parm6 Parm5;
+        typedef typename OriginalFunctor::Parm7 Parm6;
+        typedef typename OriginalFunctor::Parm8 Parm7;
+        typedef typename OriginalFunctor::Parm9 Parm8;
+        typedef typename OriginalFunctor::Parm10 Parm9;
+        typedef typename OriginalFunctor::Parm11 Parm10;
+        typedef typename OriginalFunctor::Parm12 Parm11;
+        typedef typename OriginalFunctor::Parm13 Parm12;
+        typedef typename OriginalFunctor::Parm14 Parm13;
+        typedef typename OriginalFunctor::Parm15 Parm14;
+        typedef EmptyType Parm15;
+
+    public:
+        BinderFirst(const OriginalFunctor& fun, BoundType bound)
+        : f_(fun), b_(bound)
+        {}
+        
+        DEFINE_CLONE_FUNCTORIMPL(BinderFirst)
+        
+        // operator() implementations for up to 15 arguments
+                
+        ResultType operator()()
+        { return f_(b_); }
+
+        ResultType operator()(Parm1 p1)
+        { return f_(b_, p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return f_(b_, p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return f_(b_, p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return f_(b_, p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return f_(b_, p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return f_(b_, p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                p14);
+        }
+        
+    private:
+        OriginalFunctor f_;
+        BoundType b_;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// function template BindFirst
+// Binds the first parameter of a Functor object to a specific value
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class Fctor>
+    typename Private::BinderFirstTraits<Fctor>::BoundFunctorType
+    BindFirst(
+        const Fctor& fun,
+        typename Fctor::Parm1 bound)
+    {
+        typedef typename Private::BinderFirstTraits<Fctor>::BoundFunctorType
+            Outgoing;
+        
+        return Outgoing(std::auto_ptr<typename Outgoing::Impl>(
+            new BinderFirst<Fctor>(fun, bound)));
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Chainer
+// Chains two functor calls one after another
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename Fun1, typename Fun2>
+    class Chainer : public Fun2::Impl
+    {
+        typedef Fun2 Base;
+
+    public:
+        typedef typename Base::ResultType ResultType;
+        typedef typename Base::Parm1 Parm1;
+        typedef typename Base::Parm2 Parm2;
+        typedef typename Base::Parm3 Parm3;
+        typedef typename Base::Parm4 Parm4;
+        typedef typename Base::Parm5 Parm5;
+        typedef typename Base::Parm6 Parm6;
+        typedef typename Base::Parm7 Parm7;
+        typedef typename Base::Parm8 Parm8;
+        typedef typename Base::Parm9 Parm9;
+        typedef typename Base::Parm10 Parm10;
+        typedef typename Base::Parm11 Parm11;
+        typedef typename Base::Parm12 Parm12;
+        typedef typename Base::Parm13 Parm13;
+        typedef typename Base::Parm14 Parm14;
+        typedef typename Base::Parm15 Parm15;
+        
+        Chainer(const Fun1& fun1, const Fun2& fun2) : f1_(fun1), f2_(fun2) {}
+
+        DEFINE_CLONE_FUNCTORIMPL(Chainer)
+
+        // operator() implementations for up to 15 arguments
+
+        ResultType operator()()
+        { return f1_(), f2_(); }
+
+        ResultType operator()(Parm1 p1)
+        { return f1_(p1), f2_(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return f1_(p1, p2), f2_(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return f1_(p1, p2, p3), f2_(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return f1_(p1, p2, p3, p4), f2_(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return f1_(p1, p2, p3, p4, p5), f2_(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return f1_(p1, p2, p3, p4, p5, p6), f2_(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7),
+                f2_(p1, p2, p3, p4, p5, p6, p7);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                    p14),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                   p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                    p14, p15),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                    p14, p15);
+        }
+        
+    private:
+        Fun1 f1_;
+        Fun2 f2_;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// function template Chain
+// Chains two functor calls one after another
+////////////////////////////////////////////////////////////////////////////////
+
+
+    template <class Fun1, class Fun2>
+    Fun2 Chain(
+        const Fun1& fun1,
+        const Fun2& fun2)
+    {
+        return Fun2(std::auto_ptr<typename Fun2::Impl>(
+            new Chainer<Fun1, Fun2>(fun1, fun2)));
+    }
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// July 16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif  // FUNCTOR_INC_
Index: avida/current/source/third-party/Loki/Borland/HierarchyGenerators.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/HierarchyGenerators.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/HierarchyGenerators.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,268 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef HIERARCHYGENERATORS_INC_
+#define HIERARCHYGENERATORS_INC_
+
+#include "Typelist.h"
+#include "TypeTraits.h"
+#include "EmptyType.h"
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template GenScatterHierarchy
+// Generates a scattered hierarchy starting from a typelist and a template
+// Invocation (TList is a typelist, Model is a template of one arg):
+// GenScatterHierarchy<TList, Model>
+// The generated class inherits all classes generated by instantiating the 
+// template 'Model' with the types contained in TList 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class TList, template <class> class Unit>
+    class GenScatterHierarchy;
+     
+    template <class T1, class T2, template <class> class Unit>
+    class GenScatterHierarchy<Typelist<T1, T2>, Unit>
+        : public GenScatterHierarchy<T1, Unit>
+        , public GenScatterHierarchy<T2, Unit>
+    {
+    public:
+        typedef Typelist<T1, T2> TList;
+        typedef GenScatterHierarchy<T1, Unit> LeftBase;
+        typedef GenScatterHierarchy<T2, Unit> RightBase;
+        template <typename T> struct Rebind
+        {
+            typedef Unit<T> Result;
+        };
+    };
+     
+    template <class AtomicType, template <class> class Unit>
+    class GenScatterHierarchy : public Unit<AtomicType>
+    {
+        typedef Unit<AtomicType> LeftBase;
+        template <typename T> struct Rebind
+        {
+            typedef Unit<T> Result;
+        };
+    };
+    
+    template <template <class> class Unit>
+    class GenScatterHierarchy<NullType, Unit>
+    {
+        template <typename T> struct Rebind
+        {
+            typedef Unit<T> Result;
+        };
+    };
+     
+////////////////////////////////////////////////////////////////////////////////
+// function template Field
+// Accesses a field in an object of a type generated with GenScatterHierarchy
+// Invocation (obj is an object of a type H generated with GenScatterHierarchy,
+//     T is a type in the typelist used to generate H):
+// Field<T>(obj)
+// returns a reference to Unit<T>, where Unit is the template used to generate H 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, class H>
+    typename H::template Rebind<T>::Result& Field(H& obj)
+    {
+        return obj;
+    }
+     
+    template <class T, class H>
+    const typename H::template Rebind<T>::Result& Field(const H& obj)
+    {
+        return obj;
+    }
+     
+////////////////////////////////////////////////////////////////////////////////
+// function template TupleUnit
+// The building block of tuples 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    struct TupleUnit
+    {
+        T value_;
+        operator T&() { return value_; }
+        operator const T&() const { return value_; }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Tuple
+// Implements a tuple class that holds a number of values and provides field 
+//     access to them via the Field function (below) 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class TList>
+    struct Tuple : public GenScatterHierarchy<TList, TupleUnit>
+    {
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// helper class template FieldHelper
+// See Field below
+////////////////////////////////////////////////////////////////////////////////
+    //### BCB: the problem of not treating enum as bool value, like in MultiMethods
+    template <int flag, typename T, typename U>
+    struct IntSelect
+    {
+        typedef T Result;
+    };
+    template <typename T, typename U>
+    struct IntSelect<0, T, U>
+    {
+        typedef U Result;
+    };
+
+
+
+    template <class H, unsigned int i> struct FieldHelper;
+    
+    template <class H>
+    struct FieldHelper<H, 0>
+    {
+        typedef typename H::TList::Head ElementType;
+        typedef typename H::template Rebind<ElementType>::Result UnitType;
+        
+        enum
+        {
+            isTuple = Conversion<UnitType, TupleUnit<ElementType> >::sameType,
+            isConst = TypeTraits<H>::isConst
+        };
+
+        typedef const typename H::LeftBase ConstLeftBase;
+        
+        typedef typename IntSelect<isConst, ConstLeftBase, 
+            typename H::LeftBase>::Result LeftBase;
+            
+        typedef typename IntSelect<isTuple, ElementType, 
+            UnitType>::Result UnqualifiedResultType;
+
+        typedef typename IntSelect<isConst, const UnqualifiedResultType,
+                		UnqualifiedResultType>::Result ResultType;
+            
+        static ResultType& Do(H& obj)
+        {
+            LeftBase& leftBase = obj;
+            return leftBase;
+        }
+    };
+
+    template <class H, unsigned int i>
+    struct FieldHelper
+    {
+        typedef typename TL::TypeAt<typename H::TList, i>::Result ElementType;
+        typedef typename H::template Rebind<ElementType>::Result UnitType;
+
+        enum
+        {
+            isTuple = Conversion<UnitType, TupleUnit<ElementType> >::sameType,
+            isConst = TypeTraits<H>::isConst
+        };
+
+        typedef const typename H::RightBase ConstRightBase;
+
+        typedef typename IntSelect<isConst, ConstRightBase,
+            typename H::RightBase>::Result RightBase;
+
+        typedef typename IntSelect<isTuple, ElementType,
+            UnitType>::Result UnqualifiedResultType;
+
+        typedef typename IntSelect<isConst, const UnqualifiedResultType,
+                		UnqualifiedResultType>::Result ResultType;
+            
+        static ResultType& Do(H& obj)
+        {
+            RightBase& rightBase = obj;
+            return FieldHelper<RightBase, i - 1>::Do(rightBase);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// function template Field
+// Accesses a field in an object of a type generated with GenScatterHierarchy
+// Invocation (obj is an object of a type H generated with GenScatterHierarchy,
+//     i is the index of a type in the typelist used to generate H):
+// Field<i>(obj)
+// returns a reference to Unit<T>, where Unit is the template used to generate H
+//     and T is the i-th type in the typelist 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <int i, class H>
+    typename FieldHelper<H, i>::ResultType&
+    Field(H& obj)
+    {
+        return FieldHelper<H, i>::Do(obj);
+    }
+        
+//    template <int i, class H>
+//    const typename FieldHelper<H, i>::ResultType&
+//    Field(const H& obj)
+//    {
+//        return FieldHelper<H, i>::Do(obj);
+//    }
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template GenLinearHierarchy
+// Generates a linear hierarchy starting from a typelist and a template
+// Invocation (TList is a typelist, Model is a template of two args):
+// GenScatterHierarchy<TList, Model>
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class TList,
+        template <class AtomicType, class Base> class Unit,
+        class Root = EmptyType
+    >
+    class GenLinearHierarchy;
+    
+    template
+    <
+        class T1,
+        class T2,
+        template <class, class> class Unit,
+        class Root
+    >
+    class GenLinearHierarchy<Typelist<T1, T2>, Unit, Root>
+        : public Unit< T1, GenLinearHierarchy<T2, Unit, Root> >
+    {
+    };
+
+    template
+    <
+        class T,
+        template <class, class> class Unit,
+        class Root
+    >
+    class GenLinearHierarchy<Typelist<T, NullType>, Unit, Root>
+        : public Unit<T, Root>
+    {
+    };
+
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// July 16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // HIERARCHYGENERATORS_INC_
Index: avida/current/source/third-party/Loki/Borland/MultiMethods.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/MultiMethods.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/MultiMethods.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,461 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+//     purpose is hereby granted without fee, provided that the above copyright
+//     notice appear in all copies and that both that copyright notice and this
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the
+//     suitability of this software for any purpose. It is provided "as is"
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef MULTIMETHODS_INC_
+#define MULTIMETHODS_INC_
+
+#include "Typelist.h"
+#include "Loki_TypeInfo.h" //### BCB
+#include "Functor.h"
+#include "AssocVector.h"
+#include <iostream> // ***
+
+////////////////////////////////////////////////////////////////////////////////
+// IMPORTANT NOTE:
+// The double dispatchers implemented below differ from the excerpts shown in
+// the book - they are simpler while respecting the same interface.
+////////////////////////////////////////////////////////////////////////////////
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template InvocationTraits (helper)
+// Helps implementing optional symmetry
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+/* ### BCB checks existence Fire(rhs, lhs) even when this function is not 
+needed, fails to compile
+        template <class SomeLhs, class SomeRhs,
+			class Executor, typename ResultType>
+        struct InvocationTraits
+        {
+            static ResultType
+	    DoDispatch(SomeLhs& lhs, SomeRhs& rhs,
+			Executor& exec, Int2Type<false>)
+            {
+                return exec.Fire(lhs, rhs);
+            }
+            static ResultType
+	    DoDispatch(SomeLhs& lhs, SomeRhs& rhs,
+			Executor& exec, Int2Type<true>)
+            {
+                return exec.Fire(rhs, lhs);
+            }
+        };
+*/
+        template <class SomeLhs, class SomeRhs, class Executor, typename
+ResultType>
+        struct NormalInvocation
+        {
+            static ResultType DoDispatch(SomeLhs& lhs, SomeRhs& rhs, 
+Executor& exec)
+            {
+                return exec.Fire(lhs, rhs);
+            }
+        };
+
+        template <class SomeLhs, class SomeRhs, class Executor, typename 
+ResultType>
+        struct SwappedInvocation
+        {
+            static ResultType DoDispatch(SomeLhs& lhs, SomeRhs& rhs, 
+Executor& exec)
+            {
+                return exec.Fire(rhs, lhs);
+            }
+        };
+    }
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template StaticDispatcher
+// Implements an automatic static double dispatcher based on two typelists
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class Executor,
+        class BaseLhs,
+        class TypesLhs,
+        bool symmetric = true,
+        class BaseRhs = BaseLhs,
+        class TypesRhs = TypesLhs,
+        typename ResultType = void
+    >
+    class StaticDispatcher
+    {
+        template <class SomeLhs>
+        static ResultType DispatchRhs(SomeLhs& lhs, BaseRhs& rhs,
+            Executor exec, NullType)
+        { return exec.OnError(lhs, rhs); }
+
+        template <class TList, class SomeLhs>
+        static ResultType DispatchRhs(SomeLhs& lhs, BaseRhs& rhs,
+            Executor exec, TList)
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+
+            if (Head* p2 = dynamic_cast<Head*>(&rhs))
+            {
+                //### BCB - original statement was too complex for this compiler
+                enum { val1 = int(TL::IndexOf<TypesRhs, Head>::value) };
+                enum { val2 = int(TL::IndexOf<TypesLhs, SomeLhs>::value) };
+                enum { val3 = symmetric && (val1 < val2) };
+                // BCB doesn't properly converts enum to bool
+                enum { val4 = val3 != 0 };
+                const bool val5 = (val4 == 0) ? false : true; // it must be so clumsy
+
+                typedef Private::NormalInvocation<SomeLhs, Head, Executor, ResultType> t1;
+                typedef Private::SwappedInvocation<SomeLhs, Head, Executor, ResultType> t2;
+                typedef Select<val4, t1, t2>::Result invocation_t;
+                return invocation_t::DoDispatch(lhs, *p2, exec);
+            }
+            return DispatchRhs(lhs, rhs, exec, Tail());
+        }
+
+        static ResultType DispatchLhs(BaseLhs& lhs, BaseRhs& rhs,
+            Executor exec, NullType)
+        { return exec.OnError(lhs, rhs); }
+
+        template <class TList>
+        static ResultType DispatchLhs(BaseLhs& lhs, BaseRhs& rhs,
+            Executor exec, TList)
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+
+            if (Head* p1 = dynamic_cast<Head*>(&lhs))
+            {
+                return DispatchRhs(*p1, rhs, exec, TypesRhs());
+            }
+            return DispatchLhs(lhs, rhs, exec, Tail());
+        }
+
+    public:
+        static ResultType Go(BaseLhs& lhs, BaseRhs& rhs,
+            Executor exec)
+        { return DispatchLhs(lhs, rhs, exec, TypesLhs()); }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BasicDispatcher
+// Implements a logarithmic double dispatcher for functors (or functions)
+// Doesn't offer automated casts or symmetry
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class BaseLhs,
+        class BaseRhs = BaseLhs,
+        typename ResultType = void,
+        typename CallbackType = ResultType (*)(BaseLhs&, BaseRhs&)
+    >
+    class BasicDispatcher
+    {
+        typedef std::pair<TypeInfo,TypeInfo> KeyType;
+        typedef CallbackType MappedType;
+        typedef AssocVector<KeyType, MappedType> MapType;
+        MapType callbackMap_;
+
+        void DoAdd(TypeInfo lhs, TypeInfo rhs, CallbackType fun);
+        bool DoRemove(TypeInfo lhs, TypeInfo rhs);
+
+    public:
+        template <class SomeLhs, class SomeRhs>
+        void Add(CallbackType fun)
+        {
+            DoAdd(typeid(SomeLhs), typeid(SomeRhs), fun);
+        }
+
+        template <class SomeLhs, class SomeRhs>
+        bool Remove()
+        {
+            return DoRemove(typeid(SomeLhs), typeid(SomeRhs));
+        }
+
+        ResultType Go(BaseLhs& lhs, BaseRhs& rhs);
+    };
+
+    // Non-inline to reduce compile time overhead...
+    template <class BaseLhs, class BaseRhs,
+		typename ResultType, typename CallbackType>
+    void BasicDispatcher<BaseLhs,BaseRhs,ResultType,CallbackType>
+    	 ::DoAdd(TypeInfo lhs, TypeInfo rhs, CallbackType fun)
+    {
+        callbackMap_[KeyType(lhs, rhs)] = fun;
+    }
+
+    template <class BaseLhs, class BaseRhs,
+		typename ResultType, typename CallbackType>
+    bool BasicDispatcher<BaseLhs,BaseRhs,ResultType,CallbackType>
+         ::DoRemove(TypeInfo lhs, TypeInfo rhs)
+    {
+        return callbackMap_.erase(KeyType(lhs, rhs)) == 1;
+    }
+
+    template <class BaseLhs, class BaseRhs,
+		typename ResultType, typename CallbackType>
+    ResultType BasicDispatcher<BaseLhs,BaseRhs,ResultType,CallbackType>
+               ::Go(BaseLhs& lhs, BaseRhs& rhs)
+    {
+    	typename MapType::key_type k(typeid(lhs),typeid(rhs));
+        typename MapType::iterator i = callbackMap_.find(k);
+        if (i == callbackMap_.end())
+        {
+            std::cout << "Function not found\n";
+
+//                throw std::runtime_error("Function not found");
+        }
+        return (i->second)(lhs, rhs);
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template StaticCaster
+// Implementation of the CastingPolicy used by FunctorDispatcher
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class To, class From>
+    struct StaticCaster
+    {
+        static To& Cast(From& obj)
+        {
+            return static_cast<To&>(obj);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DynamicCaster
+// Implementation of the CastingPolicy used by FunctorDispatcher
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class To, class From>
+    struct DynamicCaster
+    {
+        static To& Cast(From& obj)
+        {
+            return dynamic_cast<To&>(obj);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Private::FnDispatcherHelper
+// Implements trampolines and argument swapping used by FnDispatcher
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class BaseLhs, class BaseRhs,
+	    class SomeLhs, class SomeRhs,
+            typename ResultType,
+            class CastLhs, class CastRhs,
+            ResultType (*Callback)(SomeLhs&, SomeRhs&)>
+        struct FnDispatcherHelper
+        {
+            static ResultType Trampoline(BaseLhs& lhs, BaseRhs& rhs)
+            {
+                return Callback(CastLhs::Cast(lhs), CastRhs::Cast(rhs));
+            }
+            static ResultType TrampolineR(BaseRhs& rhs, BaseLhs& lhs)
+            {
+                return Trampoline(lhs, rhs);
+            }
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FnDispatcher
+// Implements an automatic logarithmic double dispatcher for functions
+// Features automated conversions
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class BaseLhs, class BaseRhs = BaseLhs,
+              typename ResultType = void,
+              template <class, class> class CastingPolicy = DynamicCaster,
+              template <class, class, class, class>
+              class DispatcherBackend = BasicDispatcher>
+    class FnDispatcher
+    {
+        DispatcherBackend<BaseLhs, BaseRhs, ResultType,
+            ResultType (*)(BaseLhs&, BaseRhs&)> backEnd_;
+
+    public:
+        template <class SomeLhs, class SomeRhs>
+        //### BCB - here it was probably buggy
+        void Add(ResultType (*pFun)(SomeLhs&, SomeRhs&))
+        {
+            return backEnd_.Add<SomeLhs, SomeRhs>((ResultType (*)(BaseLhs&, 
+BaseRhs&))pFun);
+        }
+
+        template <class SomeLhs, class SomeRhs,
+            ResultType (*callback)(SomeLhs&, SomeRhs&)>
+        void Add()
+        {
+	    typedef Private::FnDispatcherHelper<
+					BaseLhs, BaseRhs,
+					SomeLhs, SomeRhs,
+					ResultType,
+					CastingPolicy<SomeLhs,BaseLhs>,
+					CastingPolicy<SomeRhs,BaseRhs>,
+					callback> Local;
+
+            Add<SomeLhs, SomeRhs>(&Local::Trampoline);
+        }
+
+        template <class SomeLhs, class SomeRhs,
+            ResultType (*callback)(SomeLhs&, SomeRhs&),
+            bool symmetric>
+        void Add()
+        {
+	    typedef Private::FnDispatcherHelper<
+					BaseLhs, BaseRhs,
+					SomeLhs, SomeRhs,
+					ResultType,
+					CastingPolicy<SomeLhs,BaseLhs>,
+					CastingPolicy<SomeRhs,BaseRhs>,
+					callback> Local;
+
+            Add<SomeLhs, SomeRhs>(&Local::Trampoline);
+            if (symmetric)
+            {
+                Add<SomeRhs, SomeLhs>(&Local::TrampolineR);
+            }
+        }
+
+        template <class SomeLhs, class SomeRhs>
+        void Remove()
+        {
+            backEnd_.Remove<SomeLhs, SomeRhs>();
+        }
+
+        ResultType Go(BaseLhs& lhs, BaseRhs& rhs)
+        {
+            return backEnd_.Go(lhs, rhs);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorDispatcherAdaptor
+// permits use of FunctorDispatcher under gcc.2.95.2/3
+///////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+	template <class BaseLhs, class BaseRhs,
+		  class SomeLhs, class SomeRhs,
+		  typename ResultType,
+		  class CastLhs, class CastRhs,
+		  class Fun, bool SwapArgs>
+        class FunctorDispatcherHelper
+        {
+            Fun fun_;
+            ResultType Fire(BaseLhs& lhs, BaseRhs& rhs,Int2Type<false>)
+            {
+                return fun_(CastLhs::Cast(lhs), CastRhs::Cast(rhs));
+            }
+            ResultType Fire(BaseLhs& rhs, BaseRhs& lhs,Int2Type<true>)
+            {
+                return fun_(CastLhs::Cast(lhs), CastRhs::Cast(rhs));
+            }
+        public:
+            FunctorDispatcherHelper(const Fun& fun) : fun_(fun) {}
+
+            ResultType operator()(BaseLhs& lhs, BaseRhs& rhs)
+            {
+                return Fire(lhs,rhs,Int2Type<SwapArgs>());
+            }
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorDispatcher
+// Implements a logarithmic double dispatcher for functors
+// Features automated casting
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class BaseLhs, class BaseRhs = BaseLhs,
+              typename ResultType = void,
+              template <class, class> class CastingPolicy = DynamicCaster,
+              template <class, class, class, class>
+              class DispatcherBackend = BasicDispatcher>
+    class FunctorDispatcher
+    {
+        typedef TYPELIST_2(BaseLhs&, BaseRhs&) ArgsList;
+        //### BCB - this causes compiler crash (even when only one parameter is used)
+        typedef Functor<ResultType, ArgsList, DEFAULT_THREADING> 
+FunctorType;
+
+        DispatcherBackend<BaseLhs, BaseRhs, ResultType, FunctorType> 
+backEnd_;
+
+    public:
+        template <class SomeLhs, class SomeRhs, class Fun>
+        void Add(const Fun& fun)
+        {
+            typedef Private::FunctorDispatcherHelper<
+					BaseLhs, BaseRhs,
+					SomeLhs, SomeRhs,
+					ResultType,
+					CastingPolicy<SomeLhs, BaseLhs>,
+					CastingPolicy<SomeRhs, BaseRhs>,
+					Fun, false> Adapter;
+
+            backEnd_.Add<SomeLhs, SomeRhs>(FunctorType(Adapter(fun)));
+	}
+        template <class SomeLhs, class SomeRhs, bool symmetric, class Fun>
+        void Add(const Fun& fun)
+        {
+	    Add<SomeLhs,SomeRhs>(fun);
+
+	    if (symmetric)
+	    {
+		// Note: symmetry only makes sense where BaseLhs==BaseRhs
+            	typedef Private::FunctorDispatcherHelper<
+					BaseLhs, BaseLhs,
+					SomeLhs, SomeRhs,
+					ResultType,
+					CastingPolicy<SomeLhs, BaseLhs>,
+					CastingPolicy<SomeRhs, BaseLhs>,
+					Fun, true> AdapterR;
+
+               	backEnd_.Add<SomeRhs, SomeLhs>(FunctorType(AdapterR(fun)));
+	    }
+        }
+
+        template <class SomeLhs, class SomeRhs>
+        void Remove()
+        {
+            backEnd_.Remove<SomeLhs, SomeRhs>();
+        }
+
+        ResultType Go(BaseLhs& lhs, BaseRhs& rhs)
+        {
+            return backEnd_.Go(lhs, rhs);
+        }
+    };
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif
+
Index: avida/current/source/third-party/Loki/Borland/NullType.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/NullType.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/NullType.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef NULLTYPE_INC_
+#define NULLTYPE_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class NullType
+// Used as a placeholder for "no type here"
+// Useful as an end marker in typelists 
+////////////////////////////////////////////////////////////////////////////////
+
+    class NullType {};
+    
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June     20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// November 22, 2001: minor change to support porting to boost
+// July     16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // NULLTYPE_INC_
Index: avida/current/source/third-party/Loki/Borland/Singleton.cpp
diff -u /dev/null avida/current/source/third-party/Loki/Borland/Singleton.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/Singleton.cpp	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#include "Singleton.h"
+
+using namespace Loki::Private;
+
+Loki::Private::TrackerArray Loki::Private::pTrackerArray = 0;
+unsigned int Loki::Private::elements = 0;
+
+////////////////////////////////////////////////////////////////////////////////
+// function AtExitFn
+// Ensures proper destruction of objects with longevity
+////////////////////////////////////////////////////////////////////////////////
+
+void Loki::Private::AtExitFn()
+{
+    assert(elements > 0 && pTrackerArray != 0);
+    // Pick the element at the top of the stack
+    LifetimeTracker* pTop = pTrackerArray[elements - 1];
+    // Remove that object off the stack
+    // Don't check errors - realloc with less memory 
+    //     can't fail
+    pTrackerArray = static_cast<TrackerArray>(std::realloc(
+        pTrackerArray, sizeof(*pTrackerArray) * --elements));
+    // Destroy the element
+    delete pTop;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June    20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// January 10, 2002: Fixed bug in call to realloc - credit due to Nigel Gent and
+//                   Eike Petersen
+// May     08, 2002: Refixed bug in call to realloc
+// July    16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
Index: avida/current/source/third-party/Loki/Borland/Singleton.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/Singleton.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/Singleton.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,456 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef SINGLETON_INC_
+#define SINGLETON_INC_
+
+#include "Threads.h"
+#include <algorithm>
+#include <stdexcept>
+#include <cassert>
+#include <cstdlib>
+#include <new>
+#include <string>
+
+#ifdef __BORLANDC__
+#  define ATEXIT_FIXED
+#endif
+
+namespace Loki
+{
+    namespace Private
+    {
+////////////////////////////////////////////////////////////////////////////////
+// class LifetimeTracker
+// Helper class for SetLongevity
+////////////////////////////////////////////////////////////////////////////////
+
+        class LifetimeTracker
+        {
+        public:
+            LifetimeTracker(unsigned int x) : longevity_(x) 
+            {}
+            
+            virtual ~LifetimeTracker() = 0;
+            
+            static bool Compare(const LifetimeTracker* lhs,
+                const LifetimeTracker* rhs)
+            {
+                return lhs->longevity_ > rhs->longevity_;
+            }
+            
+        private:
+            unsigned int longevity_;
+        };
+        
+        // Definition required
+        inline LifetimeTracker::~LifetimeTracker() {} 
+        
+        // Helper data
+        typedef LifetimeTracker** TrackerArray;
+        extern TrackerArray pTrackerArray;
+        extern unsigned int elements;
+
+        // Helper destroyer function
+        template <typename T>
+        struct Deleter
+        {
+            static void Delete(T* pObj)
+            { delete pObj; }
+        };
+
+        // Concrete lifetime tracker for objects of type T
+        template <typename T, typename Destroyer>
+        class ConcreteLifetimeTracker : public LifetimeTracker
+        {
+        public:
+            ConcreteLifetimeTracker(T* p,unsigned int longevity, Destroyer d)
+                : LifetimeTracker(longevity)
+                , pTracked_(p)
+                , destroyer_(d)
+            {}
+            
+            ~ConcreteLifetimeTracker()
+            { destroyer_(pTracked_); }
+            
+        private:
+            T* pTracked_;
+            Destroyer destroyer_;
+        };
+
+        void AtExitFn(); // declaration needed below
+    
+    } // namespace Private
+
+////////////////////////////////////////////////////////////////////////////////
+// function template SetLongevity
+// Assigns an object a longevity; ensures ordered destructions of objects 
+//     registered thusly during the exit sequence of the application
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T, typename Destroyer>
+    void SetLongevity(T* pDynObject, unsigned int longevity,
+        Destroyer d = Private::Deleter<T>::Delete)
+    {
+        using namespace Private;
+        
+        TrackerArray pNewArray = static_cast<TrackerArray>(
+                std::realloc(pTrackerArray, 
+                    sizeof(*pTrackerArray) * (elements + 1)));
+        if (!pNewArray) throw std::bad_alloc();
+        
+        // Delayed assignment for exception safety
+        pTrackerArray = pNewArray;
+        
+        LifetimeTracker* p = new ConcreteLifetimeTracker<T, Destroyer>(
+            pDynObject, longevity, d);
+        
+        // Insert a pointer to the object into the queue
+        TrackerArray pos = std::upper_bound(
+            pTrackerArray, 
+            pTrackerArray + elements, 
+            p, 
+            LifetimeTracker::Compare);
+        std::copy_backward(
+            pos, 
+            pTrackerArray + elements,
+            pTrackerArray + elements + 1);
+        *pos = p;
+        ++elements;
+        
+        // Register a call to AtExitFn
+        std::atexit(Private::AtExitFn);
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template CreateUsingNew
+// Implementation of the CreationPolicy used by SingletonHolder
+// Creates objects using a straight call to the new operator 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T> struct CreateUsingNew
+    {
+        static T* Create()
+        { return new T; }
+        
+        static void Destroy(T* p)
+        { delete p; }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template CreateUsingNew
+// Implementation of the CreationPolicy used by SingletonHolder
+// Creates objects using a call to std::malloc, followed by a call to the 
+//     placement new operator
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T> struct CreateUsingMalloc
+    {
+        static T* Create()
+        {
+            void* p = std::malloc(sizeof(T));
+            if (!p) return 0;
+            return new(p) T;
+        }
+        
+        static void Destroy(T* p)
+        {
+            p->~T();
+            std::free(p);
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template CreateStatic
+// Implementation of the CreationPolicy used by SingletonHolder
+// Creates an object in static memory
+// Implementation is slightly nonportable because it uses the MaxAlign trick 
+//     (an union of all types to ensure proper memory alignment). This trick is 
+//     nonportable in theory but highly portable in practice.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T> struct CreateStatic
+    {
+        union MaxAlign
+        {
+            char t_[sizeof(T)];
+            short int shortInt_;
+            int int_;
+            long int longInt_;
+            float float_;
+            double double_;
+            long double longDouble_;
+            struct Test;
+            int Test::* pMember_;
+            int (Test::*pMemberFn_)(int);
+        };
+        
+        static T* Create()
+        {
+            static MaxAlign staticMemory_;
+            return new(&staticMemory_) T;
+        }
+        
+        static void Destroy(T* p)
+        {
+            p->~T();
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template DefaultLifetime
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Schedules an object's destruction as per C++ rules
+// Forwards to std::atexit
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    struct DefaultLifetime
+    {
+        static void ScheduleDestruction(T*, void (*pFun)())
+        { std::atexit(pFun); }
+        
+        static void OnDeadReference()
+        { throw std::logic_error(std::string("Dead Reference Detected")); }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template PhoenixSingleton
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Schedules an object's destruction as per C++ rules, and it allows object 
+//    recreation by not throwing an exception from OnDeadReference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class PhoenixSingleton
+    {
+    public:
+        static void ScheduleDestruction(T*, void (*pFun)())
+        {
+#ifndef ATEXIT_FIXED
+            if (!destroyedOnce_)
+#endif
+                std::atexit(pFun);
+        }
+        
+        static void OnDeadReference()
+        {
+#ifndef ATEXIT_FIXED
+            destroyedOnce_ = true;
+#endif
+        }
+        
+    private:
+#ifndef ATEXIT_FIXED
+        static bool destroyedOnce_;
+#endif
+    };
+    
+#ifndef ATEXIT_FIXED
+    template <class T> bool PhoenixSingleton<T>::destroyedOnce_ = false;
+#endif
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template Adapter
+// Helper for SingletonWithLongevity below
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class T>
+        struct Adapter
+        {
+            void operator()(T*) { return pFun_(); }
+            void (*pFun_)();
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SingletonWithLongevity
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Schedules an object's destruction in order of their longevities
+// Assumes a visible function GetLongevity(T*) that returns the longevity of the
+//     object
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class SingletonWithLongevity
+    {
+    public:
+        static void ScheduleDestruction(T* pObj, void (*pFun)())
+        {
+            Private::Adapter<T> adapter = { pFun };
+            SetLongevity(pObj, GetLongevity(pObj), adapter);
+        }
+        
+        static void OnDeadReference()
+        { throw std::logic_error(std::string("Dead Reference Detected")); }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template NoDestroy
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Never destroys the object
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    struct NoDestroy
+    {
+        static void ScheduleDestruction(T*, void (*)())
+        {}
+        
+        static void OnDeadReference()
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SingletonHolder
+// Provides Singleton amenities for a type T
+// To protect that type from spurious instantiations, you have to protect it
+//     yourself.
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class CreationPolicy = CreateUsingNew,
+        template <class> class LifetimePolicy = DefaultLifetime,
+        template <class> class ThreadingModel = SingleThreaded
+    >
+    class SingletonHolder
+    {
+    public:
+        static T& Instance();
+        
+    private:
+        // Helpers
+        static void MakeInstance();
+        static void DestroySingleton();
+        
+        // Protection
+        SingletonHolder();
+        
+        // Data
+        typedef typename ThreadingModel<T*>::VolatileType PtrInstanceType;
+        static PtrInstanceType pInstance_;
+        static bool destroyed_;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// SingletonHolder's data
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class T,
+        template <class> class C,
+        template <class> class L,
+        template <class> class M
+    >
+    typename SingletonHolder<T, C, L, M>::PtrInstanceType
+        SingletonHolder<T, C, L, M>::pInstance_;
+
+    template
+    <
+        class T,
+        template <class> class C,
+        template <class> class L,
+        template <class> class M
+    >
+    bool SingletonHolder<T, C, L, M>::destroyed_;
+
+////////////////////////////////////////////////////////////////////////////////
+// SingletonHolder::Instance
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class T,
+        template <class> class CreationPolicy,
+        template <class> class LifetimePolicy,
+        template <class> class ThreadingModel
+    >
+    inline T& SingletonHolder<T, CreationPolicy, 
+        LifetimePolicy, ThreadingModel>::Instance()
+    {
+        if (!pInstance_)
+        {
+            MakeInstance();
+        }
+        return *pInstance_;
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// SingletonHolder::MakeInstance (helper for Instance)
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class T,
+        template <class> class CreationPolicy,
+        template <class> class LifetimePolicy,
+        template <class> class ThreadingModel
+    >
+    void SingletonHolder<T, CreationPolicy, 
+        LifetimePolicy, ThreadingModel>::MakeInstance()
+    {
+        typename ThreadingModel<T>::Lock guard;
+        (void)guard;
+        
+        if (!pInstance_)
+        {
+            if (destroyed_)
+            {
+                LifetimePolicy<T>::OnDeadReference();
+                destroyed_ = false;
+            }
+            pInstance_ = CreationPolicy<T>::Create();
+            LifetimePolicy<T>::ScheduleDestruction(pInstance_, 
+                &DestroySingleton);
+        }
+    }
+
+    template
+    <
+        class T,
+        template <class> class CreationPolicy,
+        template <class> class L,
+        template <class> class M
+    >
+    void SingletonHolder<T, CreationPolicy, L, M>::DestroySingleton()
+    {
+        assert(!destroyed_);
+        CreationPolicy<T>::Destroy(pInstance_);
+        pInstance_ = 0;
+        destroyed_ = true;
+    }
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// May     21, 2001: Correct the volatile qualifier - credit due to Darin Adler
+// June    20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// January 08, 2002: Fixed bug in call to realloc - credit due to Nigel Gent and
+//                   Eike Petersen
+// March   08, 2002: moved the assignment to pTrackerArray in SetLongevity to fix
+//                   exception safety issue. Credit due to Kari Hoijarvi
+// May     09, 2002: Fixed bug in Compare that caused longevities to act backwards.
+//                   Credit due to Scott McDonald.
+// July    16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // SINGLETON_INC_
Index: avida/current/source/third-party/Loki/Borland/SmallObj.cpp
diff -u /dev/null avida/current/source/third-party/Loki/Borland/SmallObj.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/SmallObj.cpp	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,428 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+//     purpose is hereby granted without fee, provided that the above copyright
+//     notice appear in all copies and that both that copyright notice and this
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the
+//     suitability of this software for any purpose. It is provided "as is"
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#include "SmallObj.h"
+#include <cassert>
+#include <algorithm>
+
+using namespace Loki;
+
+// Used by std::lower_bound in SmallObjAllocator
+static bool operator <(const FixedAllocator& lhs, const FixedAllocator& rhs)
+{
+    return lhs.BlockSize() < rhs.BlockSize();
+}
+////////////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Init
+// Initializes a chunk object
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Init(std::size_t blockSize, unsigned char blocks)
+{
+    assert(blockSize > 0);
+    assert(blocks > 0);
+    // Overflow check
+    assert((blockSize * blocks) / blockSize == (unsigned)blocks);
+
+    pData_ = new unsigned char[blockSize * blocks];
+    Reset(blockSize, blocks);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Reset
+// Clears an already allocated chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Reset(std::size_t blockSize, unsigned char blocks)
+{
+    assert(blockSize > 0);
+    assert(blocks > 0);
+    // Overflow check
+    assert((blockSize * blocks) / blockSize == (unsigned)blocks);
+
+    firstAvailableBlock_ = 0;
+    blocksAvailable_ = blocks;
+
+    unsigned char i = 0;
+    unsigned char* p = pData_;
+    for (; i != blocks; p += blockSize)
+    {
+        *p = ++i;
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Release
+// Releases the data managed by a chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Release()
+{
+    delete[] pData_;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Allocate
+// Allocates a block from a chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void* FixedAllocator::Chunk::Allocate(std::size_t blockSize)
+{
+    if (!blocksAvailable_) return 0;
+
+    assert((firstAvailableBlock_ * blockSize) / blockSize ==
+        (unsigned)firstAvailableBlock_);
+
+    unsigned char* pResult =
+        pData_ + (firstAvailableBlock_ * blockSize);
+    firstAvailableBlock_ = *pResult;
+    --blocksAvailable_;
+
+    return pResult;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Deallocate
+// Dellocates a block from a chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Deallocate(void* p, std::size_t blockSize)
+{
+    assert(p >= pData_);
+
+    unsigned char* toRelease = static_cast<unsigned char*>(p);
+    // Alignment check
+    assert((toRelease - pData_) % blockSize == 0);
+
+    *toRelease = firstAvailableBlock_;
+    firstAvailableBlock_ = static_cast<unsigned char>(
+        (toRelease - pData_) / blockSize);
+    // Truncation check
+    assert((unsigned)firstAvailableBlock_ == (toRelease - pData_) / blockSize);
+
+    ++blocksAvailable_;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::FixedAllocator
+// Creates a FixedAllocator object of a fixed block size
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::FixedAllocator(std::size_t blockSize)
+    : blockSize_(blockSize)
+    , allocChunk_(0)
+    , deallocChunk_(0)
+{
+    assert(blockSize_ > 0);
+
+    prev_ = next_ = this;
+
+    std::size_t numBlocks = DEFAULT_CHUNK_SIZE / blockSize;
+    if (numBlocks > UCHAR_MAX) numBlocks = UCHAR_MAX;
+    else if (numBlocks == 0) numBlocks = 8 * blockSize;
+
+    numBlocks_ = static_cast<unsigned char>(numBlocks);
+    assert((unsigned)numBlocks_ == numBlocks);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::FixedAllocator(const FixedAllocator&)
+// Creates a FixedAllocator object of a fixed block size
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::FixedAllocator(const FixedAllocator& rhs)
+    : blockSize_(rhs.blockSize_)
+    , numBlocks_(rhs.numBlocks_)
+    , chunks_(rhs.chunks_)
+{
+    prev_ = &rhs;
+    next_ = rhs.next_;
+    rhs.next_->prev_ = this;
+    rhs.next_ = this;
+
+    allocChunk_ = rhs.allocChunk_
+        ? &chunks_.front() + (rhs.allocChunk_ - &rhs.chunks_.front())
+        : 0;
+
+    deallocChunk_ = rhs.deallocChunk_
+        ? &chunks_.front() + (rhs.deallocChunk_ - &rhs.chunks_.front())
+        : 0;
+}
+
+FixedAllocator& FixedAllocator::operator=(const FixedAllocator& rhs)
+{
+    FixedAllocator copy(rhs);
+    copy.Swap(*this);
+    return *this;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::~FixedAllocator
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::~FixedAllocator()
+{
+    if (prev_ != this)
+    {
+        prev_->next_ = next_;
+        next_->prev_ = prev_;
+        return;
+    }
+
+    assert(prev_ == next_);
+    Chunks::iterator i = chunks_.begin();
+    for (; i != chunks_.end(); ++i)
+    {
+       assert(i->blocksAvailable_ == numBlocks_);
+       i->Release();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Swap
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Swap(FixedAllocator& rhs)
+{
+    using namespace std;
+
+    swap(blockSize_, rhs.blockSize_);
+    swap(numBlocks_, rhs.numBlocks_);
+    chunks_.swap(rhs.chunks_);
+    swap(allocChunk_, rhs.allocChunk_);
+    swap(deallocChunk_, rhs.deallocChunk_);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Allocate
+// Allocates a block of fixed size
+////////////////////////////////////////////////////////////////////////////////
+
+void* FixedAllocator::Allocate()
+{
+    if (allocChunk_ == 0 || allocChunk_->blocksAvailable_ == 0)
+    {
+        Chunks::iterator i = chunks_.begin();
+        for (;; ++i)
+        {
+            if (i == chunks_.end())
+            {
+                // Initialize
+                chunks_.reserve(chunks_.size() + 1);
+                Chunk newChunk;
+                newChunk.Init(blockSize_, numBlocks_);
+                chunks_.push_back(newChunk);
+                allocChunk_ = &chunks_.back();
+                deallocChunk_ = &chunks_.front();
+                break;
+            }
+            if (i->blocksAvailable_ > 0)
+            {
+                allocChunk_ = &*i;
+                break;
+            }
+        }
+    }
+    assert(allocChunk_ != 0);
+    assert(allocChunk_->blocksAvailable_ > 0);
+    
+    return allocChunk_->Allocate(blockSize_);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Deallocate
+// Deallocates a block previously allocated with Allocate
+// (undefined behavior if called with the wrong pointer)
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Deallocate(void* p)
+{
+    assert(!chunks_.empty());
+    assert(&chunks_.front() <= deallocChunk_);
+    assert(&chunks_.back() >= deallocChunk_);
+
+    deallocChunk_  = VicinityFind(p);
+    assert(deallocChunk_);
+
+    DoDeallocate(p);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::VicinityFind (internal)
+// Finds the chunk corresponding to a pointer, using an efficient search
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::Chunk* FixedAllocator::VicinityFind(void* p)
+{
+    assert(!chunks_.empty());
+    assert(deallocChunk_);
+
+    const std::size_t chunkLength = numBlocks_ * blockSize_;
+
+    Chunk* lo = deallocChunk_;
+    Chunk* hi = deallocChunk_ + 1;
+    Chunk* loBound = &chunks_.front();
+    Chunk* hiBound = &chunks_.back() + 1;
+
+    for (;;)
+    {
+        if (lo)
+        {
+            if (p >= lo->pData_ && p < lo->pData_ + chunkLength)
+            {
+                return lo;
+            }
+            if (lo == loBound) lo = 0;
+            else --lo;
+        }
+
+        if (hi)
+        {
+            if (p >= hi->pData_ && p < hi->pData_ + chunkLength)
+            {
+                return hi;
+            }
+            if (++hi == hiBound) hi = 0;
+        }
+    }
+//#pragma warn -8066
+    assert(false);
+    return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::DoDeallocate (internal)
+// Performs deallocation. Assumes deallocChunk_ points to the correct chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::DoDeallocate(void* p)
+{
+    assert(deallocChunk_->pData_ <= p);
+    assert(deallocChunk_->pData_ + numBlocks_ * blockSize_ > p);
+
+    // call into the chunk, will adjust the inner list but won't release memory
+    deallocChunk_->Deallocate(p, blockSize_);
+
+    if (deallocChunk_->blocksAvailable_ == numBlocks_)
+    {
+        // deallocChunk_ is completely free, should we release it?
+
+        Chunk& lastChunk = chunks_.back();
+
+        if (&lastChunk == deallocChunk_)
+        {
+            // check if we have two last chunks empty
+            
+            if (chunks_.size() > 1 && 
+                deallocChunk_[-1].blocksAvailable_ == numBlocks_)
+            {
+                // Two free chunks, discard the last one
+                lastChunk.Release();
+                chunks_.pop_back();
+                allocChunk_ = deallocChunk_ = &chunks_.front();
+            }
+            return;
+        }
+        
+        if (lastChunk.blocksAvailable_ == numBlocks_)
+        {
+            // Two free blocks, discard one
+            lastChunk.Release();
+            chunks_.pop_back();
+            allocChunk_ = deallocChunk_;
+        }
+        else
+        {
+            // move the empty chunk to the end
+            std::swap(*deallocChunk_, lastChunk);
+            allocChunk_ = &chunks_.back();
+        }
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// SmallObjAllocator::SmallObjAllocator
+// Creates an allocator for small objects given chunk size and maximum 'small'
+//     object size
+////////////////////////////////////////////////////////////////////////////////
+
+SmallObjAllocator::SmallObjAllocator(
+        std::size_t chunkSize,
+        std::size_t maxObjectSize)
+    : pLastAlloc_(0), pLastDealloc_(0)
+    , chunkSize_(chunkSize), maxObjectSize_(maxObjectSize)
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// SmallObjAllocator::Allocate
+// Allocates 'numBytes' memory
+// Uses an internal pool of FixedAllocator objects for small objects
+////////////////////////////////////////////////////////////////////////////////
+
+void* SmallObjAllocator::Allocate(std::size_t numBytes)
+{
+    if (numBytes > maxObjectSize_) return operator new(numBytes);
+
+    if (pLastAlloc_ && pLastAlloc_->BlockSize() == numBytes)
+    {
+        return pLastAlloc_->Allocate();
+    }
+
+    FixedAllocator aux(numBytes);
+    Pool::iterator i = std::lower_bound(pool_.begin(), pool_.end(), aux);
+    if (i == pool_.end() || i->BlockSize() != numBytes)
+    {
+        i = pool_.insert(i, FixedAllocator(numBytes));
+        pLastDealloc_ = &*pool_.begin();
+    }
+    pLastAlloc_ = &*i;
+    return pLastAlloc_->Allocate();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// SmallObjAllocator::Deallocate
+// Deallocates memory previously allocated with Allocate
+// (undefined behavior if you pass any other pointer)
+////////////////////////////////////////////////////////////////////////////////
+
+void SmallObjAllocator::Deallocate(void* p, std::size_t numBytes)
+{
+    if (numBytes > maxObjectSize_) return operator delete(p);
+
+    if (pLastDealloc_ && pLastDealloc_->BlockSize() == numBytes)
+    {
+        pLastDealloc_->Deallocate(p);
+        return;
+    }
+    FixedAllocator aux(numBytes);
+    Pool::iterator i = std::lower_bound(pool_.begin(), pool_.end(), aux);
+    assert(i != pool_.end());
+    assert(i->BlockSize() == numBytes);
+    pLastDealloc_ = &*i;
+    pLastDealloc_->Deallocate(p);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// March 20:      fix exception safety issue in FixedAllocator::Allocate
+//     (thanks to Chris Udazvinis for pointing that out)
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// July 16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
Index: avida/current/source/third-party/Loki/Borland/SmallObj.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/SmallObj.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/SmallObj.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,187 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef SMALLOBJ_INC_
+#define SMALLOBJ_INC_
+
+#include "Threads.h"
+#include "Singleton.h"
+#include <cstddef>
+#include <vector>
+
+#pragma warning(disable: 111 444 981)
+
+#ifndef DEFAULT_CHUNK_SIZE
+#define DEFAULT_CHUNK_SIZE 4096
+#endif
+
+#ifndef MAX_SMALL_OBJECT_SIZE
+#define MAX_SMALL_OBJECT_SIZE 64
+#endif
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class FixedAllocator
+// Offers services for allocating fixed-sized objects
+////////////////////////////////////////////////////////////////////////////////
+
+    class FixedAllocator
+    {
+    private:
+        struct Chunk
+        {
+            void Init(std::size_t blockSize, unsigned char blocks);
+            void* Allocate(std::size_t blockSize);
+            void Deallocate(void* p, std::size_t blockSize);
+            void Reset(std::size_t blockSize, unsigned char blocks);
+            void Release();
+            unsigned char* pData_;
+            unsigned char
+                firstAvailableBlock_,
+                blocksAvailable_;
+        };
+        
+        // Internal functions        
+        void DoDeallocate(void* p);
+        Chunk* VicinityFind(void* p);
+        
+        // Data 
+        std::size_t blockSize_;
+        unsigned char numBlocks_;
+        typedef std::vector<Chunk> Chunks;
+        Chunks chunks_;
+        Chunk* allocChunk_;
+        Chunk* deallocChunk_;
+        // For ensuring proper copy semantics
+        mutable const FixedAllocator* prev_;
+        mutable const FixedAllocator* next_;
+        
+    public:
+        // Create a FixedAllocator able to manage blocks of 'blockSize' size
+        explicit FixedAllocator(std::size_t blockSize = 0);
+        FixedAllocator(const FixedAllocator&);
+        FixedAllocator& operator=(const FixedAllocator&);
+        ~FixedAllocator();
+        
+        void Swap(FixedAllocator& rhs);
+        
+        // Allocate a memory block
+        void* Allocate();
+        // Deallocate a memory block previously allocated with Allocate()
+        // (if that's not the case, the behavior is undefined)
+        void Deallocate(void* p);
+        // Returns the block size with which the FixedAllocator was initialized
+        std::size_t BlockSize() const
+        { return blockSize_; }
+        // Comparison operator for sorting 
+        bool operator<(std::size_t rhs) const
+        { return BlockSize() < rhs; }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class SmallObjAllocator
+// Offers services for allocating small-sized objects
+////////////////////////////////////////////////////////////////////////////////
+
+    class SmallObjAllocator
+    {
+    public:
+        SmallObjAllocator(
+            std::size_t chunkSize, 
+            std::size_t maxObjectSize);
+    
+        void* Allocate(std::size_t numBytes);
+        void Deallocate(void* p, std::size_t size);
+    
+    private:
+        SmallObjAllocator(const SmallObjAllocator&);
+        SmallObjAllocator& operator=(const SmallObjAllocator&);
+        
+        typedef std::vector<FixedAllocator> Pool;
+        Pool pool_;
+        FixedAllocator* pLastAlloc_;
+        FixedAllocator* pLastDealloc_;
+        std::size_t chunkSize_;
+        std::size_t maxObjectSize_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class SmallObject
+// Base class for polymorphic small objects, offers fast
+//     allocations/deallocations
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        template <class> class ThreadingModel = DEFAULT_THREADING,
+        std::size_t chunkSize = DEFAULT_CHUNK_SIZE,
+        std::size_t maxSmallObjectSize = MAX_SMALL_OBJECT_SIZE
+    >
+    class SmallObject : public ThreadingModel< 
+        SmallObject<ThreadingModel, chunkSize, maxSmallObjectSize> >
+    {
+    	typedef ThreadingModel< SmallObject<ThreadingModel, 
+    			chunkSize, maxSmallObjectSize> > MyThreadingModel;
+    			
+        struct MySmallObjAllocator : public SmallObjAllocator
+        {
+            MySmallObjAllocator() 
+            : SmallObjAllocator(chunkSize, maxSmallObjectSize)
+            {}
+        };
+        // The typedef below would make things much simpler, 
+        //     but MWCW won't like it
+        // typedef SingletonHolder<MySmallObjAllocator/*, CreateStatic, 
+        //        DefaultLifetime, ThreadingModel*/> MyAllocator;
+        
+    public:
+        static void* operator new(std::size_t size)
+        {
+#if (MAX_SMALL_OBJECT_SIZE != 0) && (DEFAULT_CHUNK_SIZE != 0)
+            typename MyThreadingModel::Lock lock;
+            (void)lock; // get rid of warning
+            
+            return SingletonHolder<MySmallObjAllocator, CreateStatic, 
+                PhoenixSingleton>::Instance().Allocate(size);
+#else
+            return ::operator new(size);
+#endif
+        }
+        static void operator delete(void* p, std::size_t size)
+        {
+#if (MAX_SMALL_OBJECT_SIZE != 0) && (DEFAULT_CHUNK_SIZE != 0)
+            typename MyThreadingModel::Lock lock;
+            (void)lock; // get rid of warning
+            
+            SingletonHolder<MySmallObjAllocator, CreateStatic, 
+                PhoenixSingleton>::Instance().Deallocate(p, size);
+#else
+            ::operator delete(p); //### BCB doesn't like size parameter
+#endif
+        }
+        virtual ~SmallObject() {}
+    };
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// July 16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // SMALLOBJ_INC_
Index: avida/current/source/third-party/Loki/Borland/SmartPtr.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/SmartPtr.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/SmartPtr.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,1199 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef SMARTPTR_INC_
+#define SMARTPTR_INC_
+
+////////////////////////////////////////////////////////////////////////////////
+// IMPORTANT NOTE
+// Due to threading issues, the OwnershipPolicy has been changed as follows:
+//     Release() returns a boolean saying if that was the last release
+//        so the pointer can be deleted by the StoragePolicy
+//     IsUnique() was removed
+////////////////////////////////////////////////////////////////////////////////
+
+
+#include "SmallObj.h"
+#include "TypeManip.h"
+#include "static_check.h"
+#include <functional>
+#include <stdexcept>
+#include <cassert>
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DefaultSPStorage
+// Implementation of the StoragePolicy used by SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class DefaultSPStorage
+    {
+    public:
+        typedef T* StoredType;    // the type of the pointee_ object
+        typedef T* PointerType;   // type returned by operator->
+        typedef T& ReferenceType; // type returned by operator*
+        
+    public:
+        DefaultSPStorage() : pointee_(Default()) 
+        {}
+
+        // The storage policy doesn't initialize the stored pointer 
+        //     which will be initialized by the OwnershipPolicy's Clone fn
+        DefaultSPStorage(const DefaultSPStorage&)
+        {}
+
+        template <class U>
+        DefaultSPStorage(const DefaultSPStorage<U>&) 
+        {}
+        
+        DefaultSPStorage(const StoredType& p) : pointee_(p) {}
+        
+        PointerType operator->() const { return pointee_; }
+        
+        ReferenceType operator*() const { return *pointee_; }
+        
+        void Swap(DefaultSPStorage& rhs)
+        { std::swap(pointee_, rhs.pointee_); }
+    
+        // Accessors
+        friend inline PointerType GetImpl(const DefaultSPStorage& sp)
+        { return sp.pointee_; }
+        
+    	friend inline const StoredType& GetImplRef(const DefaultSPStorage& sp)
+    	{ return sp.pointee_; }
+
+    	friend inline StoredType& GetImplRef(DefaultSPStorage& sp)
+    	{ return sp.pointee_; }
+
+    protected:
+        // Destroys the data stored
+        // (Destruction might be taken over by the OwnershipPolicy)
+        void Destroy()
+        { delete pointee_; }
+        
+        // Default value to initialize the pointer
+        static StoredType Default()
+        { return 0; }
+    
+    private:
+        // Data
+        StoredType pointee_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template RefCounted
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Provides a classic external reference counting implementation
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class RefCounted
+    {
+    public:
+        RefCounted() 
+        {
+            pCount_ = static_cast<unsigned int*>(
+                SmallObject<>::operator new(sizeof(unsigned int)));
+            assert(pCount_);
+            *pCount_ = 1;
+        }
+        
+        RefCounted(const RefCounted& rhs) 
+        : pCount_(rhs.pCount_)
+        {}
+        
+        // MWCW lacks template friends, hence the following kludge
+        template <typename P1>
+        RefCounted(const RefCounted<P1>& rhs) 
+        : pCount_(reinterpret_cast<const RefCounted&>(rhs).pCount_)
+        {}
+        
+        P Clone(const P& val)
+        {
+            ++*pCount_;
+            return val;
+        }
+        
+        bool Release(const P&)
+        {
+            if (!--*pCount_)
+            {
+                SmallObject<>::operator delete(pCount_, sizeof(unsigned int));
+                return true;
+            }
+            return false;
+        }
+        
+        void Swap(RefCounted& rhs)
+        { std::swap(pCount_, rhs.pCount_); }
+    
+        enum { destructiveCopy = false };
+
+    private:
+        // Data
+        unsigned int* pCount_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template RefCountedMT
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements external reference counting for multithreaded programs
+////////////////////////////////////////////////////////////////////////////////
+    template <class P,
+        template <class> class ThreadingModel>
+    class RefCountedMT : public ThreadingModel< RefCountedMT<P, ThreadingModel> >
+    {
+    public:
+        RefCountedMT()
+        {
+            pCount_ = static_cast<unsigned int*>(
+                SmallObject<ThreadingModel>::operator new(
+                    sizeof(unsigned int)));
+            assert(pCount_);
+            *pCount_ = 1;
+        }
+
+        RefCountedMT(const RefCountedMT& rhs)
+        : pCount_(rhs.pCount_)
+        {}
+
+        // MWCW lacks template friends, hence the following kludge
+        template <typename P1>
+        RefCountedMT(const RefCountedMT<P1, ThreadingModel>& rhs)
+        : pCount_(reinterpret_cast<const RefCounted<P>&>(rhs).pCount_)
+        {}
+
+        P Clone(const P& val)
+        {
+            ThreadingModel<RefCountedMT>::AtomicIncrement(*pCount_);
+            return val;
+        }
+
+        bool Release(const P&)
+        {
+            if (!ThreadingModel<RefCountedMT>::AtomicDecrement(*pCount_))
+            {
+                SmallObject<ThreadingModel>::operator delete(pCount_,
+                    sizeof(unsigned int));
+                return true;
+            }
+            return false;
+        }
+
+        void Swap(RefCountedMT& rhs)
+        { std::swap(pCount_, rhs.pCount_); }
+
+        enum { destructiveCopy = false };
+
+    private:
+        // Data
+        volatile unsigned int* pCount_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template COMRefCounted
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Adapts COM intrusive reference counting to OwnershipPolicy-specific syntax
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class COMRefCounted
+    {
+    public:
+        COMRefCounted()
+        {}
+
+        template <class U>
+        COMRefCounted(const COMRefCounted<U>&)
+        {}
+
+        static P Clone(const P& val)
+        {
+            val->AddRef();
+            return val;
+        }
+
+        static bool Release(const P& val)
+        { val->Release(); return false; }
+
+        enum { destructiveCopy = false };
+
+        static void Swap(COMRefCounted&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DeepCopy
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements deep copy semantics, assumes existence of a Clone() member
+//     function of the pointee type
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct DeepCopy
+    {
+        DeepCopy()
+        {}
+
+        template <class P1>
+        DeepCopy(const DeepCopy<P1>&)
+        {}
+
+        static P Clone(const P& val)
+        { return val->Clone(); }
+
+        static bool Release(const P& val)
+        { return true; }
+
+        static void Swap(DeepCopy&)
+        {}
+
+        enum { destructiveCopy = false };
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template RefLinked
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements reference linking
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        class RefLinkedBase
+        {
+        public:
+            RefLinkedBase() 
+            { prev_ = next_ = this; }
+            
+            RefLinkedBase(const RefLinkedBase& rhs) 
+            {
+                prev_ = &rhs;
+                next_ = rhs.next_;
+                prev_->next_ = this;
+                next_->prev_ = this;
+            }
+            
+            bool Release()
+            {
+                if (next_ == this)
+                {   
+                    assert(prev_ == this);
+                    return true;
+                }
+                prev_->next_ = next_;
+                next_->prev_ = prev_;
+                return false;
+            }
+            
+            void Swap(RefLinkedBase& rhs)
+            {
+                if (next_ == this)
+                {
+                    assert(prev_ == this);
+                    if (rhs.next_ == &rhs)
+                    {
+                        assert(rhs.prev_ == &rhs);
+                        // both lists are empty, nothing 2 do
+                        return;
+                    }
+                    prev_ = rhs.prev_;
+                    next_ = rhs.next_;
+                    prev_->next_ = next_->prev_ = this;
+                    rhs.next_ = rhs.prev_ = &rhs;
+                    return;
+                }
+                if (rhs.next_ == &rhs)
+                {
+                    rhs.Swap(*this);
+                    return;
+                }
+                std::swap(prev_, rhs.prev_);
+                std::swap(next_, rhs.next_);
+                std::swap(prev_->next_, rhs.prev_->next_);
+                std::swap(next_->prev_, rhs.next_->prev_);
+            }
+                
+            enum { destructiveCopy = false };
+
+        private:
+            mutable const RefLinkedBase* prev_;
+            mutable const RefLinkedBase* next_;
+        };
+    }
+    
+    template <class P>
+    class RefLinked : public Private::RefLinkedBase
+    {
+    public:
+        RefLinked()
+        {}
+        
+        template <class P1>
+        RefLinked(const RefLinked<P1>& rhs) 
+        : Private::RefLinkedBase(rhs)
+        {}
+
+        static P Clone(const P& val)
+        { return val; }
+
+        bool Release(const P&)
+        { return Private::RefLinkedBase::Release(); }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template DestructiveCopy
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements destructive copy semantics (a la std::auto_ptr)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class DestructiveCopy
+    {
+    public:
+        DestructiveCopy()
+        {}
+        
+        template <class P1>
+        DestructiveCopy(const DestructiveCopy<P1>&)
+        {}
+        
+        template <class P1>
+        static P Clone(P1& val)
+        {
+            P result(val);
+            val = P1();
+            return result;
+        }
+        
+        static bool Release(const P&)
+        { return true; }
+        
+        static void Swap(DestructiveCopy&)
+        {}
+        
+        enum { destructiveCopy = true };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template NoCopy
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements a policy that doesn't allow copying objects
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class NoCopy
+    {
+    public:
+        NoCopy()
+        {}
+        
+        template <class P1>
+        NoCopy(const NoCopy<P1>&)
+        {}
+        
+        static P Clone(const P&)
+        {
+            CT_ASSERT(false, This_Policy_Disallows_Value_Copying);
+        }
+        
+        static bool Release(const P&)
+        { return true; }
+        
+        static void Swap(NoCopy&)
+        {}
+        
+        enum { destructiveCopy = false };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template AllowConversion
+// Implementation of the ConversionPolicy used by SmartPtr
+// Allows implicit conversion from SmartPtr to the pointee type
+////////////////////////////////////////////////////////////////////////////////
+
+    struct AllowConversion
+    {
+        enum { allow = true };
+
+        void Swap(AllowConversion&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DisallowConversion
+// Implementation of the ConversionPolicy used by SmartPtr
+// Does not allow implicit conversion from SmartPtr to the pointee type
+// You can initialize a DisallowConversion with an AllowConversion
+////////////////////////////////////////////////////////////////////////////////
+
+    struct DisallowConversion
+    {
+        DisallowConversion()
+        {}
+        
+        DisallowConversion(const AllowConversion&)
+        {}
+        
+        enum { allow = false };
+
+        void Swap(DisallowConversion&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template NoCheck
+// Implementation of the CheckingPolicy used by SmartPtr
+// Well, it's clear what it does :o)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct NoCheck
+    {
+        NoCheck()
+        {}
+        
+        template <class P1>
+        NoCheck(const NoCheck<P1>&)
+        {}
+        
+        static void OnDefault(const P&)
+        {}
+
+        static void OnInit(const P&)
+        {}
+
+        static void OnDereference(const P&)
+        {}
+
+        static void Swap(NoCheck&)
+        {}
+    };
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AssertCheck
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct AssertCheck
+    {
+        AssertCheck()
+        {}
+        
+        template <class P1>
+        AssertCheck(const AssertCheck<P1>&)
+        {}
+        
+        template <class P1>
+        AssertCheck(const NoCheck<P1>&)
+        {}
+        
+        static void OnDefault(const P&)
+        {}
+
+        static void OnInit(const P&)
+        {}
+
+        static void OnDereference(P val)
+        { assert(val); }
+
+        static void Swap(AssertCheck&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AssertCheckStrict
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer against zero upon initialization and before dereference
+// You can initialize an AssertCheckStrict with an AssertCheck 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct AssertCheckStrict
+    {
+        AssertCheckStrict()
+        {}
+        
+        template <class U>
+        AssertCheckStrict(const AssertCheckStrict<U>&)
+        {}
+        
+        template <class U>
+        AssertCheckStrict(const AssertCheck<U>&)
+        {}
+        
+        template <class P1>
+        AssertCheckStrict(const NoCheck<P1>&)
+        {}
+        
+        static void OnDefault(P val)
+        { assert(val); }
+
+        static void OnInit(P val)
+        { assert(val); }
+        
+        static void OnDereference(P val)
+        { assert(val); }
+        
+        static void Swap(AssertCheckStrict&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class NullPointerException
+// Used by some implementations of the CheckingPolicy used by SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    struct NullPointerException : public std::runtime_error
+    {
+        NullPointerException() : std::runtime_error("")
+        { }
+        const char* what() const throw () //### BCB: throw() added
+        { return "Null Pointer Exception"; }
+    };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template RejectNullStatic
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer upon initialization and before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct RejectNullStatic
+    {
+        RejectNullStatic()
+        {}
+
+        template <class P1>
+        RejectNullStatic(const RejectNullStatic<P1>&)
+        {}
+
+        template <class P1>
+        RejectNullStatic(const NoCheck<P1>&)
+        {}
+
+        template <class P1>
+        RejectNullStatic(const AssertCheck<P1>&)
+        {}
+
+        template <class P1>
+        RejectNullStatic(const AssertCheckStrict<P1>&)
+        {}
+
+        static void OnDefault(const P&)
+        {
+            CompileTimeError<false>
+                ERROR_This_Policy_Does_Not_Allow_Default_Initialization;
+        }
+
+        static void OnInit(const P& val)
+        { if (!val) throw NullPointerException(); }
+
+        static void OnDereference(const P& val)
+        { if (!val) throw NullPointerException(); }
+
+        static void Swap(RejectNullStatic&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template RejectNull
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct RejectNull
+    {
+        RejectNull()
+        {}
+        
+        template <class P1>
+        RejectNull(const RejectNull<P1>&)
+        {}
+        
+        static void OnInit(P val)
+        { if (!val) throw NullPointerException(); }
+
+        static void OnDefault(P val)
+        { OnInit(val); }
+        
+        void OnDereference(P val)
+        { OnInit(val); }
+        
+        void Swap(RejectNull&)
+        {}        
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template RejectNullStrict
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer upon initialization and before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct RejectNullStrict
+    {
+        RejectNullStrict()
+        {}
+        
+        template <class P1>
+        RejectNullStrict(const RejectNullStrict<P1>&)
+        {}
+
+        template <class P1>
+        RejectNullStrict(const RejectNull<P1>&)
+        {}
+        
+        static void OnInit(P val)
+        { if (!val) throw NullPointerException(); }
+
+        void OnDereference(P val)
+        { OnInit(val); }
+        
+        void Swap(RejectNullStrict&)
+        {}        
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ByRef
+// Transports a reference as a value
+// Serves to implement the Colvin/Gibbons trick for SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class ByRef
+    {
+    public:
+        ByRef(T& v) : value_(v) {}
+        operator T&() { return value_; }
+        operator const T&() const { return value_; }
+    private:
+        T& value_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SmartPtr (declaration)
+// The reason for all the fuss above
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OwnershipPolicy = RefCounted,
+        class ConversionPolicy = DisallowConversion,
+        template <class> class CheckingPolicy = AssertCheck,
+        template <class> class StoragePolicy = DefaultSPStorage
+    >
+    class SmartPtr;
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SmartPtr (definition)
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OwnershipPolicy,
+        class ConversionPolicy,
+        template <class> class CheckingPolicy,
+        template <class> class StoragePolicy
+    >
+    class SmartPtr
+        : public StoragePolicy<T>
+        , public OwnershipPolicy<typename StoragePolicy<T>::PointerType>
+        , public CheckingPolicy<typename StoragePolicy<T>::StoredType>
+        , public ConversionPolicy
+    {
+        typedef StoragePolicy<T> SP;
+        typedef OwnershipPolicy<typename StoragePolicy<T>::PointerType> OP;
+        typedef CheckingPolicy<typename StoragePolicy<T>::StoredType> KP;
+        typedef ConversionPolicy CP;
+        
+    public:
+        typedef typename SP::PointerType PointerType;
+        typedef typename SP::StoredType StoredType;
+        typedef typename SP::ReferenceType ReferenceType;
+
+        enum { aux = OP::destructiveCopy }; //### BCB
+        typedef const SmartPtr<T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy> Ptr_t;
+        typedef const Ptr_t cPtr_t;
+        typedef typename Select<aux, Ptr_t, cPtr_t>::Result CopyArg;
+    
+        SmartPtr()
+        { KP::OnDefault(GetImpl(*this)); }
+    	
+        SmartPtr(const StoredType& p) : SP(p)
+        { KP::OnInit(GetImpl(*this)); }
+    	
+    	SmartPtr(CopyArg& rhs)
+        : SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+        { GetImplRef(*this) = OP::Clone(GetImplRef(rhs)); }
+
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+    	SmartPtr(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+    	: SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+    	{ GetImplRef(*this) = OP::Clone(GetImplRef(rhs)); }
+
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+    	SmartPtr(SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+    	: SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+    	{ GetImplRef(*this) = OP::Clone(GetImplRef(rhs)); }
+
+        //### BCB
+        SmartPtr(ByRef<Ptr_t> rhs)
+    	: SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+        {}
+
+        //### BCB        
+        operator ByRef<Ptr_t>()
+        { return ByRef<SmartPtr>(*this); }
+
+    	SmartPtr& operator=(CopyArg& rhs)
+    	{
+    	    SmartPtr temp(rhs);
+    	    temp.Swap(*this);
+    	    return *this;
+    	}
+
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+    	SmartPtr& operator=(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+    	{
+    	    SmartPtr temp(rhs);
+    	    temp.Swap(*this);
+    	    return *this;
+    	}
+    	
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+    	SmartPtr& operator=(SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+    	{
+    	    SmartPtr temp(rhs);
+    	    temp.Swap(*this);
+    	    return *this;
+    	}
+    	
+    	void Swap(SmartPtr& rhs)
+    	{
+    	    OP::Swap(rhs);
+    	    CP::Swap(rhs);
+    	    KP::Swap(rhs);
+    	    SP::Swap(rhs);
+    	}
+    	
+    	~SmartPtr()
+    	{
+    	    if (OP::Release(GetImpl(*static_cast<SP*>(this))))
+    	    {
+    	        SP::Destroy();
+    	    }
+    	}
+    	
+    	friend inline void Release(SmartPtr& sp, typename SP::StoredType& p)
+    	{
+    	    p = GetImplRef(sp);
+    	    GetImplRef(sp) = SP::Default();
+    	}
+    	
+    	friend inline void Reset(SmartPtr& sp, typename SP::StoredType p)
+    	{ SmartPtr(p).Swap(sp); }
+
+        T* operator->() //### BCB PointerType causes internal compiler crash
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator->();
+        }
+
+        T* operator->() const //### BCB PointerType causes internal compiler crash
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator->();
+        }
+
+        T& operator*() //### BCB ReferenceType causes internal compiler crash
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator*();
+        }
+
+        T& operator*() const //### BCB ReferenceType causes internal compiler crash
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator*();
+        }
+    	
+        bool operator!() const // Enables "if (!sp) ..."
+        { return GetImpl(*this) == 0; }
+
+        inline friend bool operator==(const SmartPtr& lhs,
+            const T* rhs)
+        { return GetImpl(lhs) == rhs; }
+        
+        inline friend bool operator==(const T* lhs,
+            const SmartPtr& rhs)
+        { return rhs == lhs; }
+        
+        inline friend bool operator!=(const SmartPtr& lhs,
+            const T* rhs)
+        { return !(lhs == rhs); }
+        
+        inline friend bool operator!=(const T* lhs,
+            const SmartPtr& rhs)
+        { return rhs != lhs; }
+
+        // Ambiguity buster
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+        bool operator==(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs) const
+        { return *this == GetImpl(rhs); }
+
+        // Ambiguity buster
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+        bool operator!=(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs) const
+        { return !(*this == rhs); }
+
+        // Ambiguity buster
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+        bool operator<(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs) const
+        { return *this < GetImpl(rhs); }
+
+    private:
+        // Helper for enabling 'if (sp)'
+        struct Tester
+        {
+            Tester() {}
+        private:
+            void operator delete(void*);
+        };
+        
+    public:
+        // enable 'if (sp)'
+        operator Tester*() const
+        {
+            if (!*this) return 0;
+            static Tester t;
+            return &t;
+        }
+
+    private:
+        // Helper for disallowing automatic conversion
+        struct Insipid
+        {
+            Insipid(PointerType) {}
+        };
+
+        enum { aux2 = CP::allow }; // ### BCB, PointerType must be also removed
+        typedef typename Select<aux2, T*, Insipid>::Result
+            AutomaticConversionResult;
+
+    public:
+        operator AutomaticConversionResult() const
+        { return GetImpl(*this); }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// free comparison operators for class template SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////
+// operator== for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator==(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return GetImpl(lhs) == rhs; }
+    
+////////////////////////////////////////////////////////////////////////////////
+// operator== for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator==(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return rhs == lhs; }
+
+////////////////////////////////////////////////////////////////////////////////
+// operator!= for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator!=(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return !(lhs == rhs); }
+    
+////////////////////////////////////////////////////////////////////////////////
+// operator!= for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator!=(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return rhs != lhs; }
+
+////////////////////////////////////////////////////////////////////////////////
+// operator< for lhs = SmartPtr, rhs = raw pointer -- NOT DEFINED
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator<(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs);
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator< for lhs = raw pointer, rhs = SmartPtr -- NOT DEFINED
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator<(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs);
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator> for lhs = SmartPtr, rhs = raw pointer -- NOT DEFINED
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator>(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return rhs < lhs; }
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator> for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator>(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return rhs < lhs; }
+  
+////////////////////////////////////////////////////////////////////////////////
+// operator<= for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator<=(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return !(rhs < lhs); }
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator<= for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator<=(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return !(rhs < lhs); }
+
+////////////////////////////////////////////////////////////////////////////////
+// operator>= for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator>=(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return !(lhs < rhs); }
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator>= for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator>=(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return !(lhs < rhs); }
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// specialization of std::less for SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+namespace std
+{
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP
+    >
+    struct less< Loki::SmartPtr<T, OP, CP, KP, SP> >
+        : public binary_function<Loki::SmartPtr<T, OP, CP, KP, SP>,
+            Loki::SmartPtr<T, OP, CP, KP, SP>, bool>
+    {
+        bool operator()(const Loki::SmartPtr<T, OP, CP, KP, SP>& lhs,
+            const Loki::SmartPtr<T, OP, CP, KP, SP>& rhs) const
+        { return less<T*>()(GetImpl(lhs), GetImpl(rhs)); }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// December 09, 2001: Included <cassert>
+// July     16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // SMARTPTR_INC_
Index: avida/current/source/third-party/Loki/Borland/Threads.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/Threads.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/Threads.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,279 @@
+///////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+//     purpose is hereby granted without fee, provided that the above copyright
+//     notice appear in all copies and that both that copyright notice and this
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the
+//     suitability of this software for any purpose. It is provided "as is"
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef THREADS_INC_
+#define THREADS_INC_
+
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFAULT_THREADING
+// Selects the default threading model for certain components of Loki
+// If you don't define it, it defaults to single-threaded
+// All classes in Loki have configurable threading model; DEFAULT_THREADING
+// affects only default template arguments
+////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __WIN32__
+#  ifndef _WINDOWS_
+#    define WIN32_LEAN_AND_MEAN
+#      include <windows.h>
+#  endif
+#endif
+#include <cassert>
+
+
+// Last update: June 20, 2001
+
+#ifndef DEFAULT_THREADING
+#define DEFAULT_THREADING /**/ ::Loki::SingleThreaded
+#endif
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template SingleThreaded
+// Implementation of the ThreadingModel policy used by various classes
+// Implements a single-threaded model; no synchronization
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class Host>
+    class SingleThreaded
+    {
+    public:
+        struct Lock
+        {
+            Lock() {}
+            Lock(const Host&) {}
+        };
+        
+        typedef Host VolatileType;
+
+        typedef int IntType; 
+
+        static IntType AtomicAdd(volatile IntType& lval, IntType val)
+        { return lval += val; }
+        
+        static IntType AtomicSubtract(volatile IntType& lval, IntType val)
+        { return lval -= val; }
+
+        static IntType AtomicMultiply(volatile IntType& lval, IntType val)
+        { return lval *= val; }
+        
+        static IntType AtomicDivide(volatile IntType& lval, IntType val)
+        { return lval /= val; }
+        
+        static IntType AtomicIncrement(volatile IntType& lval)
+        { return ++lval; }
+        
+        static IntType AtomicDivide(volatile IntType& lval)
+        { return lval /= val; }
+        
+        static void AtomicAssign(volatile IntType & lval, IntType val)
+        { lval = val; }
+        
+        static void AtomicAssign(IntType & lval, volatile IntType & val)
+        { lval = val; }
+    };
+    
+//#ifdef _WINDOWS_  Borland doesn't use this
+#ifdef __WIN32__
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ObjectLevelLockable
+// Implementation of the ThreadingModel policy used by various classes
+// Implements a object-level locking scheme
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class Host>
+    class ObjectLevelLockable
+    {
+        CRITICAL_SECTION mtx_;
+
+    public:
+        ObjectLevelLockable()
+        {
+            ::InitializeCriticalSection(&mtx_);
+        }
+
+        ~ObjectLevelLockable()
+        {
+            ::DeleteCriticalSection(&mtx_);
+        }
+
+        class Lock;
+        friend class Lock;
+        
+        class Lock
+        {
+            ObjectLevelLockable& host_;
+
+            Lock(const Lock&);
+            Lock& operator=(const Lock&);
+        public:
+            Lock(Host& host) : host_(host)
+            {
+                ::EnterCriticalSection(&host_.mtx_);
+            }
+            ~Lock()
+            {
+                ::LeaveCriticalSection(&host_.mtx_);
+            }
+        };
+
+        typedef volatile Host VolatileType;
+
+        typedef LONG IntType; 
+
+        static IntType AtomicIncrement(volatile IntType& lval)
+        { return InterlockedIncrement(&const_cast<IntType&>(lval)); }
+        
+        static IntType AtomicDivide(volatile IntType& lval)
+        { return InterlockedDecrement(&const_cast<IntType&>(lval)); }
+        
+        static void AtomicAssign(volatile IntType& lval, IntType val)
+        { InterlockedExchange(&const_cast<IntType&>(lval), val); }
+
+        static void AtomicAssign(IntType& lval, volatile IntType& val)
+        { InterlockedExchange(&lval, val); }
+    };
+
+    template <class Host>
+    class ClassLevelLockable
+    {
+        static CRITICAL_SECTION mtx_;
+        static volatile LONG mtx_initialisation_started;
+        static volatile LONG mtx_initialisation_done;
+
+        //### Borland C++ doesn't like this (it is ignored)
+        /*
+        struct Initializer;
+        friend struct Initializer;
+        struct Initializer
+        {
+            Initializer()
+            {
+                ::InitializeCriticalSection(&mtx_);
+            }
+            ~Initializer()
+            {
+                ::DeleteCriticalSection(&mtx_);
+            }
+        };
+
+        static Initializer initializer_;
+        */
+
+    public:
+        class Lock;
+        friend class Lock;
+
+        typedef volatile Host VolatileType;
+
+        typedef LONG IntType;
+
+        static IntType AtomicIncrement(volatile IntType& lval)
+        { return InterlockedIncrement(&const_cast<IntType&>(lval)); }
+
+        static IntType AtomicDivide(volatile IntType& lval)
+        { return InterlockedDecrement(&const_cast<IntType&>(lval)); }
+
+        static void AtomicAssign(volatile IntType& lval, IntType val)
+        { InterlockedExchange(&const_cast<IntType&>(lval), val); }
+
+        static void AtomicAssign(IntType& lval, volatile IntType& val)
+        { InterlockedExchange(&lval, val); }
+
+private:
+        // used to protect critical section initialisation
+        static LONG AtomicExchange(volatile IntType& lval, IntType& new_value) {
+            return InterlockedExchange(&lval, new_value);
+        }
+public:
+
+        class Lock
+        {
+            Lock(const Lock&);
+            Lock& operator=(const Lock&);
+
+            //### BCB: the initialisation itself must be protected as it is not done during static initialisation
+            void initialize_impl(void)
+            {
+                LONG now = true;
+                now = ClassLevelLockable<Host>::AtomicExchange(ClassLevelLockable<Host>::mtx_initialisation_started, now);
+                assert(ClassLevelLockable<Host>::mtx_initialisation_started);
+                if (!now) {
+                    assert(!ClassLevelLockable<Host>::mtx_initialisation_done);
+                    ::InitializeCriticalSection(&mtx_);
+                    ClassLevelLockable<Host>::mtx_initialisation_done = true;
+                } else {
+                    // critical section is just being initialized by other thread
+                    while (!ClassLevelLockable<Host>::mtx_initialisation_done) {
+                        Sleep(0);
+                    }
+                }
+            }
+
+        public:
+            Lock()
+            {
+                //### Here's the trick to make it working on BC++B 6.0
+                // (because the static Initializer struct is ignored)
+                //
+                // The critical section isn't deleted by atexit().
+                //    Shouldn't matter in practise. You may add it here if you want.
+                if (!mtx_initialisation_done) {
+                    initialize_impl();
+                }
+                ::EnterCriticalSection(&mtx_);
+            }
+            Lock(Host&)
+            {
+                if (!mtx_initialisation_done) {
+                    initialize_impl();
+                }
+                ::EnterCriticalSection(&mtx_);
+            }
+            ~Lock()
+            {
+                ::LeaveCriticalSection(&mtx_);
+            }
+        };
+    };
+
+    template <class Host>
+    CRITICAL_SECTION ClassLevelLockable<Host>::mtx_;
+
+    template <class Host>
+    LONG volatile ClassLevelLockable<Host>::mtx_initialisation_started;
+    template <class Host>
+    LONG volatile ClassLevelLockable<Host>::mtx_initialisation_done;
+
+//### Borland C++ does like this
+//    template <class Host>
+//    typename ClassLevelLockable<Host>::Initializer
+//    ClassLevelLockable<Host>::initializer_;
+
+#endif
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June    20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// January 10, 2002: Fixed bug in AtomicDivide - credit due to Jordi Guerrero
+// July    16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: avida/current/source/third-party/Loki/Borland/Tuple.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/Tuple.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/Tuple.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,23 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+////////////////////////////////////////////////////////////////////////////////
+// This file is intentionally left empty
+// Due to compiler limitations, its contents has been moved to
+//     HierarchyGenerators.h 
+////////////////////////////////////////////////////////////////////////////////
+
Index: avida/current/source/third-party/Loki/Borland/TypeInfo.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/TypeInfo.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/TypeInfo.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,130 @@
+head	1.1;
+access;
+symbols;
+locks; strict;
+comment	@ * @;
+
+
+1.1
+date	2002.07.16.22.42.05;	author tslettebo;	state Exp;
+branches;
+next	;
+
+
+desc
+@@
+
+
+1.1
+log
+ at Initial commit
+@
+text
+@////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef TYPEINFO_INC_
+#define TYPEINFO_INC_
+
+#include <typeinfo>
+#include <cassert>
+#include "Typelist.h"
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class TypeInfo
+// Purpose: offer a first-class, comparable wrapper over std::type_info
+////////////////////////////////////////////////////////////////////////////////
+
+    class TypeInfo
+    {
+    public:
+        // Constructors
+        TypeInfo(); // needed for containers
+        TypeInfo(const std::type_info&); // non-explicit
+
+        // Access for the wrapped std::type_info
+        const std::type_info& Get() const;
+        // Compatibility functions
+        bool before(const TypeInfo& rhs) const;
+        const char* name() const;
+
+    private:
+        const std::type_info* pInfo_;
+    };
+    
+// Implementation
+    
+    inline TypeInfo::TypeInfo()
+    {
+        class Nil {};
+        pInfo_ = &typeid(Nil);
+        assert(pInfo_);
+    }
+    
+    inline TypeInfo::TypeInfo(const std::type_info& ti)
+    : pInfo_(&ti)
+    { assert(pInfo_); }
+    
+    inline bool TypeInfo::before(const TypeInfo& rhs) const
+    {
+        assert(pInfo_);
+        return pInfo_->before(*rhs.pInfo_);
+    }
+
+    inline const std::type_info& TypeInfo::Get() const
+    {
+        assert(pInfo_);
+        return *pInfo_;
+    }
+    
+    inline const char* TypeInfo::name() const
+    {
+        assert(pInfo_);
+        return pInfo_->name();
+    }
+
+// Comparison operators
+    
+    inline bool operator==(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return lhs.Get() == rhs.Get(); }
+
+    inline bool operator<(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return lhs.before(rhs); }
+
+    inline bool operator!=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs == rhs); }    
+    
+    inline bool operator>(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return rhs < lhs; }
+    
+    inline bool operator<=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs > rhs); }
+     
+    inline bool operator>=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs < rhs); }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// July 16, 2002: Ported by Terje Slettebø to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPEINFO_INC_
+@
Index: avida/current/source/third-party/Loki/Borland/TypeManip.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/TypeManip.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/TypeManip.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,184 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+//     purpose is hereby granted without fee, provided that the above copyright
+//     notice appear in all copies and that both that copyright notice and this
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the
+//     suitability of this software for any purpose. It is provided "as is"
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef TYPEMANIP_INC_
+#define TYPEMANIP_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template Int2Type
+// Converts each integral constant into a unique type
+// Invocation: Int2Type<v> where v is a compile-time constant integral
+// Defines 'value', an enum that evaluates to v
+////////////////////////////////////////////////////////////////////////////////
+
+    template <int v>
+    struct Int2Type
+    {
+        static const int value = v;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Type2Type
+// Converts each type into a unique, insipid type
+// Invocation Type2Type<T> where T is a type
+// Defines the type OriginalType which maps back to T
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct Type2Type
+    {
+        typedef T OriginalType;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Select
+// Selects one of two types based upon a boolean constant
+// Invocation: Select<flag, T, U>::Result
+// where:
+// flag is a compile-time boolean constant
+// T and U are types
+// Result evaluates to T if flag is true, and to U otherwise.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <bool flag, typename T, typename U>
+    struct Select
+    {
+        typedef T Result;
+    };
+    template <typename T, typename U>
+    struct Select<false, T, U>
+    {
+        typedef U Result;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// Helper types Small and Big - guarantee that sizeof(Small) < sizeof(Big)
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class T, class U>
+        struct ConversionHelper
+        {
+            typedef char Small;
+            struct Big { char dummy[2]; };
+            static Big   Test(...);
+            static Small Test(U);
+            static T MakeT();
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Conversion
+// Figures out the conversion relationships between two types
+// Invocations (T and U are types):
+// a) Conversion<T, U>::exists
+// returns (at compile time) true if there is an implicit conversion from T
+// to U (example: Derived to Base)
+// b) Conversion<T, U>::exists2Way
+// returns (at compile time) true if there are both conversions from T
+// to U and from U to T (example: int to char and back)
+// c) Conversion<T, U>::sameType
+// returns (at compile time) true if T and U represent the same type
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, class U>
+    struct Conversion
+    {
+        typedef Private::ConversionHelper<T, U> H;
+
+        static const bool exists     = sizeof(H::Small) == sizeof((H::Test(H::MakeT())));
+        static const bool exists2Way = exists && Conversion<U, T>::exists;
+        static const bool sameType   = false;
+    };
+
+    template <class T>
+    struct Conversion<T, T>
+    {
+        static const bool exists     = true;
+        static const bool exists2Way = true;
+        static const bool sameType   = true;
+    };
+
+    template <class T>
+    struct Conversion<void, T>
+    {
+        static const bool exists     = false;
+        static const bool exists2Way = false;
+        static const bool sameType   = false;
+    };
+
+    template <class T>
+    struct Conversion<T, void>
+    {
+        static const bool exists     = true;
+        static const bool exists2Way = false;
+        static const bool sameType   = false;
+    };
+
+    template <>
+    class Conversion<void, void>
+    {
+    public:
+        static const bool exists     = true;
+        static const bool exists2Way = true;
+        static const bool sameType   = true;
+    };
+
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// macro SUPERSUBCLASS
+// Invocation: SUPERSUBCLASS(B, D) where B and D are types.
+// Returns true if B is a public base of D, or if B and D are aliases of the
+// same type.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+#define SUPERSUBCLASS(T, U) \
+    (::Loki::Conversion<const volatile U *, const volatile T *>::exists && \
+    !::Loki::Conversion<const volatile T *, const volatile void *>::sameType)
+
+////////////////////////////////////////////////////////////////////////////////
+// macro SUPERSUBCLASS
+// Invocation: SUPERSUBCLASS(B, D) where B and D are types.
+// Returns true if B is a public base of D.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+#define SUPERSUBCLASS_STRICT(T, U) \
+    ((SUPERSUBCLASS(T, U) && \
+    !::Loki::Conversion<const volatile T *, const volatile U *>::sameType))
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June     20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// November 22, 2001: minor change to support porting to boost
+// November 22, 2001: fixed bug in Conversion<void, T>
+//                    (credit due to Brad Town)
+// November 23, 2001: (well it's 12:01 am) fixed bug in SUPERSUBCLASS - added
+//                    the volatile qualifier to be 100% politically correct
+// July     16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPEMANIP_INC_
Index: avida/current/source/third-party/Loki/Borland/TypeTraits.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/TypeTraits.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/TypeTraits.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,277 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+//     purpose is hereby granted without fee, provided that the above copyright
+//     notice appear in all copies and that both that copyright notice and this
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the
+//     suitability of this software for any purpose. It is provided "as is"
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef TYPETRAITS_INC_
+#define TYPETRAITS_INC_
+
+#include "Typelist.h"
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomUnsignedInt
+// Offers a means to integrate nonstandard built-in unsigned integral types
+// (such as unsigned __int64 or unsigned long long int) with the TypeTraits
+//     class template defined below.
+// Invocation: IsCustomUnsignedInt<T> where T is any type
+// Defines 'value', an enum that is 1 if T is a custom built-in unsigned
+//     integral type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomUnsignedInt
+    {
+        static const bool value = false;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomSignedInt
+// Offers a means to integrate nonstandard built-in unsigned integral types
+// (such as unsigned __int64 or unsigned long long int) with the TypeTraits
+//     class template defined below.
+// Invocation: IsCustomSignedInt<T> where T is any type
+// Defines 'value', an enum that is 1 if T is a custom built-in signed
+//     integral type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomSignedInt
+    {
+        static const bool value = false;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomFloat
+// Offers a means to integrate nonstandard floating point types with the
+//     TypeTraits class template defined below.
+// Invocation: IsCustomFloat<T> where T is any type
+// Defines 'value', an enum that is 1 if T is a custom built-in
+//     floating point type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomFloat
+    {
+        static const bool value = false;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// Helper types for class template TypeTraits defined below
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        typedef TYPELIST_4(unsigned char, unsigned short int,
+           unsigned int, unsigned long int) StdUnsignedInts;
+        typedef TYPELIST_4(signed char, short int,
+           int, long int) StdSignedInts;
+        typedef TYPELIST_3(bool, char, wchar_t) StdOtherInts;
+        typedef TYPELIST_3(float, double, long double) StdFloats;
+
+        template <class U> struct PointerTraits
+        {
+            static const bool result = false;
+            typedef NullType PointeeType;
+        };
+
+        template <class U> struct PointerTraits<U *>
+        {
+            static const bool result = true;
+            typedef U PointeeType;
+        };
+
+        template <class U> struct ReferenceTraits
+        {
+            static const bool result = false;
+            typedef U ReferredType;
+        };
+
+        template <class U> struct ReferenceTraits<U &>
+        {
+            static const bool result = true;
+            typedef U ReferredType;
+        };
+
+        template <class U> struct PToMTraits
+        {
+            static const bool result = false;
+        };
+
+        template <class U, class V>
+        struct PToMTraits<U V::*>
+        {
+            static const bool result = true;
+        };
+
+        template <class U> struct UnConst
+        {
+            typedef U Result;
+            static const bool isConst = false;
+        };
+
+        template <class U> struct UnVolatile
+        {
+            typedef U Result;
+            static const bool isVolatile = false;
+        };
+
+        template <class U> struct AddReference
+        {
+            typedef U & Result;
+        };
+
+        template <class U> struct AddReference<U &>
+        {
+            typedef U & Result;
+        };
+
+        template <> struct AddReference<void>
+        {
+            typedef NullType Result;
+        };
+
+#ifndef __BORLANDC__
+
+        template <class U> struct UnConst<const U>
+        {
+            typedef U Result;
+            static const bool isConst = true;
+        };
+
+        template <class U> struct UnVolatile<volatile U>
+        {
+            typedef U Result;
+            static const bool isVolatile = true;
+        };
+
+#endif
+
+    }   // namespace Private
+
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeTraits
+// Figures out various properties of any given type
+// Invocations (T is a type):
+// a) TypeTraits<T>::isPointer
+// returns (at compile time) true if T is a pointer type
+// b) TypeTraits<T>::PointeeType
+// returns the type to which T points is T is a pointer type, NullType otherwise
+// a) TypeTraits<T>::isReference
+// returns (at compile time) true if T is a reference type
+// b) TypeTraits<T>::ReferredType
+// returns the type to which T refers is T is a reference type, NullType
+// otherwise
+// c) TypeTraits<T>::isMemberPointer
+// returns (at compile time) true if T is a pointer to member type
+// d) TypeTraits<T>::isStdUnsignedInt
+// returns (at compile time) true if T is a standard unsigned integral type
+// e) TypeTraits<T>::isStdSignedInt
+// returns (at compile time) true if T is a standard signed integral type
+// f) TypeTraits<T>::isStdIntegral
+// returns (at compile time) true if T is a standard integral type
+// g) TypeTraits<T>::isStdFloat
+// returns (at compile time) true if T is a standard floating-point type
+// h) TypeTraits<T>::isStdArith
+// returns (at compile time) true if T is a standard arithmetic type
+// i) TypeTraits<T>::isStdFundamental
+// returns (at compile time) true if T is a standard fundamental type
+// j) TypeTraits<T>::isUnsignedInt
+// returns (at compile time) true if T is a unsigned integral type
+// k) TypeTraits<T>::isSignedInt
+// returns (at compile time) true if T is a signed integral type
+// l) TypeTraits<T>::isIntegral
+// returns (at compile time) true if T is a integral type
+// m) TypeTraits<T>::isFloat
+// returns (at compile time) true if T is a floating-point type
+// n) TypeTraits<T>::isArith
+// returns (at compile time) true if T is a arithmetic type
+// o) TypeTraits<T>::isFundamental
+// returns (at compile time) true if T is a fundamental type
+// p) TypeTraits<T>::ParameterType
+// returns the optimal type to be used as a parameter for functions that take Ts
+// q) TypeTraits<T>::isConst
+// returns (at compile time) true if T is a const-qualified type
+// r) TypeTraits<T>::NonConstType
+// removes the 'const' qualifier from T, if any
+// s) TypeTraits<T>::isVolatile
+// returns (at compile time) true if T is a volatile-qualified type
+// t) TypeTraits<T>::NonVolatileType
+// removes the 'volatile' qualifier from T, if any
+// u) TypeTraits<T>::UnqualifiedType
+// removes both the 'const' and 'volatile' qualifiers from T, if any
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    class TypeTraits
+    {
+    public:
+        static const bool isPointer = Private::PointerTraits<T>::result;
+        typedef typename Private::PointerTraits<T>::PointeeType PointeeType;
+
+        static const bool isReference = Private::ReferenceTraits<T>::result;
+        typedef typename Private::ReferenceTraits<T>::ReferredType ReferredType;
+
+        static const bool isMemberPointer = Private::PToMTraits<T>::result;
+
+        static const bool isStdUnsignedInt =
+            TL::IndexOf<Private::StdUnsignedInts, T>::value >= 0;
+
+        static const bool isStdSignedInt =
+            TL::IndexOf<Private::StdSignedInts, T>::value >= 0;
+
+        static const bool isStdIntegral = isStdUnsignedInt || isStdSignedInt ||
+            TL::IndexOf<Private::StdOtherInts, T>::value >= 0;
+        static const bool isStdFloat = TL::IndexOf<Private::StdFloats, T>::value >= 0;
+        static const bool isStdArith = isStdIntegral || isStdFloat;
+        static const bool isStdFundamental = isStdArith || isStdFloat ||
+            Conversion<T, void>::sameType;
+
+        static const bool isUnsignedInt = isStdUnsignedInt || IsCustomUnsignedInt<T>::value;
+        static const bool isSignedInt = isStdSignedInt || IsCustomSignedInt<T>::value;
+        static const bool isIntegral = isStdIntegral || isUnsignedInt || isSignedInt;
+        static const bool isFloat = isStdFloat || IsCustomFloat<T>::value;
+        static const bool isArith = isIntegral || isFloat;
+        static const bool isFundamental = isStdFundamental || isArith || isFloat;
+
+        static const bool temp = isStdArith || isPointer || isMemberPointer;
+
+        typedef typename Select< ::Loki::TypeTraits<T>::temp,
+            T, typename Private::AddReference<T>::Result>::Result ParameterType;
+
+        static const bool isConst = Private::UnConst<T>::isConst;
+        typedef typename Private::UnConst<T>::Result NonConstType;
+        static const bool isVolatile = Private::UnVolatile<T>::isVolatile;
+        typedef typename Private::UnVolatile<T>::Result NonVolatileType;
+        typedef typename Private::UnVolatile<typename Private::UnConst<T>::Result>::Result
+            UnqualifiedType;
+    };
+
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// July 16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPETRAITS_INC_
Index: avida/current/source/third-party/Loki/Borland/Typelist.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/Typelist.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/Typelist.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,747 @@
+///////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+//     purpose is hereby granted without fee, provided that the above copyright
+//     notice appear in all copies and that both that copyright notice and this
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the
+//     suitability of this software for any purpose. It is provided "as is"
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef TYPELIST_INC_
+#define TYPELIST_INC_
+
+#include "NullType.h"
+#include "TypeManip.h"
+
+////////////////////////////////////////////////////////////////////////////////
+// macros TYPELIST_1, TYPELIST_2, ... TYPELIST_50
+// Each takes a number of arguments equal to its numeric suffix
+// The arguments are type names. TYPELIST_NN generates a typelist containing
+//     all types passed as arguments, in that order.
+// Example: TYPELIST_2(char, int) generates a type containing char and int.
+////////////////////////////////////////////////////////////////////////////////
+
+#define TYPELIST_1(T1) ::Loki::Typelist<T1, ::Loki::NullType>
+
+#define TYPELIST_2(T1, T2) ::Loki::Typelist<T1, TYPELIST_1(T2) >
+
+#define TYPELIST_3(T1, T2, T3) ::Loki::Typelist<T1, TYPELIST_2(T2, T3) >
+
+#define TYPELIST_4(T1, T2, T3, T4) \
+    ::Loki::Typelist<T1, TYPELIST_3(T2, T3, T4) >
+
+#define TYPELIST_5(T1, T2, T3, T4, T5) \
+    ::Loki::Typelist<T1, TYPELIST_4(T2, T3, T4, T5) >
+
+#define TYPELIST_6(T1, T2, T3, T4, T5, T6) \
+    ::Loki::Typelist<T1, TYPELIST_5(T2, T3, T4, T5, T6) >
+
+#define TYPELIST_7(T1, T2, T3, T4, T5, T6, T7) \
+    ::Loki::Typelist<T1, TYPELIST_6(T2, T3, T4, T5, T6, T7) >
+
+#define TYPELIST_8(T1, T2, T3, T4, T5, T6, T7, T8) \
+    ::Loki::Typelist<T1, TYPELIST_7(T2, T3, T4, T5, T6, T7, T8) >
+
+#define TYPELIST_9(T1, T2, T3, T4, T5, T6, T7, T8, T9) \
+    ::Loki::Typelist<T1, TYPELIST_8(T2, T3, T4, T5, T6, T7, T8, T9) >
+
+#define TYPELIST_10(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) \
+    ::Loki::Typelist<T1, TYPELIST_9(T2, T3, T4, T5, T6, T7, T8, T9, T10) >
+
+#define TYPELIST_11(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) \
+    ::Loki::Typelist<T1, TYPELIST_10(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) >
+
+#define TYPELIST_12(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) \
+    ::Loki::Typelist<T1, TYPELIST_11(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12) >
+
+#define TYPELIST_13(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \
+    ::Loki::Typelist<T1, TYPELIST_12(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13) >
+
+#define TYPELIST_14(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14) \
+    ::Loki::Typelist<T1, TYPELIST_13(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14) >
+
+#define TYPELIST_15(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15) \
+    ::Loki::Typelist<T1, TYPELIST_14(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15) >
+
+#define TYPELIST_16(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16) \
+    ::Loki::Typelist<T1, TYPELIST_15(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16) >
+
+#define TYPELIST_17(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17) \
+    ::Loki::Typelist<T1, TYPELIST_16(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17) >
+
+#define TYPELIST_18(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18) \
+    ::Loki::Typelist<T1, TYPELIST_17(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18) >
+
+#define TYPELIST_19(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19) \
+    ::Loki::Typelist<T1, TYPELIST_18(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19) >
+
+#define TYPELIST_20(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) \
+    ::Loki::Typelist<T1, TYPELIST_19(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) >
+
+#define TYPELIST_21(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) \
+    ::Loki::Typelist<T1, TYPELIST_20(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) >
+
+#define TYPELIST_22(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) \
+    ::Loki::Typelist<T1, TYPELIST_21(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) >
+
+#define TYPELIST_23(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) \
+    ::Loki::Typelist<T1, TYPELIST_22(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) >
+
+#define TYPELIST_24(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) \
+    ::Loki::Typelist<T1, TYPELIST_23(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) >
+
+#define TYPELIST_25(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25) \
+    ::Loki::Typelist<T1, TYPELIST_24(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25) >
+
+#define TYPELIST_26(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26) \
+    ::Loki::Typelist<T1, TYPELIST_25(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26) >
+
+#define TYPELIST_27(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27) \
+    ::Loki::Typelist<T1, TYPELIST_26(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27) >
+
+#define TYPELIST_28(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28) \
+    ::Loki::Typelist<T1, TYPELIST_27(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28) >
+
+#define TYPELIST_29(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29) \
+    ::Loki::Typelist<T1, TYPELIST_28(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29) >
+
+#define TYPELIST_30(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) \
+    ::Loki::Typelist<T1, TYPELIST_29(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) >
+
+#define TYPELIST_31(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) \
+    ::Loki::Typelist<T1, TYPELIST_30(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) >
+
+#define TYPELIST_32(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) \
+    ::Loki::Typelist<T1, TYPELIST_31(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) >
+
+#define TYPELIST_33(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) \
+    ::Loki::Typelist<T1, TYPELIST_32(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) >
+
+#define TYPELIST_34(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) \
+    ::Loki::Typelist<T1, TYPELIST_33(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) >
+
+#define TYPELIST_35(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35) \
+    ::Loki::Typelist<T1, TYPELIST_34(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35) >
+
+#define TYPELIST_36(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36) \
+    ::Loki::Typelist<T1, TYPELIST_35(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36) >
+
+#define TYPELIST_37(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37) \
+    ::Loki::Typelist<T1, TYPELIST_36(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37) >
+
+#define TYPELIST_38(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38) \
+    ::Loki::Typelist<T1, TYPELIST_37(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38) >
+
+#define TYPELIST_39(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39) \
+    ::Loki::Typelist<T1, TYPELIST_38(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39) >
+
+#define TYPELIST_40(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) \
+    ::Loki::Typelist<T1, TYPELIST_39(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) >
+
+#define TYPELIST_41(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) \
+    ::Loki::Typelist<T1, TYPELIST_40(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) >
+
+#define TYPELIST_42(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) \
+    ::Loki::Typelist<T1, TYPELIST_41(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) >
+
+#define TYPELIST_43(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) \
+    ::Loki::Typelist<T1, TYPELIST_42(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) >
+
+#define TYPELIST_44(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) \
+    ::Loki::Typelist<T1, TYPELIST_43(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) >
+
+#define TYPELIST_45(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45) \
+    ::Loki::Typelist<T1, TYPELIST_44(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45) >
+
+#define TYPELIST_46(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46) \
+    ::Loki::Typelist<T1, TYPELIST_45(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45) >
+
+#define TYPELIST_47(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47) \
+    ::Loki::Typelist<T1, TYPELIST_46(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47) >
+
+#define TYPELIST_48(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48) \
+    ::Loki::Typelist<T1, TYPELIST_47(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48) >
+
+#define TYPELIST_49(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49) \
+    ::Loki::Typelist<T1, TYPELIST_48(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49) >
+
+#define TYPELIST_50(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) \
+    ::Loki::Typelist<T1, TYPELIST_49(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) >
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template Typelist
+// The building block of typelists of any length
+// Use it through the TYPELIST_NN macros
+// Defines nested types:
+//     Head (first element, a non-typelist type by convention)
+//     Tail (second element, can be another typelist)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, class U>
+    struct Typelist
+    {
+       typedef T Head;
+       typedef U Tail;
+    };
+
+    namespace TL
+    {
+////////////////////////////////////////////////////////////////////////////////
+// class template Length
+// Computes the length of a typelist
+// Invocation (TList is a typelist):
+// Length<TList>::value
+// returns a compile-time constant containing the length of TList, not counting
+//     the end terminator (which by convention is NullType)
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList>
+        struct Length;
+
+        template <class T, class U>
+        struct Length< Typelist<T, U> >
+        {
+            static const int value = 1 + Length<U>::value;
+        };
+
+        template <>
+        struct Length<NullType>
+        {
+            static const int value = 0;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeAt
+// Finds the type at a given index in a typelist
+// Invocation (TList is a typelist and index is a compile-time integral
+//     constant):
+// TypeAt<TList, index>::Result
+// returns the type in position 'index' in TList
+// If you pass an out-of-bounds index, the result is a compile-time error
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, int index>
+        struct TypeAt
+        {
+            typedef typename TypeAt<typename TList::Tail, index - 1>::Result Result;
+        };
+
+        template <class Head, class Tail>
+        struct TypeAt<Typelist<Head, Tail>, 0>
+        {
+            typedef Head Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeAtNonStrict
+// Finds the type at a given index in a typelist
+// Invocations (TList is a typelist and index is a compile-time integral
+//     constant):
+// a) TypeAt<TList, index>::Result
+// returns the type in position 'index' in TList, or NullType if index is
+//     out-of-bounds
+// b) TypeAt<TList, index, D>::Result
+// returns the type in position 'index' in TList, or D if index is out-of-bounds
+////////////////////////////////////////////////////////////////////////////////
+
+        template<class TList, int index, class DefaultType = NullType>
+        struct TypeAtNonStrict
+        {
+            typedef typename
+                TypeAtNonStrict<typename TList::Tail, index - 1, DefaultType>::Result Result;
+        };
+
+        template<class Head, class Tail, class DefaultType>
+        struct TypeAtNonStrict<Typelist<Head, Tail>, 0, DefaultType>
+        {
+            typedef Head Result;
+        };
+
+        template<int index, class DefaultType>
+        struct TypeAtNonStrict<NullType, index, DefaultType>
+        {
+            typedef DefaultType Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IndexOf
+// Finds the index of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// IndexOf<TList, T>::value
+// returns the position of T in TList, or NullType if T is not found in TList
+////////////////////////////////////////////////////////////////////////////////
+
+        template<class TList, class T>
+        struct IndexOf
+        {
+        private:
+            static const int temp = IndexOf<typename TList::Tail, T>::value;
+
+        public:
+            static const int value = (temp == -1 ? -1 : 1 + temp);
+        };
+
+        template <class T, class Tail>
+        struct IndexOf<Typelist<T, Tail>, T>
+        {
+            static const int value = 0;
+        };
+
+        template <class T>
+        struct IndexOf<NullType, T>
+        {
+            static const int value = -1;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Append
+// Appends a type or a typelist to another
+// Invocation (TList is a typelist and T is either a type or a typelist):
+// Append<TList, T>::Result
+// returns a typelist that is TList followed by T and NullType-terminated
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T>
+        struct Append;
+
+        template <class Head, class Tail, class T>
+        struct Append<Typelist<Head, Tail>, T>
+        {
+            typedef Typelist<Head, typename Append<Tail, T>::Result> Result;
+        };
+
+        template <class Head, class Tail>
+        struct Append<NullType, Typelist<Head, Tail> >
+        {
+            typedef Typelist<Head, Tail> Result;
+        };
+
+        template <class T>
+        struct Append<NullType, T>
+        {
+            typedef TYPELIST_1(T) Result;
+        };
+
+        template <>
+        struct Append<NullType, NullType>
+        {
+            typedef NullType Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Erase
+// Erases the first occurence, if any, of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// Erase<TList, T>::Result
+// returns a typelist that is TList without the first occurence of T
+////////////////////////////////////////////////////////////////////////////////
+
+        template<class TList, class T>
+        struct Erase
+        {
+            typedef Typelist<typename TList::Head,
+                    typename Erase<typename TList::Tail, T>::Result> Result;
+        };
+
+        template <class T, class Tail>
+        struct Erase<Typelist<T, Tail>, T>
+        {
+            typedef Tail Result;
+        };
+
+        template <class T>
+        struct Erase<NullType, T>
+        {
+            typedef NullType Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template EraseAll
+// Erases all first occurences, if any, of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// EraseAll<TList, T>::Result
+// returns a typelist that is TList without any occurence of T
+////////////////////////////////////////////////////////////////////////////////
+
+        template<class TList, class T>
+        struct EraseAll
+        {
+            typedef Typelist<typename TList::Head,
+                    typename EraseAll<typename TList::Tail, T>::Result> Result;
+        };
+
+        template <class T, class Tail>
+        struct EraseAll<Typelist<T, Tail>, T>
+        {
+            typedef typename EraseAll<Tail, T>::Result Result;
+        };
+
+        template <class T>
+        struct EraseAll<NullType, T>
+        {
+            typedef NullType Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template NoDuplicates
+// Removes all duplicate types in a typelist
+// Invocation (TList is a typelist):
+// NoDuplicates<TList, T>::Result
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList>
+        struct NoDuplicates;
+
+        template <class Head, class Tail>
+        struct NoDuplicates< Typelist<Head, Tail> >
+        {
+        private:
+            typedef typename NoDuplicates<Tail>::Result L1;
+            typedef typename Erase<L1, Head>::Result L2;
+
+        public:
+            typedef Typelist<Head, L2> Result;
+        };
+
+        template <>
+        struct NoDuplicates<NullType>
+        {
+            typedef NullType Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Replace
+// Replaces the first occurence of a type in a typelist, with another type
+// Invocation (TList is a typelist, T, U are types):
+// Replace<TList, T, U>::Result
+// returns a typelist in which the first occurence of T is replaced with U
+////////////////////////////////////////////////////////////////////////////////
+
+        template<class TList, class T, class U>
+        struct Replace
+        {
+            typedef Typelist<typename TList::Head,
+                    typename Replace<typename TList::Tail, T, U>::Result> Result;
+        };
+
+        template <class T, class Tail, class U>
+        struct Replace<Typelist<T, Tail>, T, U>
+        {
+            typedef Typelist<U, Tail> Result;
+        };
+
+        template <class T, class U>
+        struct Replace<NullType, T, U>
+        {
+            typedef NullType Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ReplaceAll
+// Replaces all occurences of a type in a typelist, with another type
+// Invocation (TList is a typelist, T, U are types):
+// Replace<TList, T, U>::Result
+// returns a typelist in which all occurences of T is replaced with U
+////////////////////////////////////////////////////////////////////////////////
+
+        template<class TList, class T, class U>
+        struct ReplaceAll
+        {
+            typedef Typelist<typename TList::Head,
+                    typename ReplaceAll<typename TList::Tail, T, U>::Result>
+                Result;
+        };
+
+        template <class T, class Tail, class U>
+        struct ReplaceAll<Typelist<T, Tail>, T, U>
+        {
+            typedef Typelist<U, typename ReplaceAll<Tail, T, U>::Result> Result;
+        };
+
+        template <class T, class U>
+        struct ReplaceAll<NullType, T, U>
+        {
+            typedef NullType Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Reverse
+// Reverses a typelist
+// Invocation (TList is a typelist):
+// Reverse<TList>::Result
+// returns a typelist that is TList reversed
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList>
+        struct Reverse;
+
+        template <class Head, class Tail>
+        struct Reverse< Typelist<Head, Tail> >
+        {
+            typedef typename Append<
+                typename Reverse<Tail>::Result, Head>::Result Result;
+        };
+
+        template <>
+        struct Reverse<NullType>
+        {
+            typedef NullType Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template MostDerived
+// Finds the type in a typelist that is the most derived from a given type
+// Invocation (TList is a typelist, T is a type):
+// MostDerived<TList, T>::Result
+// returns the type in TList that's the most derived from T
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T>
+        struct MostDerived;
+
+        template <class Head, class Tail, class T>
+        struct MostDerived<Typelist<Head, Tail>, T>
+        {
+        private:
+            typedef typename MostDerived<Tail, T>::Result Candidate;
+
+        public:
+            typedef typename Select<
+                ::Loki::Conversion<const volatile Head *, const volatile Candidate *>::exists==1 &&
+                ::Loki::Conversion<const volatile Candidate *, const volatile void *>::sameType==0,
+                Head, Candidate>::Result Result;
+        };
+
+        template <class T>
+        struct MostDerived<NullType, T>
+        {
+            typedef T Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DerivedToFront
+// Arranges the types in a typelist so that the most derived types appear first
+// Invocation (TList is a typelist):
+// DerivedToFront<TList>::Result
+// returns the reordered TList
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList>
+        struct DerivedToFront;
+
+        template <class Head, class Tail>
+        struct DerivedToFront< Typelist<Head, Tail> >
+        {
+        private:
+            typedef typename MostDerived<Tail, Head>::Result TheMostDerived;
+            typedef typename Replace<Tail, TheMostDerived, Head>::Result Temp;
+            typedef typename DerivedToFront<Temp>::Result L;
+
+        public:
+            typedef Typelist<TheMostDerived, L> Result;
+        };
+
+        template <>
+        struct DerivedToFront<NullType>
+        {
+            typedef NullType Result;
+        };
+
+    }   // namespace TL
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June     09, 2001: Fix bug in parameter list of macros TYPELIST_23 to TYPELIST_27
+//          (credit due to Dave Taylor)
+// June     20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// November 22, 2001: fixed bug in DerivedToFront
+//          (credit due to Gianni Luciani who noticed the bug first;
+//          Adam Wilkshire;
+//          Friedrik Hedman who fixed the bug but didn't send the fix;
+//          Kevin Cline who sent the first actual fix)
+// July     16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPELIST_INC_
Index: avida/current/source/third-party/Loki/Borland/Visitor.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/Visitor.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/Visitor.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,203 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+//     purpose is hereby granted without fee, provided that the above copyright
+//     notice appear in all copies and that both that copyright notice and this
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the
+//     suitability of this software for any purpose. It is provided "as is"
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef VISITOR_INC_
+#define VISITOR_INC_
+
+#include "Typelist.h"
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitor
+// The base class of any Acyclic Visitor
+////////////////////////////////////////////////////////////////////////////////
+
+    class BaseVisitor
+    {
+    public:
+        virtual ~BaseVisitor() {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Visitor
+// The building block of Acyclic Visitor
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, typename R = void>
+    class Visitor
+    {
+    public:
+        typedef R ReturnType;
+        virtual ReturnType Visit(T&) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Visitor (specialization)
+// This specialization is not present in the book. It makes it easier to define
+// Visitors for multiple types in a shot by using a typelist. Example:
+//
+// class SomeVisitor :
+//     public BaseVisitor // required
+//     public Visitor<TYPELIST_2(RasterBitmap, Paragraph)>,
+//     public Visitor<Paragraph>
+// {
+// public:
+//     void Visit(RasterBitmap&); // visit a RasterBitmap
+//     void Visit(Paragraph &);   // visit a Paragraph
+// };
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class Head, class Tail, typename R>
+    class Visitor<Typelist<Head, Tail>, R>
+        : public Visitor<Head, R>, public Visitor<Tail, R>
+    {
+    public:
+        typedef R ReturnType;
+       // using Visitor<Head, R>::Visit;
+       // using Visitor<Tail, R>::Visit;
+    };
+
+    template <class Head, typename R>
+    class Visitor<Typelist<Head, NullType>, R> : public Visitor<Head, R>
+    {
+    public:
+        typedef R ReturnType;
+        using Visitor<Head, R>::Visit;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitorImpl
+// Implements non-strict visitation (you can implement only part of the Visit
+//     functions)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class TList, typename R = void> class BaseVisitorImpl;
+
+    template <class Head, class Tail, typename R>
+    class BaseVisitorImpl<Typelist<Head, Tail>, R>
+        : public Visitor<Head, R>
+        , public BaseVisitorImpl<Tail, R>
+    {
+    public:
+       // using BaseVisitorImpl<Tail, R>::Visit;
+
+        virtual R Visit(Head&)
+        { return R(); }
+    };
+
+    template <class Head, typename R>
+    class BaseVisitorImpl<Typelist<Head, NullType>, R>
+        : public Visitor<Head, R>
+    {
+    public:
+        virtual R Visit(Head&)
+        { return R(); }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitable
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename R, typename Visited>
+struct DefaultCatchAll
+{
+    static R OnUnknownVisitor(Visited&, BaseVisitor&)
+    { return R(); }
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitable
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename R = void,
+        template <typename, class> class CatchAll = DefaultCatchAll
+    >
+    class BaseVisitable
+    {
+    public:
+        typedef R ReturnType;
+        virtual ~BaseVisitable() {}
+        virtual ReturnType Accept(BaseVisitor&) = 0;
+
+    protected: // give access only to the hierarchy
+        template <class T>
+        static ReturnType AcceptImpl(T& visited, BaseVisitor& guest)
+        {
+            // Apply the Acyclic Visitor
+            if (Visitor<T>* p = dynamic_cast<Visitor<T>*>(&guest))
+            {
+                return p->Visit(visited);
+            }
+            return CatchAll<R, T>::OnUnknownVisitor(visited, guest);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFINE_VISITABLE
+// Put it in every class that you want to make visitable (in addition to
+//     deriving it from BaseVisitable<R>
+////////////////////////////////////////////////////////////////////////////////
+
+//### BCB port - added Loki:: prefix
+#define DEFINE_VISITABLE() \
+    virtual ReturnType Accept(Loki::BaseVisitor& guest) \
+    { return AcceptImpl(*this, guest); }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template CyclicVisitor
+// Put it in every class that you want to make visitable (in addition to
+//     deriving it from BaseVisitable<R>
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, class TList>
+    class CyclicVisitor : public Visitor<TList, R>
+    {
+    public:
+        typedef R ReturnType;
+        // using Visitor<TList, R>::Visit;
+
+        template <class Visited>
+        ReturnType GenericVisit(Visited& host)
+        {
+            Visitor<Visited, ReturnType>& subObj = *this;
+            return subObj.Visit(host);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFINE_CYCLIC_VISITABLE
+// Put it in every class that you want to make visitable by a cyclic visitor
+////////////////////////////////////////////////////////////////////////////////
+
+#define DEFINE_CYCLIC_VISITABLE(SomeVisitor) \
+    virtual SomeVisitor::ReturnType Accept(SomeVisitor& guest) \
+    { return guest.GenericVisit(*this); }
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// March 20: add default argument DefaultCatchAll to BaseVisitable
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // VISITOR_INC_
+
Index: avida/current/source/third-party/Loki/Borland/loki_typeinfo.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/loki_typeinfo.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/loki_typeinfo.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef TYPEINFO_INC_
+#define TYPEINFO_INC_
+
+#include <typeinfo>
+#include <cassert>
+#include "Typelist.h"
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class TypeInfo
+// Purpose: offer a first-class, comparable wrapper over std::type_info
+////////////////////////////////////////////////////////////////////////////////
+
+    class TypeInfo
+    {
+    public:
+
+        // Constructors
+        TypeInfo(); // needed for containers
+        TypeInfo(const std::type_info&); // non-explicit
+
+        // Access for the wrapped std::type_info
+        const std::type_info& Get() const;
+        // Compatibility functions
+        bool before(const TypeInfo& rhs) const;
+        const char* name() const;
+
+    private:
+        const std::type_info* pInfo_;
+    };
+    
+// Implementation
+    
+    inline TypeInfo::TypeInfo()
+    {
+        class Nil {};
+        pInfo_ = &typeid(Nil);
+        assert(pInfo_);
+    }
+    
+    inline TypeInfo::TypeInfo(const std::type_info& ti)
+    : pInfo_(&ti)
+    { assert(pInfo_); }
+    
+    inline bool TypeInfo::before(const TypeInfo& rhs) const
+    {
+        assert(pInfo_);
+        return pInfo_->before(*rhs.pInfo_);
+    }
+
+    inline const std::type_info& TypeInfo::Get() const
+    {
+        assert(pInfo_);
+        return *pInfo_;
+    }
+    
+    inline const char* TypeInfo::name() const
+    {
+        assert(pInfo_);
+        return pInfo_->name();
+    }
+
+// Comparison operators
+    
+    inline bool operator==(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return lhs.Get() == rhs.Get(); }
+
+    inline bool operator<(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return lhs.before(rhs); }
+
+    inline bool operator!=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs == rhs); }    
+    
+    inline bool operator>(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return rhs < lhs; }
+    
+    inline bool operator<=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs > rhs); }
+     
+    inline bool operator>=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs < rhs); }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// July 16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPEINFO_INC_
Index: avida/current/source/third-party/Loki/Borland/readme.txt
diff -u /dev/null avida/current/source/third-party/Loki/Borland/readme.txt:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/readme.txt	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,22 @@
+Last update: August 9, 2002
+
+Directions:
+
+To use Loki, simply extract the files from the archive, give your compiler access to their path, and include them appropriately in your code via #include.
+
+If you use the small object allocator directly or indirectly (through the Functor class) you must add SmallObj.cpp to your project/makefile.
+
+If you use Singletons with longevity you must add Singleton.cpp to your project/makefile.
+
+Compatibility:
+
+Loki has been tested with Metrowerks CodeWarrior Pro 6 under Windows. CodeWarrior has a problem with the Conversion template (see TypeManip.h) and, though it compiles it, it doesn't provide correct results. Consequently, the DerivedToFront algorithm in Typelist.h does not function. This affects the static dispatcher in Multimethods.h. As a fix, you must order the types (putting the most derived ones in the front) when providing the typelist argument to StaticDispatcher.
+
+Also, Loki has been ported to g++ 2.95.3 by Nick Thurn.
+
+
+This is a ported version of Loki to Borland C++ Builder 6.0. However, it uses standard C++, so it should work on the other compilers, as well.
+
+More info:
+
+http://moderncppdesign.com
Index: avida/current/source/third-party/Loki/Borland/static_check.h
diff -u /dev/null avida/current/source/third-party/Loki/Borland/static_check.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/Borland/static_check.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,60 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 9, 2002
+
+#ifndef STATIC_CHECK_INC_
+#define STATIC_CHECK_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// Helper structure for the STATIC_CHECK macro
+////////////////////////////////////////////////////////////////////////////////
+
+    template<int> struct CompileTimeError;
+    template<> struct CompileTimeError<true> {};
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// macro STATIC_CHECK
+// Invocation: STATIC_CHECK(expr, id)
+// where:
+// expr is a compile-time integral or pointer expression
+// id is a C++ identifier that does not need to be defined
+// If expr is zero, id will appear in a compile-time error message.
+////////////////////////////////////////////////////////////////////////////////
+
+template<bool>
+struct CompileTimeChecker
+{
+    CompileTimeChecker(...);
+};
+template<> struct CompileTimeChecker<false> {};
+#define STATIC_CHECK(expr, msg)\
+  {\
+    class ERROR_##msg {}; \
+    (void)sizeof(CompileTimeChecker<(expr)>(ERROR_##msg()));\
+  }
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// March 20, 2001: add extra parens to STATIC_CHECK - it looked like a fun 
+//     definition
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// July 16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // STATIC_CHECK_INC_
Index: avida/current/source/third-party/Loki/MSVC/1200/EmptyType.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1200/EmptyType.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MSVC/1200/EmptyType.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef EMPTYTYPE_INC_
+#define EMPTYTYPE_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class EmptyType
+// Used as a class type that doesn't hold anything
+// Useful as a strawman class
+////////////////////////////////////////////////////////////////////////////////
+
+    class EmptyType {};
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // EMPTYTYPE_INC_
Index: avida/current/source/third-party/Loki/MSVC/1200/NullType.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1200/NullType.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MSVC/1200/NullType.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: November 22, 2001
+
+#ifndef NULLTYPE_INC_
+#define NULLTYPE_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class NullType
+// Used as a placeholder for "no type here"
+// Useful as an end marker in typelists 
+////////////////////////////////////////////////////////////////////////////////
+
+    class NullType {};
+    
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// November 22, 2001: minor change to support porting to boost
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // NULLTYPE_INC_
Index: avida/current/source/third-party/Loki/MSVC/1200/TypeList.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1200/TypeList.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MSVC/1200/TypeList.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,789 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 22, 2001
+
+#ifndef TYPELIST_INC_
+#define TYPELIST_INC_
+
+#include "NullType.h"
+#include "TypeManip.h"
+
+////////////////////////////////////////////////////////////////////////////////
+// macros TYPELIST_1, TYPELIST_2, ... TYPELIST_50
+// Each takes a number of arguments equal to its numeric suffix
+// The arguments are type names. TYPELIST_NN generates a typelist containing 
+//     all types passed as arguments, in that order.
+// Example: TYPELIST_2(char, int) generates a type containing char and int.
+////////////////////////////////////////////////////////////////////////////////
+
+#define TYPELIST_1(T1) ::Loki::Typelist<T1, ::Loki::NullType>
+
+#define TYPELIST_2(T1, T2) ::Loki::Typelist<T1, TYPELIST_1(T2) >
+
+#define TYPELIST_3(T1, T2, T3) ::Loki::Typelist<T1, TYPELIST_2(T2, T3) >
+
+#define TYPELIST_4(T1, T2, T3, T4) \
+    ::Loki::Typelist<T1, TYPELIST_3(T2, T3, T4) >
+
+#define TYPELIST_5(T1, T2, T3, T4, T5) \
+    ::Loki::Typelist<T1, TYPELIST_4(T2, T3, T4, T5) >
+
+#define TYPELIST_6(T1, T2, T3, T4, T5, T6) \
+    ::Loki::Typelist<T1, TYPELIST_5(T2, T3, T4, T5, T6) >
+
+#define TYPELIST_7(T1, T2, T3, T4, T5, T6, T7) \
+    ::Loki::Typelist<T1, TYPELIST_6(T2, T3, T4, T5, T6, T7) >
+
+#define TYPELIST_8(T1, T2, T3, T4, T5, T6, T7, T8) \
+    ::Loki::Typelist<T1, TYPELIST_7(T2, T3, T4, T5, T6, T7, T8) >
+
+#define TYPELIST_9(T1, T2, T3, T4, T5, T6, T7, T8, T9) \
+    ::Loki::Typelist<T1, TYPELIST_8(T2, T3, T4, T5, T6, T7, T8, T9) >
+
+#define TYPELIST_10(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) \
+    ::Loki::Typelist<T1, TYPELIST_9(T2, T3, T4, T5, T6, T7, T8, T9, T10) >
+
+#define TYPELIST_11(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) \
+    ::Loki::Typelist<T1, TYPELIST_10(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) >
+
+#define TYPELIST_12(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) \
+    ::Loki::Typelist<T1, TYPELIST_11(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12) >
+
+#define TYPELIST_13(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \
+    ::Loki::Typelist<T1, TYPELIST_12(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13) >
+
+#define TYPELIST_14(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14) \
+    ::Loki::Typelist<T1, TYPELIST_13(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14) >
+
+#define TYPELIST_15(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15) \
+    ::Loki::Typelist<T1, TYPELIST_14(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15) >
+
+#define TYPELIST_16(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16) \
+    ::Loki::Typelist<T1, TYPELIST_15(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16) >
+
+#define TYPELIST_17(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17) \
+    ::Loki::Typelist<T1, TYPELIST_16(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17) >
+
+#define TYPELIST_18(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18) \
+    ::Loki::Typelist<T1, TYPELIST_17(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18) >
+
+#define TYPELIST_19(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19) \
+    ::Loki::Typelist<T1, TYPELIST_18(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19) >
+
+#define TYPELIST_20(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) \
+    ::Loki::Typelist<T1, TYPELIST_19(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) >
+
+#define TYPELIST_21(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) \
+    ::Loki::Typelist<T1, TYPELIST_20(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) >
+
+#define TYPELIST_22(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) \
+    ::Loki::Typelist<T1, TYPELIST_21(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) >
+
+#define TYPELIST_23(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) \
+    ::Loki::Typelist<T1, TYPELIST_22(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) >
+
+#define TYPELIST_24(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) \
+    ::Loki::Typelist<T1, TYPELIST_23(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) >
+
+#define TYPELIST_25(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25) \
+    ::Loki::Typelist<T1, TYPELIST_24(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25) >
+
+#define TYPELIST_26(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26) \
+    ::Loki::Typelist<T1, TYPELIST_25(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26) >
+
+#define TYPELIST_27(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27) \
+    ::Loki::Typelist<T1, TYPELIST_26(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27) >
+
+#define TYPELIST_28(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28) \
+    ::Loki::Typelist<T1, TYPELIST_27(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28) >
+
+#define TYPELIST_29(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29) \
+    ::Loki::Typelist<T1, TYPELIST_28(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29) >
+
+#define TYPELIST_30(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) \
+    ::Loki::Typelist<T1, TYPELIST_29(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) >
+
+#define TYPELIST_31(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) \
+    ::Loki::Typelist<T1, TYPELIST_30(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) >
+
+#define TYPELIST_32(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) \
+    ::Loki::Typelist<T1, TYPELIST_31(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) >
+
+#define TYPELIST_33(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) \
+    ::Loki::Typelist<T1, TYPELIST_32(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) >
+
+#define TYPELIST_34(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) \
+    ::Loki::Typelist<T1, TYPELIST_33(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) >
+
+#define TYPELIST_35(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35) \
+    ::Loki::Typelist<T1, TYPELIST_34(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35) >
+
+#define TYPELIST_36(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36) \
+    ::Loki::Typelist<T1, TYPELIST_35(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36) >
+
+#define TYPELIST_37(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37) \
+    ::Loki::Typelist<T1, TYPELIST_36(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37) >
+
+#define TYPELIST_38(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38) \
+    ::Loki::Typelist<T1, TYPELIST_37(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38) >
+
+#define TYPELIST_39(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39) \
+    ::Loki::Typelist<T1, TYPELIST_38(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39) >
+
+#define TYPELIST_40(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) \
+    ::Loki::Typelist<T1, TYPELIST_39(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) >
+
+#define TYPELIST_41(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) \
+    ::Loki::Typelist<T1, TYPELIST_40(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) >
+
+#define TYPELIST_42(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) \
+    ::Loki::Typelist<T1, TYPELIST_41(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) >
+
+#define TYPELIST_43(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) \
+    ::Loki::Typelist<T1, TYPELIST_42(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) >
+
+#define TYPELIST_44(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) \
+    ::Loki::Typelist<T1, TYPELIST_43(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) >
+
+#define TYPELIST_45(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45) \
+    ::Loki::Typelist<T1, TYPELIST_44(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45) >
+
+#define TYPELIST_46(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46) \
+    ::Loki::Typelist<T1, TYPELIST_45(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45) >
+
+#define TYPELIST_47(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47) \
+    ::Loki::Typelist<T1, TYPELIST_46(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47) >
+
+#define TYPELIST_48(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48) \
+    ::Loki::Typelist<T1, TYPELIST_47(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48) >
+
+#define TYPELIST_49(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49) \
+    ::Loki::Typelist<T1, TYPELIST_48(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49) >
+
+#define TYPELIST_50(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) \
+    ::Loki::Typelist<T1, TYPELIST_49(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) >
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template Typelist
+// The building block of typelists of any length
+// Use it through the TYPELIST_NN macros
+// Defines nested types:
+//     Head (first element, a non-typelist type by convention)
+//     Tail (second element, can be another typelist)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, class U>
+    struct Typelist
+    {
+       typedef T Head;
+       typedef U Tail;
+    };
+
+    namespace TL
+    {
+////////////////////////////////////////////////////////////////////////////////
+// class template Length
+// Computes the length of a typelist
+// Invocation (TList is a typelist):
+// Length<TList>::value
+// returns a compile-time constant containing the length of TList, not counting
+//     the end terminator (which by convention is NullType)
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList> struct Length;
+        template <> struct Length<NullType>
+        {
+            enum { value = 0 };
+        };
+        
+        template <class TList>
+        struct Length
+        {
+           enum { value = 1 + Length<typename TList::Tail>::value };
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeAt
+// Finds the type at a given index in a typelist
+// Invocation (TList is a typelist and index is a compile-time integral 
+//     constant):
+// TypeAt<TList, index>::Result
+// returns the type in position 'index' in TList
+// If you pass an out-of-bounds index, the result is a compile-time error
+////////////////////////////////////////////////////////////////////////////////
+
+   namespace TypeAt_ {
+
+      template<unsigned int i>
+      struct Index {
+         template<class TList>
+         struct Which {
+            typedef typename Index<i - 1>::Which<typename TList::Tail>::Result Result;
+         };
+      };
+
+      template<>
+      struct Index<0> {
+         template<class TList>
+         struct Which {
+            typedef typename TList::Head Result;
+         };
+      };
+
+   }  // namespace TypeAt_
+
+   template<class TList, unsigned int i>
+   struct TypeAt {
+      typedef typename TypeAt_::Index<i>::Which<TList>::Result Result;
+   };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeAtNonStrict
+// Finds the type at a given index in a typelist
+// Invocations (TList is a typelist and index is a compile-time integral 
+//     constant):
+// a) TypeAt<TList, index>::Result
+// returns the type in position 'index' in TList, or NullType if index is 
+//     out-of-bounds
+// b) TypeAt<TList, index, D>::Result
+// returns the type in position 'index' in TList, or D if index is out-of-bounds
+////////////////////////////////////////////////////////////////////////////////
+
+   namespace TypeAtNonStrict_ {
+
+      template<class TList>
+      struct ListType;
+
+      template<unsigned int index>
+      struct Index;
+
+      template<>
+      struct ListType<NullType> {
+         template<unsigned int index, typename DefaultType>
+         struct Remainder {
+            typedef DefaultType Result;
+         };
+      };
+
+      template<>
+      struct Index<0> {
+         template<class TList, typename DefaultType>
+         struct Remainder {
+            typedef typename TList::Head Result;
+         };
+      };
+
+      template<unsigned int index>
+      struct Index {
+         template<class TList, typename DefaultType>
+         struct Remainder {
+            enum { isSameType = Conversion<NullType, typename TList::Tail>::sameType };
+            typedef typename Select<isSameType, NullType, typename Index<index - 1>::Remainder<typename TList::Tail, DefaultType>::Result>::Result Result;
+         };
+      };
+
+      template<class TList>
+      struct ListType {
+         template<unsigned int index, typename DefaultType>
+         struct Remainder {
+            typedef typename Index<index>::Remainder<TList, DefaultType>::Result Result;
+         };
+      };
+ 
+   }  // namespace TypeAtNonStrict_
+
+   template<class TList, unsigned int index, typename DefaultType = NullType>
+   struct TypeAtNonStrict {
+      typedef typename TypeAtNonStrict_::ListType<TList>::Remainder<index, DefaultType>::Result Result;
+   };
+
+}  // namespace TL
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IndexOf
+// Finds the index of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// IndexOf<TList, T>::value
+// returns the position of T in TList, or NullType if T is not found in TList
+////////////////////////////////////////////////////////////////////////////////
+
+namespace Private {
+
+namespace IndexOf_ {
+
+template<typename TList>
+struct Head {
+   typedef typename TList::Head Result;
+};
+
+template<>
+struct Head<NullType> {
+   typedef void Result;
+};
+
+struct IsNull {
+   enum { value = -1 };
+};
+
+struct IsTHead {
+   enum { value = 0 };
+};
+
+template<typename TList, typename T>
+struct IsNotTHead {
+   typedef typename TList::Tail Tail;
+   typedef typename Select<is_same<Tail, NullType>::result, 
+                           IsNull, 
+                           typename Select<is_same<typename Head<Tail>::Result, T>::result, 
+                                           IsTHead, IsNotTHead<Tail, T>
+                                          >::Result
+                          >::Result chooser;
+   enum { temp = chooser::value };
+   enum { value = temp == -1 ? -1 : 1 + temp };
+};
+
+template<typename TList, typename T>
+struct IsNotNull {
+   typedef typename Select<is_same<typename TList::Head, T>::result, 
+                           IsTHead, 
+                           IsNotTHead<TList, T>
+                           >::Result chooser;
+   enum { value = chooser::value };
+};
+
+}  // namespace IndexOf_
+
+}  // namespace Private
+
+namespace TL {
+
+template<class TList, class T>
+struct IndexOf {
+private:
+   typedef typename Select<Private::is_same<TList, NullType>::result, 
+                           Private::IndexOf_::IsNull, 
+                           Private::IndexOf_::IsNotNull<TList, T>
+                          >::Result chooser;
+public:
+   enum { value = chooser::value };
+};
+                       
+////////////////////////////////////////////////////////////////////////////////
+// class template Append
+// Appends a type or a typelist to another
+// Invocation (TList is a typelist and T is either a type or a typelist):
+// Append<TList, T>::Result
+// returns a typelist that is TList followed by T and NullType-terminated
+////////////////////////////////////////////////////////////////////////////////
+
+   namespace Append_ {
+
+   template<class T>
+   struct Helper {
+      struct big { char i[2]; };
+      template<class Head, class Tail>
+      static char Test(const Typelist<Head, Tail>&);
+      static big Test(...);
+      static T makeT();
+   };
+
+   }  // namespace Append_
+
+   template<class TList, class T> 
+   struct Append;
+        
+   template<> 
+   struct Append<NullType, NullType> {
+      typedef NullType Result;
+   };
+
+   template<class TList, class T>
+   struct Append {
+   private:
+      enum { T_is_list = sizeof(Append_::Helper<T>::Test(Append_::Helper<T>::MakeT())) == sizeof(char) };
+      enum { TList_is_null = Conversion<TList, NullType>::sameType };
+      typedef typename Select<TList_is_null & T_is_list, T, NullType>::Result Result1;
+      typedef typename Select<TList_is_null & !T_is_list, Typelist<T, NullType>, Result1>::Result Result2;
+   public:
+      typedef typename Select<!TList_is_null & !T_is_list, Typelist<typename TList::Head, typename Append<typename TList::Tail, T>::Result>, Result2>::Result Result;
+   };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template Erase
+// Erases the first occurence, if any, of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// Erase<TList, T>::Result
+// returns a typelist that is TList without the first occurence of T
+////////////////////////////////////////////////////////////////////////////////
+
+      template<class TList, class T>
+      struct Erase {
+      private:
+         enum { TList_is_null = Conversion<TList, NullType>::sameType };
+         enum { Head_is_T = Conversion<typename TList::Head, T>::sameType };
+         typedef typename Select<!TList_is_null & Head_is_T, typename TList::Tail, NullType>::Result Result1;
+      public:
+         typedef typename Select<!TList_is_null & !Head_is_T, Typelist<typename TList::Head, typename Erase<typename TList::Tail, T>::Result>, Result1>::Result Result;
+      };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template EraseAll
+// Erases all first occurences, if any, of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// EraseAll<TList, T>::Result
+// returns a typelist that is TList without any occurence of T
+////////////////////////////////////////////////////////////////////////////////
+
+      template<class TList, class T>
+      struct EraseAll {
+      private:
+         enum { TList_is_null = Conversion<TList, NullType>::sameType };
+         enum { Head_is_T = Conversion<typename TList::Head, T>::sameType };
+         typedef typename Select<!TList_is_null & Head_is_T, typename EraseAll<typename TList::Tail, T>::Result, NullType>::Result Result1;
+      public:
+         typedef typename Select<!TList_is_null & !Head_is_T, Typelist<typename TList::Head, typename EraseAll<typename TList::Tail, T>::Result>, Result1>::Result Result;
+      };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template NoDuplicates
+// Removes all duplicate types in a typelist
+// Invocation (TList is a typelist):
+// NoDuplicates<TList, T>::Result
+////////////////////////////////////////////////////////////////////////////////
+
+   template<class TList>
+   struct NoDuplicates;
+
+   template<>
+   struct NoDuplicates<NullType> {
+      typedef NullType Result;
+   };
+
+   template<class TList>
+   struct NoDuplicates {
+   private:
+      typedef typename NoDuplicates<typename TList::Tail>::Result L1;
+      typedef typename Erase<L1, typename TList::Head>::Result L2;
+   public:
+      typedef Typelist<typename TList::Head, L2> Result;
+   };
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Replace
+// Replaces the first occurence of a type in a typelist, with another type
+// Invocation (TList is a typelist, T, U are types):
+// Replace<TList, T, U>::Result
+// returns a typelist in which the first occurence of T is replaced with U
+////////////////////////////////////////////////////////////////////////////////
+
+      template<class TList, class T, class U> 
+      struct Replace {
+      private:
+         enum { TList_is_null = Conversion<TList, NullType>::sameType };
+         enum { Head_is_T = Conversion<typename TList::Head, T>::sameType };
+         typedef typename Select<!TList_is_null & Head_is_T, Typelist<U, typename TList::Tail>, NullType>::Result Result1;
+      public:
+         typedef typename Select<!TList_is_null & !Head_is_T, Typelist<typename TList::Head, typename Replace<typename TList::Tail, T, U>::Result>, Result1>::Result Result;
+      };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template ReplaceAll
+// Replaces all occurences of a type in a typelist, with another type
+// Invocation (TList is a typelist, T, U are types):
+// Replace<TList, T, U>::Result
+// returns a typelist in which all occurences of T is replaced with U
+////////////////////////////////////////////////////////////////////////////////
+
+   template<class TList, class T, class U> 
+   struct ReplaceAll {
+      private:
+         enum { TList_is_null = Conversion<TList, NullType>::sameType };
+         enum { Head_is_T = Conversion<typename TList::Head, T>::sameType };
+         typedef typename Select<!TList_is_null & Head_is_T, Typelist<U, typename ReplaceAll<typename TList::Tail, T, U>::Result>, NullType>::Result Result1;
+      public:
+         typedef typename Select<!TList_is_null & !Head_is_T, Typelist<typename TList::Head, typename ReplaceAll<typename TList::Tail, T, U>::Result>, Result1>::Result Result;
+   };
+              
+////////////////////////////////////////////////////////////////////////////////
+// class template Reverse
+// Reverses a typelist
+// Invocation (TList is a typelist):
+// Reverse<TList>::Result
+// returns a typelist that is TList reversed
+////////////////////////////////////////////////////////////////////////////////
+
+      template<class TList>
+      struct Reverse {
+      private:
+         enum { list_of_one = Conversion<typename TList::Tail, NullType>::sameType };
+      public:
+         typedef typename Select<list_of_one, 
+                                 TList, 
+                                 typename Append<typename Reverse<typename TList::Tail>::Result, 
+                                                 typename TList::Head
+                                                >::Result
+                                >::Result Result;
+      };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template MostDerived
+// Finds the type in a typelist that is the most derived from a given type
+// Invocation (TList is a typelist, T is a type):
+// Replace<TList, T>::Result
+// returns the type in TList that's the most derived from T
+////////////////////////////////////////////////////////////////////////////////
+
+      template<class TList, class T>
+      struct MostDerived {
+      private:
+         enum { TList_is_null = Conversion<TList, NullType>::sameType };
+         typedef typename Select<TList_is_null, T, typename MostDerived<typename TList::Tail, T>::Result>::Result Candidate;
+      public:
+         typedef typename Select<TList_is_null, T, 
+                                 typename Select<SUPERSUBCLASS(Candidate, typename TList::Head),
+                                                 typename TList::Head, Candidate
+                                                >::Result
+                                >::Result Result;
+      };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template DerivedToFront
+// Arranges the types in a typelist so that the most derived types appear first
+// Invocation (TList is a typelist):
+// DerivedToFront<TList>::Result
+// returns the reordered TList 
+////////////////////////////////////////////////////////////////////////////////
+
+   namespace DerivedToFront_ {
+
+      template<class TList>
+      struct ListType {
+      };
+
+      template<>
+      struct ListType<NullType> {
+         typedef NullType Result;
+      };
+
+   }  // namespace DerivedToFront_
+
+   template<class TList> 
+   struct DerivedToFront;
+        
+   template<>
+   struct DerivedToFront<NullType> {
+      typedef NullType Result;
+   };
+        
+   template<class TList>
+   struct DerivedToFront {
+   private:
+      typedef typename MostDerived<typename TList::Tail, 
+                                 typename TList::Head>::Result TheMostDerived;
+      typedef typename Replace<typename TList::Tail, TheMostDerived, 
+                               typename TList::Head>::Result L;
+   public:
+      typedef Typelist<TheMostDerived, L> Result;
+   };
+        
+   }   // namespace TL
+
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 09, 2001: Fix bug in parameter list of macros TYPELIST_23 to TYPELIST_27
+//      (credit due to Dave Taylor)
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// August 22, 2001: ported by Jonathan H Lundquist to MSVC
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPELIST_INC_
+
Index: avida/current/source/third-party/Loki/MSVC/1200/TypeManip.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1200/TypeManip.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MSVC/1200/TypeManip.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,268 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: August 22, 2001
+
+#ifndef TYPEMANIP_INC_
+#define TYPEMANIP_INC_
+
+namespace Loki {
+
+   namespace Private {
+
+      struct big { char c[2]; };
+
+      struct any {
+         template<typename T>
+         any(const T&);
+      };
+
+   }  // namespace Private
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Int2Type
+// Converts each integral constant into a unique type
+// Invocation: Int2Type<v> where v is a compile-time constant integral
+// Defines 'value', an enum that evaluates to v
+////////////////////////////////////////////////////////////////////////////////
+
+    template <int v>
+    struct Int2Type
+    {
+        enum { value = v };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template Type2Type
+// Converts each type into a unique, insipid type
+// Invocation Type2Type<T> where T is a type
+// Defines the type OriginalType which maps back to T
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct Type2Type
+    {
+        typedef T OriginalType;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template Select
+// Selects one of two types based upon a boolean constant
+// Invocation: Select<flag, T, U>::Result
+// where:
+// flag is a compile-time boolean constant
+// T and U are types
+// Result evaluates to T if flag is true, and to U otherwise.
+////////////////////////////////////////////////////////////////////////////////
+
+namespace Private {
+
+namespace Select_ {
+
+struct ChooseT {
+   template<typename T, typename U>
+   struct Choose {
+      typedef T Result;
+   };
+};
+
+struct ChooseU {
+   template<typename T, typename U>
+   struct Choose {
+      typedef U Result;
+   };
+};
+
+template<bool flag>
+struct Selector {
+   typedef ChooseT Result;
+};
+
+template<>
+struct Selector<false> {
+   typedef ChooseU Result;
+};
+
+} // namespace Select_
+
+} // namespace Private
+
+template<bool flag, typename T, typename U>
+struct Select {
+private:
+   typedef typename Private::Select_::Selector<flag>::Result selector;
+public:
+   typedef typename selector::Choose<T, U>::Result Result;
+};
+
+namespace Private {
+
+template<typename T>
+struct is_void {
+   enum { value = 0 };
+};
+
+template<>
+struct is_void<void> {
+   enum { value = 1 };
+};
+
+namespace is_same_ {
+
+template<typename T>
+char test_same(T*, T*);
+
+template<typename T>
+big test_same(T*, any);
+
+template<typename T, typename U>
+struct is_same_imp {
+   static T t;
+   static U u;
+   enum { result = sizeof(test_same(&t, &u)) == sizeof(char) };
+};
+
+}  // namespace is_same_
+
+template<typename T, typename U>
+struct is_same {
+   enum { voidT = is_void<T>::value };
+   enum { voidU = is_void<U>::value };
+   struct BothVoid {
+      enum { result = 1 };
+   };
+   struct OneVoid {
+      enum { result = 0 };
+   };
+   typedef typename Select<voidT & voidU, 
+                           BothVoid,
+                           typename Select<voidT | voidU,
+                                           OneVoid,
+                                           is_same_::is_same_imp<T, U>
+                                          >::Result
+                          >::Result tester;
+   enum { result = tester::result };
+};
+
+}  // namespace Private
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Conversion
+// Figures out the conversion relationships between two types
+// Invocations (T and U are types):
+// a) Conversion<T, U>::exists
+// returns (at compile time) true if there is an implicit conversion from T
+// to U (example: Derived to Base)
+// b) Conversion<T, U>::exists2Way
+// returns (at compile time) true if there are both conversions from T
+// to U and from U to T (example: int to char and back)
+// c) Conversion<T, U>::sameType
+// returns (at compile time) true if T and U represent the same type
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+namespace Private {
+
+namespace Conversion_ {
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4181)
+#pragma warning(disable:4800)
+#pragma warning(disable:4244)
+#endif
+template<typename T, typename U>
+struct Determine {
+   template<typename X, typename Y>
+   struct tester {
+      static char test(X, Y);
+      static big test(any, any);
+   };
+   static T t;
+   static U u;
+   enum { exists = sizeof(tester<T, U>::test(t, t)) == sizeof(char) };
+   enum { exists2Way = exists & (sizeof(tester<U, T>::test(u, u)) == sizeof(char)) };
+   enum { sameType = exists2Way & is_same<T, U>::result };
+};
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+}  // namespace Conversion_
+
+}  // namespace Private
+
+template<typename T, typename U>
+struct Conversion {
+private:
+   enum { voidT = Private::is_void<T>::value };
+   enum { voidU = Private::is_void<U>::value };
+
+   struct both_void {
+      enum { exists = 1, exists2Way = 1, sameType = 1 };
+   };
+
+   struct one_void {
+      enum { exists = 1, exists2Way = 0, sameType = 0 };
+   };
+
+   typedef typename Select<voidT & voidU,
+                           both_void,
+                           typename Select<voidT | voidU,
+                                           one_void,
+                                           Private::Conversion_::Determine<T, U>
+                                          >::Result
+                          >::Result Chooser;
+public:
+   enum { exists = Chooser::exists };
+   enum { exists2Way = Chooser::exists2Way };
+   enum { sameType = Chooser::sameType };
+};
+
+}  // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// macro SUPERSUBCLASS
+// Invocation: SUPERSUBCLASS(B, D) where B and D are types. 
+// Returns true if B is a public base of D, or if B and D are aliases of the 
+// same type.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+#define SUPERSUBCLASS(T, U) \
+    (::Loki::Conversion<const U*, const T*>::exists && \
+    !::Loki::Conversion<const T*, const void*>::sameType)
+
+////////////////////////////////////////////////////////////////////////////////
+// macro SUPERSUBCLASS
+// Invocation: SUPERSUBCLASS(B, D) where B and D are types. 
+// Returns true if B is a public base of D.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+#define SUPERSUBCLASS_STRICT(T, U) \
+    (SUPERSUBCLASS(T, U) && \
+    !::Loki::Conversion<const T, const U>::sameType)
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// August 22, 2001: ported by Jonathan H Lundquist to MSVC
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPEMANIP_INC_
Index: avida/current/source/third-party/Loki/MSVC/1200/TypeTraits.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1200/TypeTraits.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MSVC/1200/TypeTraits.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,374 @@
+#ifndef TYPETRAITS_INC_
+#define TYPETRAITS_INC_
+
+#include "Typelist.h"
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomUnsignedInt
+// Offers a means to integrate nonstandard built-in unsigned integral types
+// (such as unsigned __int64 or unsigned long long int) with the TypeTraits 
+//     class template defined below.
+// Invocation: IsCustomUnsignedInt<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in unsigned
+//     integral type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomUnsignedInt
+    {
+        enum { value = 0 };
+    };
+
+#ifdef _MSC_VER
+    template<>
+    struct IsCustomUnsignedInt<unsigned __int64> {
+       enum { value = 1 };
+    };
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomSignedInt
+// Offers a means to integrate nonstandard built-in unsigned integral types
+// (such as unsigned __int64 or unsigned long long int) with the TypeTraits 
+//     class template defined below.
+// Invocation: IsCustomSignedInt<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in signed
+//     integral type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomSignedInt
+    {
+        enum { value = 0 };
+    };        
+
+#ifdef _MSC_VER
+    template<>
+    struct IsCustomSignedInt<__int64> {
+       enum { value = 1 };
+    };
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomFloat
+// Offers a means to integrate nonstandard floating point types with the
+//     TypeTraits class template defined below.
+// Invocation: IsCustomFloat<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in
+//     floating point type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomFloat
+    {
+        enum { value = 0 };
+    };        
+
+////////////////////////////////////////////////////////////////////////////////
+// Helper types for class template TypeTraits defined below
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        typedef TYPELIST_4(unsigned char, unsigned short int,
+           unsigned int, unsigned long int) StdUnsignedInts;
+        typedef TYPELIST_4(signed char, short int,
+           int, long int) StdSignedInts;
+        typedef TYPELIST_3(bool, char, wchar_t) StdOtherInts;
+        typedef TYPELIST_3(float, double, long double) StdFloats;
+
+        char test_ptr(const volatile void*, const volatile void*);
+        big test_ptr(any, any);
+
+        template<typename T>
+        T* unrefptr(T&);
+
+        char test_const(const volatile void*);
+        big test_const(volatile void*);
+        char test_volatile(const volatile void*);
+        big test_volatile(const void*);
+
+        template<typename V, typename X>
+        char test_mptr(V X::*, any);
+
+        big test_mptr(any, any);
+
+        template<bool isReference>
+        struct AddReferenceImp {
+           template<typename T>
+           struct Imp {
+              typedef T Result;
+           };
+        };
+
+        template<>
+        struct AddReferenceImp<false> {
+           template<typename T>
+           struct Imp {
+              typedef T& Result;
+           };
+        };
+
+#ifndef _MSC_VER
+        template <class U> struct PointerTraits
+        {
+            enum { result = false };
+            typedef NullType PointeeType;
+        };
+        
+        template <class U> struct PointerTraits<U*>
+        {
+            enum { result = true };
+            typedef U PointeeType;
+        };
+#else
+        template<typename U>
+        struct PointerTraits {
+        private:
+           static U u;
+        public:
+           typedef void PointeeType;  // unable to determine correctly
+           enum { result = sizeof(Private::test_ptr(&u, u)) == sizeof(char) };
+        };
+
+        template<>
+        struct PointerTraits<void> {
+           typedef void PointeeType;
+           enum { result = 0 };
+        };
+#endif
+#ifndef _MSC_VER
+        template <class U> struct ReferenceTraits
+        {
+            enum { result = false };
+            typedef U ReferredType;
+        };
+        
+        template <class U> struct ReferenceTraits<U&>
+        {
+            enum { result = true };
+            typedef U ReferredType;
+        };
+#else
+#pragma warning(push)
+#pragma warning(disable:4181)
+        template<typename U>
+        struct ReferenceTraits {
+           typedef U const volatile cv_u;
+           static cv_u u;
+        public:
+           enum { result = (sizeof(Private::test_const(&u)) != sizeof(char)) 
+                  | (sizeof(Private::test_volatile(&u)) != sizeof(char)) };
+           typedef void ReferredType; // unable to determine correctly
+        };
+#pragma warning(pop)
+
+        template<>
+        struct ReferenceTraits<void> {
+           enum { result = 0 };
+           typedef void ReferredType;
+        };
+#endif
+#ifndef _MSC_VER
+        template <class U> struct PToMTraits
+        {
+            enum { result = false };
+        };
+        
+        template <class U, class V>
+        struct PToMTraits<U V::*>
+        {
+            enum { result = true };
+        };
+#else
+        template<typename U> 
+        struct PToMTraits {
+        private:
+           static U u;
+        public:
+           enum { result = sizeof(Private::test_mptr(u, &u)) == sizeof(char) };
+        };
+
+        template<>
+        struct PToMTraits<void> {
+           enum { result = 0 };
+        };
+#endif
+#ifndef _MSC_VER
+        template <class U> struct UnConst
+        {
+            typedef U Result;
+            enum { isConst = 0 };
+        };
+        
+        template <class U> struct UnConst<const U>
+        {
+            typedef U Result;
+            enum { isConst = 1 };
+        };
+#else
+        template<typename U>
+        struct UnConst {
+        private:
+           static U u;
+        public:
+           typedef void Result; // unable to determine correctly
+           enum { isConst = sizeof(Private::test_const(Private::unrefptr(u))) == sizeof(char) };
+        };
+
+        template<>
+        struct UnConst<void> {
+           typedef void Result;
+           enum { isConst = 0 };
+        };
+#endif
+#ifndef _MSC_VER
+        template <class U> struct UnVolatile
+        {
+            typedef U Result;
+            enum { isVolatile = 0 };
+        };
+        
+        template <class U> struct UnVolatile<volatile U>
+        {
+            typedef U Result;
+            enum { isVolatile = 1 };
+        };
+#else
+        template<typename U>
+        struct UnVolatile {
+        private:
+           static U u;
+        public:
+           typedef void Result; // unable to determine correctly
+           enum { isVolatile = sizeof(Private::test_volatile(Private::unrefptr(u))) == sizeof(char) };
+        };
+
+        template<>
+        struct UnVolatile<void> {
+           typedef void Result;
+           enum { isVolatile = 0 };
+        };
+#endif
+        template<typename U, bool isReference>
+        struct AddReference {
+           typedef typename Private::AddReferenceImp<isReference>::template Imp<U>::Result Result;
+        };
+
+        template<>
+        struct AddReference<void, false> {
+           typedef void Result;
+        };
+    }
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeTraits
+// Figures out various properties of any given type
+// Invocations (T is a type):
+// a) TypeTraits<T>::isPointer
+// returns (at compile time) true if T is a pointer type
+// b) TypeTraits<T>::PointeeType
+// returns the type to which T points is T is a pointer type, NullType otherwise
+// a) TypeTraits<T>::isReference
+// returns (at compile time) true if T is a reference type
+// b) TypeTraits<T>::ReferredType
+// returns the type to which T refers is T is a reference type, NullType
+// otherwise
+// c) TypeTraits<T>::isMemberPointer
+// returns (at compile time) true if T is a pointer to member type
+// d) TypeTraits<T>::isStdUnsignedInt
+// returns (at compile time) true if T is a standard unsigned integral type
+// e) TypeTraits<T>::isStdSignedInt
+// returns (at compile time) true if T is a standard signed integral type
+// f) TypeTraits<T>::isStdIntegral
+// returns (at compile time) true if T is a standard integral type
+// g) TypeTraits<T>::isStdFloat
+// returns (at compile time) true if T is a standard floating-point type
+// h) TypeTraits<T>::isStdArith
+// returns (at compile time) true if T is a standard arithmetic type
+// i) TypeTraits<T>::isStdFundamental
+// returns (at compile time) true if T is a standard fundamental type
+// j) TypeTraits<T>::isUnsignedInt
+// returns (at compile time) true if T is a unsigned integral type
+// k) TypeTraits<T>::isSignedInt
+// returns (at compile time) true if T is a signed integral type
+// l) TypeTraits<T>::isIntegral
+// returns (at compile time) true if T is a integral type
+// m) TypeTraits<T>::isFloat
+// returns (at compile time) true if T is a floating-point type
+// n) TypeTraits<T>::isArith
+// returns (at compile time) true if T is a arithmetic type
+// o) TypeTraits<T>::isFundamental
+// returns (at compile time) true if T is a fundamental type
+// p) TypeTraits<T>::ParameterType
+// returns the optimal type to be used as a parameter for functions that take Ts
+// q) TypeTraits<T>::isConst
+// returns (at compile time) true if T is a const-qualified type
+// r) TypeTraits<T>::NonConstType
+// removes the 'const' qualifier from T, if any
+// s) TypeTraits<T>::isVolatile
+// returns (at compile time) true if T is a volatile-qualified type
+// t) TypeTraits<T>::NonVolatileType
+// removes the 'volatile' qualifier from T, if any
+// u) TypeTraits<T>::UnqualifiedType
+// removes both the 'const' and 'volatile' qualifiers from T, if any
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    class TypeTraits
+    {
+    public:
+        enum { isPointer = Private::PointerTraits<T>::result };
+        typedef typename Private::PointerTraits<T>::PointeeType PointeeType;
+
+        enum { isReference = Private::ReferenceTraits<T>::result };
+        typedef typename Private::ReferenceTraits<T>::ReferredType ReferredType;
+        
+        enum { isMemberPointer = Private::PToMTraits<T>::result };
+    
+        enum { isStdUnsignedInt = 
+            TL::IndexOf<Private::StdUnsignedInts, T>::value >= 0 };
+        enum { isStdSignedInt = 
+            TL::IndexOf<Private::StdSignedInts, T>::value >= 0 };
+        enum { isStdIntegral = isStdUnsignedInt || isStdSignedInt ||
+            TL::IndexOf<Private::StdOtherInts, T>::value >= 0 };
+        enum { isStdFloat = TL::IndexOf<Private::StdFloats, T>::value >= 0 };
+        enum { isStdArith = isStdIntegral || isStdFloat };
+        enum { isStdFundamental = isStdArith || isStdFloat || 
+            Conversion<T, void>::sameType };
+            
+        enum { isUnsignedInt = isStdUnsignedInt || IsCustomUnsignedInt<T>::value };
+        enum { isSignedInt = isStdSignedInt || IsCustomSignedInt<T>::value };
+        enum { isIntegral = isStdIntegral || isUnsignedInt || isSignedInt };
+        enum { isFloat = isStdFloat || IsCustomFloat<T>::value };
+        enum { isArith = isIntegral || isFloat };
+        enum { isFundamental = isStdFundamental || isArith || isFloat };
+        
+        typedef typename Select<isStdArith || isPointer || isMemberPointer, T, 
+           typename Private::AddReference<T, isReference>::Result
+          >::Result ParameterType;
+        
+        enum { isConst = Private::UnConst<T>::isConst };
+        typedef typename Private::UnConst<T>::Result NonConstType;
+        enum { isVolatile = Private::UnVolatile<T>::isVolatile };
+        typedef typename Private::UnVolatile<T>::Result NonVolatileType;
+        typedef typename Private::UnVolatile<typename Private::UnConst<T>::Result>::Result 
+            UnqualifiedType;
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// August 22, 2001: ported by Jonathan H Lundquist to MSVC
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPETRAITS_INC_
Index: avida/current/source/third-party/Loki/MSVC/1200/portby.txt
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1200/portby.txt:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MSVC/1200/portby.txt	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,2 @@
+MSVC6
+Jonathan H. Lundquist
\ No newline at end of file
Index: avida/current/source/third-party/Loki/MSVC/1300/AbstractFactory.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/AbstractFactory.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/AbstractFactory.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,165 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef ABSTRACTFACTORY_INC_
+#define ABSTRACTFACTORY_INC_
+
+#include "Typelist.h"
+#include "TypeManip.h"
+#include "HierarchyGenerators.h"
+
+#include <cassert>
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AbstractFactoryUnit
+// The building block of an Abstract Factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class AbstractFactoryUnit
+    {
+    public:
+        virtual T* DoCreate(Type2Type<T>) = 0;
+        virtual ~AbstractFactoryUnit() {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AbstractFactory
+// Defines an Abstract Factory interface starting from a typelist
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class TList,
+        template <class> class Unit = AbstractFactoryUnit
+    >
+    class AbstractFactory : public GenScatterHierarchy<TList, Unit>
+    {
+    public:
+        typedef TList ProductList;
+        
+        template <class T> T* Create()
+        {
+            Unit<T>& unit = *this;
+            return unit.DoCreate(Type2Type<T>());
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template OpNewFactoryUnit
+// Creates an object by invoking the new operator
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ConcreteProduct, class Base>
+    class OpNewFactoryUnit : public Base
+    {
+        typedef typename Base::ProductList BaseProductList;
+    
+    protected:
+        typedef typename BaseProductList::Tail ProductList;
+    
+    public:
+        typedef typename BaseProductList::Head AbstractProduct;
+        ConcreteProduct* DoCreate(Type2Type<AbstractProduct>)
+        {
+            return new ConcreteProduct;
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template PrototypeFactoryUnit
+// Creates an object by cloning a prototype
+// There is a difference between the implementation herein and the one described
+//     in the book: GetPrototype and SetPrototype use the helper friend 
+//     functions DoGetPrototype and DoSetPrototype. The friend functions avoid
+//     name hiding issues. Plus, GetPrototype takes a reference to pointer
+//     instead of returning the pointer by value.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ConcreteProduct, class Base>
+    class PrototypeFactoryUnit : public Base
+    {
+        typedef typename Base::ProductList BaseProductList;
+    
+    protected:
+        typedef typename BaseProductList::Tail ProductList;
+
+    public:
+        typedef typename BaseProductList::Head AbstractProduct;
+
+        PrototypeFactoryUnit(AbstractProduct* p = 0)
+            : pPrototype_(p)
+        {}
+        
+        friend void DoGetPrototype(const PrototypeFactoryUnit& me,
+            AbstractProduct*& pPrototype)
+        { pPrototype = me.pPrototype_; }
+        
+        friend void DoSetPrototype(PrototypeFactoryUnit& me, 
+            AbstractProduct* pObj)
+        { me.pPrototype_ = pObj; }
+        
+        template <class U>
+        void GetPrototype(AbstractProduct*& p)
+        { return DoGetPrototype(*this, p); }
+        
+        template <class U>
+        void SetPrototype(U* pObj)
+        { DoSetPrototype(*this, pObj); }
+        
+        AbstractProduct* DoCreate(Type2Type<AbstractProduct>)
+        {
+            assert(pPrototype_);
+            return pPrototype_->Clone();
+        }
+        
+    private:
+        AbstractProduct* pPrototype_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ConcreteFactory
+// Implements an AbstractFactory interface
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class AbstractFact,
+        template <class, class> class Creator = OpNewFactoryUnit,
+        class TList = typename AbstractFact::ProductList
+    >
+    class ConcreteFactory
+        : public GenLinearHierarchy<
+            typename TL::Reverse<TList>::Result, Creator, AbstractFact>
+    {
+    public:
+        typedef typename AbstractFact::ProductList ProductList;
+        typedef TList ConcreteProductList;
+    };
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // ABSTRACTFACTORY_INC_
Index: avida/current/source/third-party/Loki/MSVC/1300/AssocVector.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/AssocVector.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/AssocVector.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,335 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef ASSOCVECTOR_INC_
+#define ASSOCVECTOR_INC_
+
+#include <algorithm>
+#include <functional>
+#include <vector>
+#include <utility>
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template AssocVectorCompare
+// Used by AssocVector
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class Value, class C>
+        class AssocVectorCompare : public C
+        {
+            typedef std::pair<typename C::first_argument_type, Value>
+                Data;
+            typedef typename C::first_argument_type first_argument_type;
+
+        public:
+            AssocVectorCompare()
+            {}
+            
+            AssocVectorCompare(const C& src) : C(src)
+            {}
+            
+            bool operator()(const first_argument_type& lhs, 
+                const first_argument_type& rhs) const
+            { return C::operator()(lhs, rhs); }
+            
+            bool operator()(const Data& lhs, const Data& rhs) const
+            { return operator()(lhs.first, rhs.first); }
+            
+            bool operator()(const Data& lhs, 
+                const first_argument_type& rhs) const
+            { return operator()(lhs.first, rhs); }
+            
+            bool operator()(const first_argument_type& lhs,
+                const Data& rhs) const
+            { return operator()(lhs, rhs.first); }
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AssocVector
+// An associative vector built as a syntactic drop-in replacement for std::map
+// BEWARE: AssocVector doesn't respect all map's guarantees, the most important
+//     being:
+// * iterators are invalidated by insert and erase operations
+// * the complexity of insert/erase is O(N) not O(log N)
+// * value_type is std::pair<K, V> not std::pair<const K, V>
+// * iterators are random
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class K,
+        class V,
+        class C = std::less<K>,
+        class A = std::allocator< std::pair<K, V> >
+    >
+    class AssocVector 
+        : private std::vector< std::pair<K, V>, A >
+        , private Private::AssocVectorCompare<V, C>
+    {
+        typedef std::vector<std::pair<K, V>, A> Base;
+        typedef Private::AssocVectorCompare<V, C> MyCompare;
+
+    public:
+        typedef K key_type;
+        typedef V mapped_type;
+        typedef typename Base::value_type value_type;
+
+        typedef C key_compare;
+        typedef A allocator_type;
+        typedef typename A::reference reference;
+        typedef typename A::const_reference const_reference;
+        typedef typename Base::iterator iterator;
+        typedef typename Base::const_iterator const_iterator;
+        typedef typename Base::size_type size_type;
+        typedef typename Base::difference_type difference_type;
+        typedef typename A::pointer pointer;
+        typedef typename A::const_pointer const_pointer;
+        typedef typename Base::reverse_iterator reverse_iterator;
+        typedef typename Base::const_reverse_iterator const_reverse_iterator;
+
+        class value_compare
+            : public std::binary_function<value_type, value_type, bool>
+            , private key_compare
+        {
+            friend class AssocVector;
+        
+        protected:
+            value_compare(key_compare pred) : key_compare(pred)
+            {}
+
+        public:
+            bool operator()(const value_type& lhs, const value_type& rhs) const
+            { return key_compare::operator()(lhs.first, rhs.first); }
+        };
+        
+        // 23.3.1.1 construct/copy/destroy
+
+        explicit AssocVector(const key_compare& comp = key_compare(), 
+            const A& alloc = A())
+        : Base(alloc), MyCompare(comp)
+        {}
+        
+        template <class InputIterator>
+        AssocVector(InputIterator first, InputIterator last, 
+            const key_compare& comp = key_compare(), 
+            const A& alloc = A())
+        : Base(first, last, alloc), MyCompare(comp)
+        {
+            MyCompare& me = *this;
+            std::sort(begin(), end(), me);
+        }
+        
+        AssocVector& operator=(const AssocVector& rhs)
+        { 
+            AssocVector(rhs).swap(*this); 
+            return *this;
+        }
+
+        // iterators:
+        // The following are here because MWCW gets 'using' wrong
+        iterator begin() { return Base::begin(); }
+        const_iterator begin() const { return Base::begin(); }
+        iterator end() { return Base::end(); }
+        const_iterator end() const { return Base::end(); }
+        reverse_iterator rbegin() { return Base::rbegin(); }
+        const_reverse_iterator rbegin() const { return Base::rbegin(); }
+        reverse_iterator rend() { return Base::rend(); }
+        const_reverse_iterator rend() const { return Base::rend(); }
+        
+        // capacity:
+        bool empty() const { return Base::empty(); }
+        size_type size() const { return Base::size(); }
+        size_type max_size() { return Base::max_size(); }
+
+        // 23.3.1.2 element access:
+        mapped_type& operator[](const key_type& key)
+        { return insert(value_type(key, mapped_type())).first->second; }
+
+        // modifiers:
+        std::pair<iterator, bool> insert(const value_type& val)
+        {
+            bool found(true);
+            iterator i(lower_bound(val.first));
+
+            if (i == end() || this->operator()(val.first, i->first))
+            {
+                i = Base::insert(i, val);
+                found = false;
+            }
+            return std::make_pair(i, !found);
+        }
+
+        iterator insert(iterator pos, const value_type& val)
+        {
+            if (pos != end() && this->operator()(*pos, val) && 
+                (pos == end() - 1 ||
+                    !this->operator()(val, pos[1]) &&
+                        this->operator()(pos[1], val)))
+            {
+                return Base::insert(pos, val);
+            }
+            return insert(val).first;
+        }
+       
+        template <class InputIterator>
+        void insert(InputIterator first, InputIterator last)
+        { for (; first != last; ++first) insert(*first); }
+        
+        void erase(iterator pos)
+        { Base::erase(pos); }
+
+        size_type erase(const key_type& k)
+        {
+            iterator i(find(k));
+            if (i == end()) return 0;
+            erase(i);
+            return 1;
+        }
+
+        void erase(iterator first, iterator last)
+        { Base::erase(first, last); }
+
+        void swap(AssocVector& other)
+        {
+            using std::swap;
+            Base::swap(other);
+            MyCompare& me = *this;
+            MyCompare& rhs = other;
+            swap(me, rhs);
+        }
+        
+        void clear()
+        { Base::clear(); }
+
+        // observers:
+        key_compare key_comp() const
+        { return *this; }
+
+        value_compare value_comp() const
+        {
+            const key_compare& comp = *this;
+            return value_compare(comp);
+        }
+
+        // 23.3.1.3 map operations:
+        iterator find(const key_type& k)
+        {
+            iterator i(lower_bound(k));
+            if (i != end() && this->operator()(k, i->first))
+            {
+                i = end();
+            }
+            return i;
+        }
+
+        const_iterator find(const key_type& k) const
+        {       
+            const_iterator i(lower_bound(k));
+            if (i != end() && this->operator()(k, i->first))
+            {
+                i = end();
+            }
+            return i;
+        }
+
+        size_type count(const key_type& k) const
+        { return find(k) != end(); }
+
+        iterator lower_bound(const key_type& k)
+        {
+            MyCompare& me = *this;
+            return std::lower_bound(begin(), end(), k, me);
+        }
+
+        const_iterator lower_bound(const key_type& k) const
+        {
+            const MyCompare& me = *this;
+            return std::lower_bound(begin(), end(), k, me);
+        }
+
+        iterator upper_bound(const key_type& k)
+        {
+            MyCompare& me = *this;
+            return std::upper_bound(begin(), end(), k, me);
+        }
+
+        const_iterator upper_bound(const key_type& k) const
+        {
+            const MyCompare& me = *this;
+            return std::upper_bound(begin(), end(), k, me);
+        }
+
+        std::pair<iterator, iterator> equal_range(const key_type& k)
+        {
+            MyCompare& me = *this;
+            return std::equal_range(begin(), end(), k, me);
+        }
+
+        std::pair<const_iterator, const_iterator> equal_range(
+            const key_type& k) const
+        {
+            const MyCompare& me = *this;
+            return std::equal_range(begin(), end(), k, me);
+        }
+        
+        friend bool operator==(const AssocVector& lhs, const AssocVector& rhs)
+        {
+            const Base& me = lhs;
+            return me == rhs;
+        } 
+        
+        bool operator<(const AssocVector& rhs) const
+        {
+            const Base& me = *this;
+            const Base& yo = rhs;
+            return me < yo;
+        } 
+
+        friend bool operator!=(const AssocVector& lhs, const AssocVector& rhs)
+        { return !(lhs == rhs); } 
+
+        friend bool operator>(const AssocVector& lhs, const AssocVector& rhs)
+        { return rhs < lhs; }
+
+        friend bool operator>=(const AssocVector& lhs, const AssocVector& rhs)
+        { return !(lhs < rhs); } 
+
+        friend bool operator<=(const AssocVector& lhs, const AssocVector& rhs)
+        { return !(rhs < lhs); }
+    };
+
+    // specialized algorithms:
+    template <class K, class V, class C, class A>
+    void swap(AssocVector<K, V, C, A>& lhs, AssocVector<K, V, C, A>& rhs)
+    { lhs.swap(rhs); }
+    
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// May 20, 2001: change operator= - credit due to Cristoph Koegl
+// June 11, 2001: remove paren in equal_range - credit due to Cristoph Koegl
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// January 22, 2002: fixed operator= - credit due to Tom Hyer
+// June 25, 2002: fixed template insert() - credit due to Robert Minsk
+// June 27, 2002: fixed member swap() - credit due to David Brookman
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // ASSOCVECTOR_INC_
Index: avida/current/source/third-party/Loki/MSVC/1300/EmptyType.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/EmptyType.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/EmptyType.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef EMPTYTYPE_INC_
+#define EMPTYTYPE_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class EmptyType
+// Used as a class type that doesn't hold anything
+// Useful as a strawman class
+////////////////////////////////////////////////////////////////////////////////
+
+    class EmptyType {};
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // EMPTYTYPE_INC_
Index: avida/current/source/third-party/Loki/MSVC/1300/Factory.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/Factory.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/Factory.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,143 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef FACTORY_INC_
+#define FACTORY_INC_
+
+#include "TypeInfo.h"
+#include "AssocVector.h"
+#include <exception>
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DefaultFactoryError
+// Manages the "Unknown Type" error in an object factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename IdentifierType, class AbstractProduct>
+    struct DefaultFactoryError
+    {
+        struct Exception : public std::exception
+        {
+            const char* what() const throw() { return "Unknown Type"; }
+        };
+        
+        static AbstractProduct* OnUnknownType(IdentifierType)
+        {
+            throw Exception();
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Factory
+// Implements a generic object factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class AbstractProduct, 
+        typename IdentifierType,
+        typename ProductCreator = AbstractProduct* (*)(),
+        template<typename, class>
+            class FactoryErrorPolicy = DefaultFactoryError
+    >
+    class Factory 
+        : public FactoryErrorPolicy<IdentifierType, AbstractProduct>
+    {
+    public:
+        bool Register(const IdentifierType& id, ProductCreator creator)
+        {
+            return associations_.insert(
+                IdToProductMap::value_type(id, creator)).second;
+        }
+        
+        bool Unregister(const IdentifierType& id)
+        {
+            return associations_.erase(id) == 1;
+        }
+        
+        AbstractProduct* CreateObject(const IdentifierType& id)
+        {
+            typename IdToProductMap::iterator i = associations_.find(id);
+            if (i != associations_.end())
+            {
+                return (i->second)();
+            }
+            return OnUnknownType(id);
+        }
+        
+    private:
+        typedef AssocVector<IdentifierType, ProductCreator> IdToProductMap;
+        IdToProductMap associations_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template CloneFactory
+// Implements a generic cloning factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class AbstractProduct, 
+        class ProductCreator = 
+            AbstractProduct* (*)(const AbstractProduct*),
+        template<typename, class>
+            class FactoryErrorPolicy = DefaultFactoryError
+    >
+    class CloneFactory
+        : public FactoryErrorPolicy<TypeInfo, AbstractProduct>
+    {
+    public:
+        bool Register(const TypeInfo& ti, ProductCreator creator)
+        {
+            return associations_.insert(
+                IdToProductMap::value_type(ti, creator)).second;
+        }
+        
+        bool Unregister(const TypeInfo& id)
+        {
+            return associations_.erase(id) == 1;
+        }
+        
+        AbstractProduct* CreateObject(const AbstractProduct* model)
+        {
+            if (model == 0) return 0;
+            
+            typename IdToProductMap::iterator i = 
+                associations_.find(typeid(*model));
+            if (i != associations_.end())
+            {
+                return (i->second)(model);
+            }
+            return OnUnknownType(typeid(*model));
+        }
+        
+    private:
+        typedef AssocVector<TypeInfo, ProductCreator> IdToProductMap;
+        IdToProductMap associations_;
+    };
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // FACTORY_INC_
Index: avida/current/source/third-party/Loki/MSVC/1300/Functor.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/Functor.h:1.2
--- /dev/null	Wed Sep 24 01:12:12 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/Functor.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,1347 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef FUNCTOR_INC_
+#define FUNCTOR_INC_
+
+#include "Typelist.h"
+#include "EmptyType.h"
+#include "SmallObj.h"
+#include "TypeTraits.h"
+#include <typeinfo>
+#include <memory>
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl (internal)
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+
+    template <typename R, template <class> class ThreadingModel>
+    struct FunctorImplBase : public SmallObject<ThreadingModel>
+    {
+        typedef R ResultType;
+        
+        typedef EmptyType Parm1;
+        typedef EmptyType Parm2;
+        typedef EmptyType Parm3;
+        typedef EmptyType Parm4;
+        typedef EmptyType Parm5;
+        typedef EmptyType Parm6;
+        typedef EmptyType Parm7;
+        typedef EmptyType Parm8;
+        typedef EmptyType Parm9;
+        typedef EmptyType Parm10;
+        typedef EmptyType Parm11;
+        typedef EmptyType Parm12;
+        typedef EmptyType Parm13;
+        typedef EmptyType Parm14;
+        typedef EmptyType Parm15;
+
+        virtual FunctorImplBase* DoClone() const = 0;
+        template <class U>
+        static U* Clone(U* pObj)
+        {
+            if (!pObj) return 0;
+            U* pClone = static_cast<U*>(pObj->DoClone());
+            assert(typeid(*pClone) == typeid(*pObj));
+            return pClone;
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFINE_CLONE_FUNCTORIMPL
+// Implements the DoClone function for a functor implementation
+////////////////////////////////////////////////////////////////////////////////
+
+#define DEFINE_CLONE_FUNCTORIMPL(Cls) \
+    virtual Cls* DoClone() const { return new Cls(*this); }
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Base template
+////////////////////////////////////////////////////////////////////////////////
+    template <unsigned int TListLength> 
+    struct FunctorImplHelper;
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 0 (zero) parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <> 
+    struct FunctorImplHelper<0>
+    {
+        template <typename R, class TList, template <class> class ThreadingModel>
+        class In : public Private::FunctorImplBase<R, ThreadingModel>
+        {
+        public:
+            typedef R ResultType;
+            virtual R operator()() = 0;
+        };      
+    };
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 1 parameter
+////////////////////////////////////////////////////////////////////////////////
+
+    template <> 
+    struct FunctorImplHelper<1>
+    {
+        template <typename R, class TList, template <class> class ThreadingModel>
+        class In : public Private::FunctorImplBase<R, ThreadingModel>
+        {
+            typedef typename TL::TypeAt<TList, 0>::Result P1;
+    
+        public:
+            typedef R ResultType;
+            typedef typename TypeTraits<P1>::ParameterType Parm1;
+            virtual R operator()(Parm1) = 0;
+        };      
+    };
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 2 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<2>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           virtual R operator()(Parm1, Parm2) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 3 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<3>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           virtual R operator()(Parm1, Parm2, Parm3) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 4 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<4>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 5 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<5>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+           typedef typename TL::TypeAt<TList, 4>::Result P5;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           typedef typename TypeTraits<P5>::ParameterType Parm5;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 6 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<6>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+           typedef typename TL::TypeAt<TList, 4>::Result P5;
+           typedef typename TL::TypeAt<TList, 5>::Result P6;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           typedef typename TypeTraits<P5>::ParameterType Parm5;
+           typedef typename TypeTraits<P6>::ParameterType Parm6;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 7 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<7>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+           typedef typename TL::TypeAt<TList, 4>::Result P5;
+           typedef typename TL::TypeAt<TList, 5>::Result P6;
+           typedef typename TL::TypeAt<TList, 6>::Result P7;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           typedef typename TypeTraits<P5>::ParameterType Parm5;
+           typedef typename TypeTraits<P6>::ParameterType Parm6;
+           typedef typename TypeTraits<P7>::ParameterType Parm7;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, Parm7) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 8 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<8>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+           typedef typename TL::TypeAt<TList, 4>::Result P5;
+           typedef typename TL::TypeAt<TList, 5>::Result P6;
+           typedef typename TL::TypeAt<TList, 6>::Result P7;
+           typedef typename TL::TypeAt<TList, 7>::Result P8;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           typedef typename TypeTraits<P5>::ParameterType Parm5;
+           typedef typename TypeTraits<P6>::ParameterType Parm6;
+           typedef typename TypeTraits<P7>::ParameterType Parm7;
+           typedef typename TypeTraits<P8>::ParameterType Parm8;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, Parm7, Parm8) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 9 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<9>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+           typedef typename TL::TypeAt<TList, 4>::Result P5;
+           typedef typename TL::TypeAt<TList, 5>::Result P6;
+           typedef typename TL::TypeAt<TList, 6>::Result P7;
+           typedef typename TL::TypeAt<TList, 7>::Result P8;
+           typedef typename TL::TypeAt<TList, 8>::Result P9;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           typedef typename TypeTraits<P5>::ParameterType Parm5;
+           typedef typename TypeTraits<P6>::ParameterType Parm6;
+           typedef typename TypeTraits<P7>::ParameterType Parm7;
+           typedef typename TypeTraits<P8>::ParameterType Parm8;
+           typedef typename TypeTraits<P9>::ParameterType Parm9;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, Parm7, Parm8, Parm9) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 10 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<10>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+           typedef typename TL::TypeAt<TList, 4>::Result P5;
+           typedef typename TL::TypeAt<TList, 5>::Result P6;
+           typedef typename TL::TypeAt<TList, 6>::Result P7;
+           typedef typename TL::TypeAt<TList, 7>::Result P8;
+           typedef typename TL::TypeAt<TList, 8>::Result P9;
+           typedef typename TL::TypeAt<TList, 9>::Result P10;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           typedef typename TypeTraits<P5>::ParameterType Parm5;
+           typedef typename TypeTraits<P6>::ParameterType Parm6;
+           typedef typename TypeTraits<P7>::ParameterType Parm7;
+           typedef typename TypeTraits<P8>::ParameterType Parm8;
+           typedef typename TypeTraits<P9>::ParameterType Parm9;
+           typedef typename TypeTraits<P10>::ParameterType Parm10;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, Parm7, Parm8, Parm9, Parm10) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 11 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<11>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+           typedef typename TL::TypeAt<TList, 4>::Result P5;
+           typedef typename TL::TypeAt<TList, 5>::Result P6;
+           typedef typename TL::TypeAt<TList, 6>::Result P7;
+           typedef typename TL::TypeAt<TList, 7>::Result P8;
+           typedef typename TL::TypeAt<TList, 8>::Result P9;
+           typedef typename TL::TypeAt<TList, 9>::Result P10;
+           typedef typename TL::TypeAt<TList, 10>::Result P11;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           typedef typename TypeTraits<P5>::ParameterType Parm5;
+           typedef typename TypeTraits<P6>::ParameterType Parm6;
+           typedef typename TypeTraits<P7>::ParameterType Parm7;
+           typedef typename TypeTraits<P8>::ParameterType Parm8;
+           typedef typename TypeTraits<P9>::ParameterType Parm9;
+           typedef typename TypeTraits<P10>::ParameterType Parm10;
+           typedef typename TypeTraits<P11>::ParameterType Parm11;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, Parm7, Parm8, Parm9, Parm10, Parm11) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 12 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<12>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+           typedef typename TL::TypeAt<TList, 4>::Result P5;
+           typedef typename TL::TypeAt<TList, 5>::Result P6;
+           typedef typename TL::TypeAt<TList, 6>::Result P7;
+           typedef typename TL::TypeAt<TList, 7>::Result P8;
+           typedef typename TL::TypeAt<TList, 8>::Result P9;
+           typedef typename TL::TypeAt<TList, 9>::Result P10;
+           typedef typename TL::TypeAt<TList, 10>::Result P11;
+           typedef typename TL::TypeAt<TList, 11>::Result P12;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           typedef typename TypeTraits<P5>::ParameterType Parm5;
+           typedef typename TypeTraits<P6>::ParameterType Parm6;
+           typedef typename TypeTraits<P7>::ParameterType Parm7;
+           typedef typename TypeTraits<P8>::ParameterType Parm8;
+           typedef typename TypeTraits<P9>::ParameterType Parm9;
+           typedef typename TypeTraits<P10>::ParameterType Parm10;
+           typedef typename TypeTraits<P11>::ParameterType Parm11;
+           typedef typename TypeTraits<P12>::ParameterType Parm12;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, Parm7, Parm8, Parm9, Parm10, Parm11, Parm12) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 13 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<13>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+           typedef typename TL::TypeAt<TList, 4>::Result P5;
+           typedef typename TL::TypeAt<TList, 5>::Result P6;
+           typedef typename TL::TypeAt<TList, 6>::Result P7;
+           typedef typename TL::TypeAt<TList, 7>::Result P8;
+           typedef typename TL::TypeAt<TList, 8>::Result P9;
+           typedef typename TL::TypeAt<TList, 9>::Result P10;
+           typedef typename TL::TypeAt<TList, 10>::Result P11;
+           typedef typename TL::TypeAt<TList, 11>::Result P12;
+           typedef typename TL::TypeAt<TList, 12>::Result P13;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           typedef typename TypeTraits<P5>::ParameterType Parm5;
+           typedef typename TypeTraits<P6>::ParameterType Parm6;
+           typedef typename TypeTraits<P7>::ParameterType Parm7;
+           typedef typename TypeTraits<P8>::ParameterType Parm8;
+           typedef typename TypeTraits<P9>::ParameterType Parm9;
+           typedef typename TypeTraits<P10>::ParameterType Parm10;
+           typedef typename TypeTraits<P11>::ParameterType Parm11;
+           typedef typename TypeTraits<P12>::ParameterType Parm12;
+           typedef typename TypeTraits<P13>::ParameterType Parm13;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, Parm7, Parm8, Parm9, Parm10, Parm11, Parm12, Parm13) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 14 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<14>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+           typedef typename TL::TypeAt<TList, 4>::Result P5;
+           typedef typename TL::TypeAt<TList, 5>::Result P6;
+           typedef typename TL::TypeAt<TList, 6>::Result P7;
+           typedef typename TL::TypeAt<TList, 7>::Result P8;
+           typedef typename TL::TypeAt<TList, 8>::Result P9;
+           typedef typename TL::TypeAt<TList, 9>::Result P10;
+           typedef typename TL::TypeAt<TList, 10>::Result P11;
+           typedef typename TL::TypeAt<TList, 11>::Result P12;
+           typedef typename TL::TypeAt<TList, 12>::Result P13;
+           typedef typename TL::TypeAt<TList, 13>::Result P14;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           typedef typename TypeTraits<P5>::ParameterType Parm5;
+           typedef typename TypeTraits<P6>::ParameterType Parm6;
+           typedef typename TypeTraits<P7>::ParameterType Parm7;
+           typedef typename TypeTraits<P8>::ParameterType Parm8;
+           typedef typename TypeTraits<P9>::ParameterType Parm9;
+           typedef typename TypeTraits<P10>::ParameterType Parm10;
+           typedef typename TypeTraits<P11>::ParameterType Parm11;
+           typedef typename TypeTraits<P12>::ParameterType Parm12;
+           typedef typename TypeTraits<P13>::ParameterType Parm13;
+           typedef typename TypeTraits<P14>::ParameterType Parm14;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, Parm7, Parm8, Parm9, Parm10, Parm11, Parm12, Parm13, Parm14) = 0;
+       };
+   };
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImplHelper
+// Specialization for 15 parameters
+////////////////////////////////////////////////////////////////////////////////
+   template <>
+   struct FunctorImplHelper<15>
+   {
+       template <typename R, class TList, template <class> class ThreadingModel>
+       class In : public Private::FunctorImplBase<R, ThreadingModel>
+       {
+           typedef typename TL::TypeAt<TList, 0>::Result P1;
+           typedef typename TL::TypeAt<TList, 1>::Result P2;
+           typedef typename TL::TypeAt<TList, 2>::Result P3;
+           typedef typename TL::TypeAt<TList, 3>::Result P4;
+           typedef typename TL::TypeAt<TList, 4>::Result P5;
+           typedef typename TL::TypeAt<TList, 5>::Result P6;
+           typedef typename TL::TypeAt<TList, 6>::Result P7;
+           typedef typename TL::TypeAt<TList, 7>::Result P8;
+           typedef typename TL::TypeAt<TList, 8>::Result P9;
+           typedef typename TL::TypeAt<TList, 9>::Result P10;
+           typedef typename TL::TypeAt<TList, 10>::Result P11;
+           typedef typename TL::TypeAt<TList, 11>::Result P12;
+           typedef typename TL::TypeAt<TList, 12>::Result P13;
+           typedef typename TL::TypeAt<TList, 13>::Result P14;
+           typedef typename TL::TypeAt<TList, 14>::Result P15;
+
+       public:
+           typedef R ResultType;
+           typedef typename TypeTraits<P1>::ParameterType Parm1;
+           typedef typename TypeTraits<P2>::ParameterType Parm2;
+           typedef typename TypeTraits<P3>::ParameterType Parm3;
+           typedef typename TypeTraits<P4>::ParameterType Parm4;
+           typedef typename TypeTraits<P5>::ParameterType Parm5;
+           typedef typename TypeTraits<P6>::ParameterType Parm6;
+           typedef typename TypeTraits<P7>::ParameterType Parm7;
+           typedef typename TypeTraits<P8>::ParameterType Parm8;
+           typedef typename TypeTraits<P9>::ParameterType Parm9;
+           typedef typename TypeTraits<P10>::ParameterType Parm10;
+           typedef typename TypeTraits<P11>::ParameterType Parm11;
+           typedef typename TypeTraits<P12>::ParameterType Parm12;
+           typedef typename TypeTraits<P13>::ParameterType Parm13;
+           typedef typename TypeTraits<P14>::ParameterType Parm14;
+           typedef typename TypeTraits<P15>::ParameterType Parm15;
+           virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, Parm7, Parm8, Parm9, Parm10, Parm11, Parm12, Parm13, Parm14, Parm15) = 0;
+       };
+   };
+
+   } // namespace Private
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// The base class for a hierarchy of functors. The FunctorImpl class is not used
+//     directly; rather, the Functor class manages and forwards to a pointer to
+//     FunctorImpl
+// You may want to derive your own functors from FunctorImpl.
+// Specializations of FunctorImpl for up to 15 parameters follow
+////////////////////////////////////////////////////////////////////////////////
+
+    template 
+    <
+        typename R, 
+        class TList, 
+        template <class> class ThreadingModel = DEFAULT_THREADING
+    >
+    class FunctorImpl 
+        : public Private::FunctorImplHelper
+          <
+              TL::Length<TList>::value
+          >
+          ::template In<R, TList, ThreadingModel>
+    {
+        ASSERT_TYPELIST(TList);
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorHandler
+// Wraps functors and pointers to functions
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ParentFunctor, typename Fun>
+    class FunctorHandler
+        : public ParentFunctor::Impl
+    {
+        typedef typename ParentFunctor::Impl Base;
+
+    public:
+        typedef typename Base::ResultType ResultType;
+        typedef typename Base::Parm1 Parm1;
+        typedef typename Base::Parm2 Parm2;
+        typedef typename Base::Parm3 Parm3;
+        typedef typename Base::Parm4 Parm4;
+        typedef typename Base::Parm5 Parm5;
+        typedef typename Base::Parm6 Parm6;
+        typedef typename Base::Parm7 Parm7;
+        typedef typename Base::Parm8 Parm8;
+        typedef typename Base::Parm9 Parm9;
+        typedef typename Base::Parm10 Parm10;
+        typedef typename Base::Parm11 Parm11;
+        typedef typename Base::Parm12 Parm12;
+        typedef typename Base::Parm13 Parm13;
+        typedef typename Base::Parm14 Parm14;
+        typedef typename Base::Parm15 Parm15;
+        
+        FunctorHandler(const Fun& fun) : f_(fun) {}
+        
+        DEFINE_CLONE_FUNCTORIMPL(FunctorHandler)
+
+        // operator() implementations for up to 15 arguments
+                
+        ResultType operator()()
+        { return f_(); }
+
+        ResultType operator()(Parm1 p1)
+        { return f_(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return f_(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return f_(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return f_(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return f_(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return f_(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return f_(p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                p14, p15);
+        }
+        
+    private:
+        Fun f_;
+    };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorHandler
+// Wraps pointers to member functions
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ParentFunctor, typename PointerToObj,
+        typename PointerToMemFn>
+    class MemFunHandler : public ParentFunctor::Impl
+    {
+        typedef typename ParentFunctor::Impl Base;
+
+    public:
+        typedef typename Base::ResultType ResultType;
+        typedef typename Base::Parm1 Parm1;
+        typedef typename Base::Parm2 Parm2;
+        typedef typename Base::Parm3 Parm3;
+        typedef typename Base::Parm4 Parm4;
+        typedef typename Base::Parm5 Parm5;
+        typedef typename Base::Parm6 Parm6;
+        typedef typename Base::Parm7 Parm7;
+        typedef typename Base::Parm8 Parm8;
+        typedef typename Base::Parm9 Parm9;
+        typedef typename Base::Parm10 Parm10;
+        typedef typename Base::Parm11 Parm11;
+        typedef typename Base::Parm12 Parm12;
+        typedef typename Base::Parm13 Parm13;
+        typedef typename Base::Parm14 Parm14;
+        typedef typename Base::Parm15 Parm15;
+
+        MemFunHandler(const PointerToObj& pObj, PointerToMemFn pMemFn) 
+        : pObj_(pObj), pMemFn_(pMemFn)
+        {}
+        
+        DEFINE_CLONE_FUNCTORIMPL(MemFunHandler)
+        
+        ResultType operator()()
+        { return ((*pObj_).*pMemFn_)(); }
+
+        ResultType operator()(Parm1 p1)
+        { return ((*pObj_).*pMemFn_)(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return ((*pObj_).*pMemFn_)(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12, p13);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12, p13, p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12, p13, p14, p15);
+        }
+        
+    private:
+        PointerToObj pObj_;
+        PointerToMemFn pMemFn_;
+    };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template Functor
+// A generalized functor implementation with value semantics
+////////////////////////////////////////////////////////////////////////////////
+       
+    template<typename R, class TList = NullType,
+        template<class> class ThreadingModel = DEFAULT_THREADING>
+    class Functor
+    {
+    public:
+        // Handy type definitions for the body type
+        typedef FunctorImpl<R, TList, ThreadingModel> Impl;
+        typedef R               ResultType;
+        typedef TList           ParmList;
+        
+        template<typename R1, class TList1>
+        struct RebindParmList
+        {
+            typedef Functor<R1, TList1, ThreadingModel> Result;
+        };
+
+        typedef typename Impl::Parm1 Parm1;
+        typedef typename Impl::Parm2 Parm2;
+        typedef typename Impl::Parm3 Parm3;
+        typedef typename Impl::Parm4 Parm4;
+        typedef typename Impl::Parm5 Parm5;
+        typedef typename Impl::Parm6 Parm6;
+        typedef typename Impl::Parm7 Parm7;
+        typedef typename Impl::Parm8 Parm8;
+        typedef typename Impl::Parm9 Parm9;
+        typedef typename Impl::Parm10 Parm10;
+        typedef typename Impl::Parm11 Parm11;
+        typedef typename Impl::Parm12 Parm12;
+        typedef typename Impl::Parm13 Parm13;
+        typedef typename Impl::Parm14 Parm14;
+        typedef typename Impl::Parm15 Parm15;
+
+        // Member functions
+
+        Functor() : spImpl_()
+        {}
+        
+        
+#if 0 // The Helper class will do those constructions because of VC7 bug
+        Functor(const Functor& rhs) : spImpl_(Impl::Clone(rhs.spImpl_.get()))
+        {}
+#endif        
+
+        Functor(std::auto_ptr<Impl> spImpl) : spImpl_(spImpl)
+        {}
+
+        template <typename Fun>
+        Functor(Fun fun)
+        : spImpl_(new FunctorHandler<Functor, Fun>(fun))
+        {}
+
+        template <class PtrObj, typename MemFn>
+        Functor(const PtrObj& p, MemFn memFn)
+        : spImpl_(new MemFunHandler<Functor, PtrObj, MemFn>(p, memFn))
+        {}
+
+        Functor& operator=(const Functor& rhs)
+        {
+            Functor copy(rhs);
+            // swap auto_ptrs by hand
+            Impl* p = spImpl_.spImpl_.release();
+            spImpl_.spImpl_.reset(copy.spImpl_.spImpl_.release());
+            copy.spImpl_.spImpl_.reset(p);
+            return *this;
+        }
+        
+        ResultType operator()()
+        { return (*spImpl_)(); }
+
+        ResultType operator()(Parm1 p1)
+        { return (*spImpl_)(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return (*spImpl_)(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return (*spImpl_)(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return (*spImpl_)(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return (*spImpl_)(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, 
+                p12);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11,
+            p12, p13);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, 
+                p12, p13, p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, 
+                p12, p13, p14, p15);
+        }
+
+    private:
+
+        // VC7 can't see the defined ctor when the template version in present
+        struct Helper
+        {
+            Helper()
+                : spImpl_(0)
+            {}
+
+            Helper(const Helper &rhs)
+                : spImpl_(Impl::Clone(rhs.spImpl_.get()))
+            {}
+
+            explicit Helper(std::auto_ptr<Impl> spImpl)
+                : spImpl_(spImpl)
+            {}
+
+            template<typename U>
+            explicit Helper(U *ptr)
+                : spImpl_(ptr)
+            {}
+
+            Impl& operator*() const
+            {
+                return *spImpl_;
+            }
+
+        public:
+            std::auto_ptr<Impl> spImpl_;
+        };
+
+        Helper spImpl_;
+    };
+    
+    namespace Private
+    {
+        template <class Fctor> 
+        struct BinderFirstTraits
+        {
+        private:
+            typedef typename Fctor::ParmList   TList;
+
+        public:
+            typedef typename TL::Erase
+            <
+                TList, 
+                typename TL::TypeAt<TList, 0>::Result
+            >
+            ::Result ParmList;
+
+            //typedef typename TList::Tail ParmList;
+
+            typedef typename Fctor::template RebindParmList
+            <
+                typename Fctor::ResultType,
+                ParmList
+            > 
+            ::Result BoundFunctorType;
+
+            typedef typename BoundFunctorType::Impl Impl;
+        };
+
+    } // namespace Private
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BinderFirst
+// Binds the first parameter of a Functor object to a specific value
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class OriginalFunctor>
+    class BinderFirst 
+        : public Private::BinderFirstTraits<OriginalFunctor>::Impl
+    {
+        typedef typename Private::BinderFirstTraits<OriginalFunctor>::Impl Base;
+        typedef typename OriginalFunctor::ResultType ResultType;
+
+        typedef typename OriginalFunctor::Parm1 BoundType;
+
+        typedef typename OriginalFunctor::Parm2 Parm1;
+        typedef typename OriginalFunctor::Parm3 Parm2;
+        typedef typename OriginalFunctor::Parm4 Parm3;
+        typedef typename OriginalFunctor::Parm5 Parm4;
+        typedef typename OriginalFunctor::Parm6 Parm5;
+        typedef typename OriginalFunctor::Parm7 Parm6;
+        typedef typename OriginalFunctor::Parm8 Parm7;
+        typedef typename OriginalFunctor::Parm9 Parm8;
+        typedef typename OriginalFunctor::Parm10 Parm9;
+        typedef typename OriginalFunctor::Parm11 Parm10;
+        typedef typename OriginalFunctor::Parm12 Parm11;
+        typedef typename OriginalFunctor::Parm13 Parm12;
+        typedef typename OriginalFunctor::Parm14 Parm13;
+        typedef typename OriginalFunctor::Parm15 Parm14;
+        typedef EmptyType Parm15;
+
+    public:
+        BinderFirst(const OriginalFunctor& fun, BoundType bound)
+        : f_(fun), b_(bound)
+        {}
+        
+        DEFINE_CLONE_FUNCTORIMPL(BinderFirst)
+        
+        // operator() implementations for up to 15 arguments
+                
+        ResultType operator()()
+        { return f_(b_); }
+
+        ResultType operator()(Parm1 p1)
+        { return f_(b_, p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return f_(b_, p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return f_(b_, p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return f_(b_, p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return f_(b_, p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return f_(b_, p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                p14);
+        }
+        
+        // VC7 BUG
+        virtual ~BinderFirst() {}
+    private:
+        OriginalFunctor f_;
+        BoundType b_;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// function template BindFirst
+// Binds the first parameter of a Functor object to a specific value
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class Fctor>
+    typename Private::BinderFirstTraits<Fctor>::BoundFunctorType
+    BindFirst
+    (
+        const Fctor&            fun,
+        typename Fctor::Parm1   bound
+    ){
+        typedef typename Private::BinderFirstTraits<Fctor>::BoundFunctorType
+            Outgoing;        
+        
+        //
+        // VC7 don't support the auto_ptr tricks
+        //
+        std::auto_ptr<typename Outgoing::Impl> apParam
+        (
+            new BinderFirst<Fctor>(fun, bound)
+        );
+
+        return Outgoing(apParam);
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Chainer
+// Chains two functor calls one after another
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename Fun1, typename Fun2>
+    class Chainer : public Fun2::Impl
+    {
+        typedef Fun2 Base;
+
+    public:
+        typedef typename Base::ResultType ResultType;
+        typedef typename Base::Parm1 Parm1;
+        typedef typename Base::Parm2 Parm2;
+        typedef typename Base::Parm3 Parm3;
+        typedef typename Base::Parm4 Parm4;
+        typedef typename Base::Parm5 Parm5;
+        typedef typename Base::Parm6 Parm6;
+        typedef typename Base::Parm7 Parm7;
+        typedef typename Base::Parm8 Parm8;
+        typedef typename Base::Parm9 Parm9;
+        typedef typename Base::Parm10 Parm10;
+        typedef typename Base::Parm11 Parm11;
+        typedef typename Base::Parm12 Parm12;
+        typedef typename Base::Parm13 Parm13;
+        typedef typename Base::Parm14 Parm14;
+        typedef typename Base::Parm15 Parm15;
+        
+        Chainer(const Fun1& fun1, const Fun2& fun2) : f1_(fun1), f2_(fun2) {}
+
+        //
+        // VC7 don't see this implicit constructor
+        //
+
+        virtual ~Chainer() {}
+
+        DEFINE_CLONE_FUNCTORIMPL(Chainer)
+
+        // operator() implementations for up to 15 arguments
+
+        ResultType operator()()
+        { return f1_(), f2_(); }
+
+        ResultType operator()(Parm1 p1)
+        { return f1_(p1), f2_(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return f1_(p1, p2), f2_(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return f1_(p1, p2, p3), f2_(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return f1_(p1, p2, p3, p4), f2_(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return f1_(p1, p2, p3, p4, p5), f2_(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return f1_(p1, p2, p3, p4, p5, p6), f2_(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7),
+                f2_(p1, p2, p3, p4, p5, p6, p7);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                    p14),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                   p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                    p14, p15),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                    p14, p15);
+        }
+        
+    private:
+        Fun1 f1_;
+        Fun2 f2_;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// function template Chain
+// Chains two functor calls one after another
+////////////////////////////////////////////////////////////////////////////////
+
+
+    template <class Fun1, class Fun2>
+    Fun2 Chain(
+        const Fun1& fun1,
+        const Fun2& fun2)
+    {
+        //
+        // VC7 don't support the auto_ptr tricks
+        //
+        std::auto_ptr<typename Fun2::Impl> apParam
+        (
+            new Chainer<Fun1, Fun2>(fun1, fun2)
+        );
+
+        return Fun2(apParam);
+    }
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif  // FUNCTOR_INC_
Index: avida/current/source/third-party/Loki/MSVC/1300/HierarchyGenerators.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/HierarchyGenerators.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/HierarchyGenerators.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,423 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifdef _MSC_VER
+#pragma once
+
+#pragma warning( push )
+ 
+ // 'class1' : base-class 'class2' is already a base-class of 'class3'
+#pragma warning( disable : 4584 )
+
+#endif // _MSC_VER
+
+#ifndef HIERARCHYGENERATORS_INC_
+#define HIERARCHYGENERATORS_INC_
+
+#include "Typelist.h"
+#include "TypeTraits.h"
+#include "EmptyType.h"
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template GenScatterHierarchy
+// Generates a scattered hierarchy starting from a typelist and a template
+// Invocation (TList is a typelist, Model is a template of one arg):
+// GenScatterHierarchy<TList, Model>
+// The generated class inherits all classes generated by instantiating the 
+// template 'Model' with the types contained in TList 
+////////////////////////////////////////////////////////////////////////////////
+
+
+    template <typename T, template <typename> class Unit>
+    class GenScatterHierarchy;
+
+    namespace Private
+    {
+    // for some reason VC7 needs the base definition altough not in use
+    template <typename TListTag> 
+    struct GenScatterHierarchyHelper1
+    {
+        template <typename T, template <typename> class Unit>
+        struct In 
+        { 
+            typedef typename T::ERROR_THIS_INSTANCE_SELECTED Result; 
+        };
+    };
+
+    template <typename TListTag> 
+    struct GenScatterHierarchyHelper2
+    {
+        template <typename T, template <typename> class Unit>
+        struct In 
+        { 
+            typedef typename T::ERROR_THIS_INSTANCE_SELECTED Result; 
+        };
+    };
+
+    
+    template <> 
+    struct GenScatterHierarchyHelper1<TL::Typelist_tag>
+    {
+        template <class TList, template <typename> class Unit>
+        struct In
+        {
+            typedef GenScatterHierarchy<typename TList::Head, Unit> Result;
+        };
+    };
+
+    template <> 
+    struct GenScatterHierarchyHelper2<TL::Typelist_tag>
+    {
+        template <class TList, template <typename> class Unit>
+        struct In
+        {
+            typedef GenScatterHierarchy<typename TList::Tail, Unit> Result;
+        };
+    };
+    
+
+    template <> 
+    struct GenScatterHierarchyHelper1<TL::NoneList_tag>
+    {
+        template <typename AtomicType, template <typename> class Unit>
+        struct In { typedef Unit<AtomicType> Result; };
+    };
+
+    template <> 
+    struct GenScatterHierarchyHelper2<TL::NoneList_tag>
+    {
+        template <typename AtomicType, template <typename> class Unit>
+        struct In { struct Result {}; };        
+    };
+
+
+    template <> 
+    struct GenScatterHierarchyHelper1<TL::NullType_tag>
+    {
+        template <class TList, template <typename> class Unit>
+        struct In { struct Result {}; };        
+    };
+
+    template <> 
+    struct GenScatterHierarchyHelper2<TL::NullType_tag>
+    {
+        template <class TList, template <typename> class Unit>
+        struct In { struct Result {}; };        
+    };
+
+    } // namespace Private
+
+    template <typename T, template <typename> class Unit>
+    class GenScatterHierarchy
+        : public Private::GenScatterHierarchyHelper1
+          <
+            typename TL::is_Typelist<T>::type_tag
+          >
+          ::template In<T, Unit>::Result
+
+        , public Private::GenScatterHierarchyHelper2
+          <
+            typename TL::is_Typelist<T>::type_tag
+          >
+          ::template In<T, Unit>::Result
+    {
+    public:
+
+        typedef typename Private::GenScatterHierarchyHelper1
+        <
+            typename TL::is_Typelist<T>::type_tag
+        >
+        ::template In<T, Unit>::Result LeftBase;
+
+        typedef typename Private::GenScatterHierarchyHelper2
+        <
+            typename TL::is_Typelist<T>::type_tag
+        >
+        ::template In<T, Unit>::Result RightBase;
+    
+    
+        typedef typename Select
+        <
+            TL::is_Typelist<T>::value, T, void
+        >
+        ::Result TList;
+
+        template <typename T> struct Rebind
+        {
+            typedef Unit<T> Result;
+        };
+    };
+
+     
+////////////////////////////////////////////////////////////////////////////////
+// function template Field
+// Accesses a field in an object of a type generated with GenScatterHierarchy
+// Invocation (obj is an object of a type H generated with GenScatterHierarchy,
+//     T is a type in the typelist used to generate H):
+// Field<T>(obj)
+// returns a reference to Unit<T>, where Unit is the template used to generate H 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, class H>
+    typename H::template Rebind<T>::Result &
+    Field(H& obj)
+    {
+        return obj;
+    }
+     
+    template <class T, class H>
+    typename H::template Rebind<T>::Result const &
+    Field(H const & obj)
+    {
+        return obj;
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// function template TupleUnit
+// The building block of tuples 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    struct TupleUnit
+    {
+        T value_;
+        operator T&() { return value_; }
+        operator const T&() const { return value_; }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Tuple
+// Implements a tuple class that holds a number of values and provides field 
+//     access to them via the Field function (below) 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class TList>
+    struct Tuple : public GenScatterHierarchy<TList, TupleUnit>
+    {
+    };
+
+
+////////////////////////////////////////////////////////////////////////////////
+// helper class template FieldHelper
+// See Field below
+////////////////////////////////////////////////////////////////////////////////
+    
+    template <unsigned int i>
+    struct FieldHelper
+    {            
+        template<class H>
+        struct In
+        {
+        private:
+            typedef typename TL::TypeAt<typename H::TList, i>::Result ElementType;
+            typedef typename H::template Rebind<ElementType>::Result UnitType;
+            
+            enum { isConst = TypeTraits<H>::isConst };
+
+            typedef typename Select
+            <
+                isConst,
+                const typename H::RightBase,
+                typename H::RightBase
+            > 
+            ::Result RightBase;
+
+            typedef typename Select
+            <
+                SameType<UnitType, TupleUnit<ElementType> >::value, 
+                ElementType, 
+                UnitType
+            >
+            ::Result UnqualifiedResultType;
+
+        public:
+            typedef typename Select
+            <
+                isConst,
+                const UnqualifiedResultType,
+                UnqualifiedResultType
+            >
+            ::Result ResultType;
+            
+            static ResultType& Do(H& obj)
+            {
+                RightBase& rightBase = obj;
+                return FieldHelper<i - 1>::template In<RightBase>::Do(rightBase);
+            }
+        };
+    };
+
+    template <>
+    struct FieldHelper<0>
+    {            
+        template<class H>
+        struct In
+        {
+        private:
+            typedef typename H::TList::Head ElementType;
+            typedef typename H::template Rebind<ElementType>::Result UnitType;
+            
+            enum { isConst = TypeTraits<H>::isConst };
+
+            typedef typename Select
+            <
+                isConst,
+                const typename H::LeftBase,
+                typename H::LeftBase
+            > 
+            ::Result LeftBase;
+
+            typedef typename Select
+            <
+                SameType<UnitType, TupleUnit<ElementType> >::value, 
+                ElementType, 
+                UnitType
+            >
+            ::Result UnqualifiedResultType;
+
+        public:
+            typedef typename Select
+            <
+                isConst,
+                const UnqualifiedResultType,
+                UnqualifiedResultType
+            >
+            ::Result ResultType;
+            
+            static ResultType& Do(H& obj)
+            {
+                LeftBase& leftBase = obj;
+                return leftBase;
+            }
+        };
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// function template Field
+// Accesses a field in an object of a type generated with GenScatterHierarchy
+// Invocation (obj is an object of a type H generated with GenScatterHierarchy,
+//     i is the index of a type in the typelist used to generate H):
+// Field<i>(obj)
+// returns a reference to Unit<T>, where Unit is the template used to generate H
+//     and T is the i-th type in the typelist 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <unsigned int i, class H>
+    typename FieldHelper<i>::template In<H>::ResultType&
+    Field(H& obj)
+    {
+        return FieldHelper<i>::template In<H>::Do(obj);
+    }
+                
+////////////////////////////////////////////////////////////////////////////////
+// class template GenLinearHierarchy
+// Generates a linear hierarchy starting from a typelist and a template
+// Invocation (TList is a typelist, Model is a template of two args):
+// GenLinearHierarchy<TList, Model, Root>
+////////////////////////////////////////////////////////////////////////////////
+    
+    template
+    <
+        class TList,
+        template <class AtomicType, class UnitBase> class Unit,
+        class Root = EmptyType
+    >
+    class GenLinearHierarchy;
+
+    namespace Private
+    {
+    
+    template <typename TListTag> 
+    struct GenLinearHierarchyHelper
+    {
+        template<class TList, template <class, class> class Unit, class Root>
+        struct In 
+        {
+            typedef typename TList::ERROR_THIS_INSTANCE_SELECTED Result; 
+        };
+    };
+    
+    template <> 
+    struct GenLinearHierarchyHelper<TL::Typelist_tag>
+    {
+        template<class TList, template <class, class> class Unit, class Root>
+        struct In 
+        {
+        private:
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+
+        public:
+            typedef Unit< Head, GenLinearHierarchy<Tail, Unit, Root> > Result; 
+        };
+    };
+
+    template <> 
+    struct GenLinearHierarchyHelper<TL::NullType_tag>
+    {
+        template<class TList, template <class, class> class Unit, class Root>
+        struct In
+        {
+        private:
+            typedef typename TList::Head Head;
+
+        public:
+            typedef Unit<Head, Root> Result;
+        };
+    };
+
+    } // namespace Private
+
+    template
+    <
+        class TList,
+        template <class AtomicType, class UnitBase> class Unit,
+        class Root
+    >
+    class GenLinearHierarchy
+        : public Private::GenLinearHierarchyHelper
+          <
+            typename TL::is_Typelist<typename TList::Tail>::type_tag
+          >
+          ::template In<TList, Unit, Root>::Result
+    {
+        ASSERT_TYPELIST(TList); // TList must not be NullType
+
+    public:
+        typedef typename Private::GenLinearHierarchyHelper
+        <
+            typename TL::is_Typelist<typename TList::Tail>::type_tag
+        >
+        ::template In<TList, Unit, Root>::Result LinBase;
+    };
+
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // HIERARCHYGENERATORS_INC_
+
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif // _MSC_VER
+
Index: avida/current/source/third-party/Loki/MSVC/1300/MinMax.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/MinMax.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/MinMax.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,112 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef MINMAX_INC_
+#define MINMAX_INC_
+
+#include "Typelist.h"
+#include "TypeTraits.h"
+
+namespace Private
+{
+    typedef TYPELIST_14(
+            const bool,
+            const char,
+            const signed char,
+            const unsigned char,
+            const wchar_t,
+            const short int,
+            const unsigned short int,
+            const int,
+            const unsigned int,
+            const long int,
+            const unsigned long int,
+            const float,
+            const double,
+            const long double)
+        ArithTypes;
+}
+
+template <class L, class R>
+class MinMaxTraits
+{
+    typedef typename Loki::Select<Loki::Conversion<R, L>::exists, 
+            L, R>::Result
+        T1;
+    
+    enum { pos1 = Loki::TL::IndexOf<Private::ArithTypes, const L>::value };
+    enum { pos2 = Loki::TL::IndexOf<Private::ArithTypes, const R>::value };
+    typedef Loki::Select<pos1 != -1 && pos1 < pos2, R, T1>::Result T2;
+
+    enum { rConst = Loki::TypeTraits<R>::isConst >=
+        Loki::TypeTraits<L>::isConst };
+    enum { l2r = rConst && Loki::Conversion<
+        typename Loki::TypeTraits<L>::NonConstType&, 
+        typename Loki::TypeTraits<R>::NonConstType&>::exists };
+    typedef typename Loki::Select<l2r, R&, T2>::Result T3;
+
+    enum { lConst = Loki::TypeTraits<L>::isConst >=
+        Loki::TypeTraits<R>::isConst };
+    enum { r2l = lConst && Loki::Conversion<
+        typename Loki::TypeTraits<R>::NonConstType&, 
+        typename Loki::TypeTraits<L>::NonConstType&>::exists };
+public:
+    typedef typename Loki::Select<r2l, L&, T3>::Result Result;
+};
+
+template <class L, class R>
+typename MinMaxTraits<L, R>::Result
+Min(L& lhs, R& rhs)
+{ if (lhs < rhs) return lhs; return rhs; }
+
+template <class L, class R>
+typename MinMaxTraits<const L, R>::Result
+Min(const L& lhs, R& rhs)
+{ if (lhs < rhs) return lhs; return rhs; }
+
+template <class L, class R>
+typename MinMaxTraits<L, const R>::Result
+Min(L& lhs, const R& rhs)
+{ if (lhs < rhs) return lhs; return rhs; }
+
+template <class L, class R>
+typename MinMaxTraits<const L, const R>::Result
+Min(const L& lhs, const R& rhs)
+{ if (lhs < rhs) return lhs; return rhs; }
+
+template <class L, class R>
+typename MinMaxTraits<L, R>::Result
+Max(L& lhs, R& rhs)
+{ if (lhs > rhs) return lhs; return rhs; }
+
+template <class L, class R>
+typename MinMaxTraits<const L, R>::Result
+Max(const L& lhs, R& rhs)
+{ if (lhs > rhs) return lhs; return rhs; }
+
+template <class L, class R>
+typename MinMaxTraits<L, const R>::Result
+Max(L& lhs, const R& rhs)
+{ if (lhs > rhs) return lhs; return rhs; }
+
+template <class L, class R>
+typename MinMaxTraits<const L, const R>::Result
+Max(const L& lhs, const R& rhs)
+{ if (lhs > rhs) return lhs; return rhs; }
+
+
+#endif // MINMAX_INC_
Index: avida/current/source/third-party/Loki/MSVC/1300/MultiMethods.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/MultiMethods.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/MultiMethods.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,418 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef MULTIMETHODS_INC_
+#define MULTIMETHODS_INC_
+
+#include "Typelist.h"
+#include "TypeInfo.h"
+#include "Functor.h"
+#include "AssocVector.h"
+
+////////////////////////////////////////////////////////////////////////////////
+// IMPORTANT NOTE:
+// The double dispatchers implemented below differ from the excerpts shown in
+// the book - they are simpler while respecting the same interface.
+////////////////////////////////////////////////////////////////////////////////
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template InvocationTraits (helper)
+// Helps implementing optional symmetry
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class SomeLhs, class SomeRhs, 
+            class Executor, typename ResultType>
+        struct InvocationTraits
+        {
+            static ResultType 
+        DoDispatch(SomeLhs& lhs, SomeRhs& rhs, 
+            Executor& exec, Int2Type<false>)
+            {
+                return exec.Fire(lhs, rhs);
+            }
+            static ResultType 
+        DoDispatch(SomeLhs& lhs, SomeRhs& rhs, 
+            Executor& exec, Int2Type<true>)
+            {
+                return exec.Fire(rhs, lhs);
+            }
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template StaticDispatcher
+// Implements an automatic static double dispatcher based on two typelists
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class Executor,
+        class BaseLhs, 
+        class TypesLhs,
+        bool symmetric = true,
+        class BaseRhs = BaseLhs,
+        class TypesRhs = TypesLhs,
+        typename ResultType = void
+    >
+    class StaticDispatcher
+    {
+        template <class SomeLhs>
+        static ResultType DispatchRhs(SomeLhs& lhs, BaseRhs& rhs,
+            Executor exec, NullType)
+        { return exec.OnError(lhs, rhs); }
+        
+        template <class Head, class Tail, class SomeLhs>
+        static ResultType DispatchRhs(SomeLhs& lhs, BaseRhs& rhs,
+            Executor exec, Typelist<Head, Tail>)
+        {            
+            if (Head* p2 = dynamic_cast<Head*>(&rhs))
+            {
+                Int2Type<(symmetric &&
+                          int(TL::IndexOf<TypesRhs, Head>::value) <
+                          int(TL::IndexOf<TypesLhs, SomeLhs>::value))> i2t;
+
+                typedef Private::InvocationTraits< 
+                        SomeLhs, Head, Executor, ResultType> CallTraits;
+                    
+                return CallTraits::DoDispatch(lhs, *p2, exec, i2t);
+            }
+            return DispatchRhs(lhs, rhs, exec, Tail());
+        }
+
+        static ResultType DispatchLhs(BaseLhs& lhs, BaseRhs& rhs,
+            Executor exec, NullType)
+        { return exec.OnError(lhs, rhs); }
+        
+        template <class Head, class Tail>
+        static ResultType DispatchLhs(BaseLhs& lhs, BaseRhs& rhs,
+            Executor exec, Typelist<Head, Tail>)
+        {            
+            if (Head* p1 = dynamic_cast<Head*>(&lhs))
+            {
+                return DispatchRhs(*p1, rhs, exec, TypesRhs());
+            }
+            return DispatchLhs(lhs, rhs, exec, Tail());
+        }
+
+    public:
+        static ResultType Go(BaseLhs& lhs, BaseRhs& rhs,
+            Executor exec)
+        { return DispatchLhs(lhs, rhs, exec, TypesLhs()); }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template BasicDispatcher
+// Implements a logarithmic double dispatcher for functors (or functions)
+// Doesn't offer automated casts or symmetry
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class BaseLhs,
+        class BaseRhs = BaseLhs,
+        typename ResultType = void,
+        typename CallbackType = ResultType (*)(BaseLhs&, BaseRhs&)
+    >
+    class BasicDispatcher
+    {
+        typedef std::pair<TypeInfo,TypeInfo> KeyType;
+        typedef CallbackType MappedType;
+        typedef AssocVector<KeyType, MappedType> MapType;
+        MapType callbackMap_;
+        
+        void DoAdd(TypeInfo lhs, TypeInfo rhs, CallbackType fun);
+        bool DoRemove(TypeInfo lhs, TypeInfo rhs);
+        
+    public:
+        template <class SomeLhs, class SomeRhs>
+        void Add(CallbackType fun)
+        {
+            DoAdd(typeid(SomeLhs), typeid(SomeRhs), fun);
+        }
+        
+        template <class SomeLhs, class SomeRhs>
+        bool Remove()
+        {
+            return DoRemove(typeid(SomeLhs), typeid(SomeRhs));
+        }
+        
+        ResultType Go(BaseLhs& lhs, BaseRhs& rhs);
+    };
+
+    // Non-inline to reduce compile time overhead...
+    template <class BaseLhs, class BaseRhs, 
+        typename ResultType, typename CallbackType>
+    void BasicDispatcher<BaseLhs,BaseRhs,ResultType,CallbackType>
+         ::DoAdd(TypeInfo lhs, TypeInfo rhs, CallbackType fun)
+    {
+        callbackMap_[KeyType(lhs, rhs)] = fun;
+    }
+        
+    template <class BaseLhs, class BaseRhs, 
+        typename ResultType, typename CallbackType>
+    bool BasicDispatcher<BaseLhs,BaseRhs,ResultType,CallbackType>
+         ::DoRemove(TypeInfo lhs, TypeInfo rhs)
+    {
+        return callbackMap_.erase(KeyType(lhs, rhs)) == 1;
+    }
+
+    template <class BaseLhs, class BaseRhs, 
+        typename ResultType, typename CallbackType>
+    ResultType BasicDispatcher<BaseLhs,BaseRhs,ResultType,CallbackType>
+               ::Go(BaseLhs& lhs, BaseRhs& rhs)
+    {
+        typename MapType::key_type k(typeid(lhs),typeid(rhs));
+        typename MapType::iterator i = callbackMap_.find(k);
+        if (i == callbackMap_.end())
+        {
+                throw std::runtime_error("Function not found");
+        }
+        return (i->second)(lhs, rhs);
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template StaticCaster
+// Implementation of the CastingPolicy used by FunctorDispatcher
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class To, class From>
+    struct StaticCaster
+    {
+        static To& Cast(From& obj)
+        {
+            return static_cast<To&>(obj);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DynamicCaster
+// Implementation of the CastingPolicy used by FunctorDispatcher
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class To, class From>
+    struct DynamicCaster
+    {
+        static To& Cast(From& obj)
+        {
+            return dynamic_cast<To&>(obj);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Private::FnDispatcherHelper
+// Implements trampolines and argument swapping used by FnDispatcher
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class BaseLhs, class BaseRhs,
+        class SomeLhs, class SomeRhs,
+            typename ResultType,
+            class CastLhs, class CastRhs,
+            ResultType (*Callback)(SomeLhs&, SomeRhs&)>
+        struct FnDispatcherHelper
+        {
+            static ResultType Trampoline(BaseLhs& lhs, BaseRhs& rhs)
+            {
+                return Callback(CastLhs::Cast(lhs), CastRhs::Cast(rhs));
+            }
+            static ResultType TrampolineR(BaseRhs& rhs, BaseLhs& lhs)
+            {
+                return Trampoline(lhs, rhs);
+            }
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FnDispatcher
+// Implements an automatic logarithmic double dispatcher for functions
+// Features automated conversions
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class BaseLhs, class BaseRhs = BaseLhs,
+              typename ResultType = void,
+              template <class, class> class CastingPolicy = DynamicCaster,
+              template <class, class, class, class>
+              class DispatcherBackend = BasicDispatcher>
+    class FnDispatcher
+    {
+        DispatcherBackend<BaseLhs, BaseRhs, ResultType, 
+            ResultType (*)(BaseLhs&, BaseRhs&)> backEnd_;
+        
+    public:
+        template <class SomeLhs, class SomeRhs>
+        void Add(ResultType (*pFun)(BaseLhs&, BaseRhs&))
+        {
+            return backEnd_.Add<SomeLhs, SomeRhs>(pFun);
+        }        
+        
+        template <class SomeLhs, class SomeRhs,
+            ResultType (*callback)(SomeLhs&, SomeRhs&)>
+        void Add()
+        {
+        typedef Private::FnDispatcherHelper<
+                    BaseLhs, BaseRhs, 
+                    SomeLhs, SomeRhs,
+                    ResultType,
+                    CastingPolicy<SomeLhs,BaseLhs>, 
+                    CastingPolicy<SomeRhs,BaseRhs>, 
+                    callback> Local;
+
+            Add<SomeLhs, SomeRhs>(&Local::Trampoline);
+        }
+        
+        template <class SomeLhs, class SomeRhs,
+            ResultType (*callback)(SomeLhs&, SomeRhs&),
+            bool symmetric>
+        void Add()
+        {
+        typedef Private::FnDispatcherHelper<
+                    BaseLhs, BaseRhs, 
+                    SomeLhs, SomeRhs,
+                    ResultType,
+                    CastingPolicy<SomeLhs,BaseLhs>, 
+                    CastingPolicy<SomeRhs,BaseRhs>, 
+                    callback> Local;
+
+            Add<SomeLhs, SomeRhs>(&Local::Trampoline);
+            if (symmetric)
+            {
+                Add<SomeRhs, SomeLhs>(&Local::TrampolineR);
+            }
+        }
+        
+        template <class SomeLhs, class SomeRhs>
+        void Remove()
+        {
+            backEnd_.Remove<SomeLhs, SomeRhs>();
+        }
+
+        ResultType Go(BaseLhs& lhs, BaseRhs& rhs)
+        {
+            return backEnd_.Go(lhs, rhs);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorDispatcherAdaptor
+// permits use of FunctorDispatcher under gcc.2.95.2/3
+///////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+    template <class BaseLhs, class BaseRhs,
+          class SomeLhs, class SomeRhs,
+          typename ResultType,
+          class CastLhs, class CastRhs,
+          class Fun, bool SwapArgs>
+        class FunctorDispatcherHelper 
+        {
+            Fun fun_;
+            ResultType Fire(BaseLhs& lhs, BaseRhs& rhs,Int2Type<false>)
+            {
+                return fun_(CastLhs::Cast(lhs), CastRhs::Cast(rhs));
+            }
+            ResultType Fire(BaseLhs& rhs, BaseRhs& lhs,Int2Type<true>)
+            {
+                return fun_(CastLhs::Cast(lhs), CastRhs::Cast(rhs));
+            }
+        public:
+            FunctorDispatcherHelper(const Fun& fun) : fun_(fun) {}
+
+            ResultType operator()(BaseLhs& lhs, BaseRhs& rhs)
+            {
+                return Fire(lhs,rhs,Int2Type<SwapArgs>());
+            }
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorDispatcher
+// Implements a logarithmic double dispatcher for functors
+// Features automated casting
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class BaseLhs, class BaseRhs = BaseLhs,
+              typename ResultType = void,
+              template <class, class> class CastingPolicy = DynamicCaster, 
+              template <class, class, class, class>
+              class DispatcherBackend = BasicDispatcher>
+    class FunctorDispatcher
+    {
+        typedef TYPELIST_2(BaseLhs&, BaseRhs&) ArgsList;
+        typedef Functor<ResultType, ArgsList, DEFAULT_THREADING> FunctorType;
+
+        DispatcherBackend<BaseLhs, BaseRhs, ResultType, FunctorType> backEnd_;
+
+    public:
+        template <class SomeLhs, class SomeRhs, class Fun>
+        void Add(const Fun& fun)
+        {
+            typedef Private::FunctorDispatcherHelper<
+                    BaseLhs, BaseRhs,
+                    SomeLhs, SomeRhs,
+                    ResultType,
+                    CastingPolicy<SomeLhs, BaseLhs>,
+                    CastingPolicy<SomeRhs, BaseRhs>,
+                    Fun, false> Adapter;
+
+            backEnd_.Add<SomeLhs, SomeRhs>(FunctorType(Adapter(fun)));
+    }
+        template <class SomeLhs, class SomeRhs, bool symmetric, class Fun>
+        void Add(const Fun& fun)
+        {
+        Add<SomeLhs,SomeRhs>(fun);
+
+        if (symmetric)
+        {
+        // Note: symmetry only makes sense where BaseLhs==BaseRhs
+                typedef Private::FunctorDispatcherHelper<
+                    BaseLhs, BaseLhs,
+                    SomeLhs, SomeRhs,
+                    ResultType,
+                    CastingPolicy<SomeLhs, BaseLhs>,
+                    CastingPolicy<SomeRhs, BaseLhs>,
+                    Fun, true> AdapterR;
+
+                backEnd_.Add<SomeRhs, SomeLhs>(FunctorType(AdapterR(fun)));
+        }
+        }
+        
+        template <class SomeLhs, class SomeRhs>
+        void Remove()
+        {
+            backEnd_.Remove<SomeLhs, SomeRhs>();
+        }
+
+        ResultType Go(BaseLhs& lhs, BaseRhs& rhs)
+        {
+            return backEnd_.Go(lhs, rhs);
+        }
+    };
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: avida/current/source/third-party/Loki/MSVC/1300/NullType.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/NullType.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/NullType.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef NULLTYPE_INC_
+#define NULLTYPE_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class NullType
+// Used as a placeholder for "no type here"
+// Useful as an end marker in typelists 
+////////////////////////////////////////////////////////////////////////////////
+
+    class NullType 
+    {
+    public:
+        struct Head { private: Head(); };
+        struct Tail { private: Tail(); };
+    };
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // NULLTYPE_INC_
+
Index: avida/current/source/third-party/Loki/MSVC/1300/Singleton.cpp
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/Singleton.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/Singleton.cpp	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#include "Singleton.h"
+
+using namespace Loki::Private;
+
+Loki::Private::TrackerArray Loki::Private::pTrackerArray = 0;
+unsigned int Loki::Private::elements = 0;
+
+////////////////////////////////////////////////////////////////////////////////
+// function AtExitFn
+// Ensures proper destruction of objects with longevity
+////////////////////////////////////////////////////////////////////////////////
+
+void Loki::Private::AtExitFn()
+{
+    assert(elements > 0 && pTrackerArray != 0);
+    // Pick the element at the top of the stack
+    LifetimeTracker* pTop = pTrackerArray[elements - 1];
+    // Remove that object off the stack
+    // Don't check errors - realloc with less memory 
+    //     can't fail
+    pTrackerArray = static_cast<TrackerArray>(std::realloc(
+        pTrackerArray, sizeof(*pTrackerArray) * --elements));
+    // Destroy the element
+    delete pTop;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
Index: avida/current/source/third-party/Loki/MSVC/1300/Singleton.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/Singleton.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/Singleton.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,440 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef SINGLETON_INC_
+#define SINGLETON_INC_
+
+#include "Threads.h"
+#include <algorithm>
+#include <stdexcept>
+#include <cassert>
+#include <cstdlib>
+#include <new>
+
+namespace Loki
+{
+    namespace Private
+    {
+////////////////////////////////////////////////////////////////////////////////
+// class LifetimeTracker
+// Helper class for SetLongevity
+////////////////////////////////////////////////////////////////////////////////
+
+        class LifetimeTracker
+        {
+        public:
+            LifetimeTracker(unsigned int x) : longevity_(x) 
+            {}
+            
+            virtual ~LifetimeTracker() = 0;
+            
+            static bool Compare(const LifetimeTracker* lhs,
+                const LifetimeTracker* rhs)
+            {
+                return lhs->longevity_ > rhs->longevity_;
+            }
+            
+        private:
+            unsigned int longevity_;
+        };
+        
+        // Definition required
+        inline LifetimeTracker::~LifetimeTracker() {} 
+        
+        // Helper data
+        typedef LifetimeTracker** TrackerArray;
+        extern TrackerArray pTrackerArray;
+        extern unsigned int elements;
+
+        // Helper destroyer function
+        template <typename T>
+        struct Deleter
+        {
+            static void Delete(T* pObj)
+            { delete pObj; }
+        };
+
+        // Concrete lifetime tracker for objects of type T
+        template <typename T, typename Destroyer>
+        class ConcreteLifetimeTracker : public LifetimeTracker
+        {
+        public:
+            ConcreteLifetimeTracker(T* p,unsigned int longevity, Destroyer d)
+                : LifetimeTracker(longevity)
+                , pTracked_(p)
+                , destroyer_(d)
+            {}
+            
+            ~ConcreteLifetimeTracker()
+            { destroyer_(pTracked_); }
+            
+        private:
+            T* pTracked_;
+            Destroyer destroyer_;
+        };
+
+        void AtExitFn(); // declaration needed below
+    
+    } // namespace Private
+
+////////////////////////////////////////////////////////////////////////////////
+// function template SetLongevity
+// Assigns an object a longevity; ensures ordered destructions of objects 
+//     registered thusly during the exit sequence of the application
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T, typename Destroyer>
+    void SetLongevity(T* pDynObject, unsigned int longevity,
+        Destroyer d = Private::Deleter<T>::Delete)
+    {
+        using namespace Private;
+        
+        TrackerArray pNewArray = static_cast<TrackerArray>(
+                std::realloc(pTrackerArray, sizeof(*pTrackerArray) * (elements + 1)));
+        if (!pNewArray) throw std::bad_alloc();
+        
+        // Delayed assignment for exception safety
+        pTrackerArray = pNewArray;
+
+        LifetimeTracker* p = new ConcreteLifetimeTracker<T, Destroyer>(
+            pDynObject, longevity, d);
+                
+        // Insert a pointer to the object into the queue
+        TrackerArray pos = std::upper_bound(
+            pTrackerArray, 
+            pTrackerArray + elements, 
+            p, 
+            LifetimeTracker::Compare);
+        std::copy_backward(
+            pos, 
+            pTrackerArray + elements,
+            pTrackerArray + elements + 1);
+        *pos = p;
+        ++elements;
+        
+        // Register a call to AtExitFn
+        std::atexit(Private::AtExitFn);
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template CreateUsingNew
+// Implementation of the CreationPolicy used by SingletonHolder
+// Creates objects using a straight call to the new operator 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T> struct CreateUsingNew
+    {
+        static T* Create()
+        { return new T; }
+        
+        static void Destroy(T* p)
+        { delete p; }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template CreateUsingNew
+// Implementation of the CreationPolicy used by SingletonHolder
+// Creates objects using a call to std::malloc, followed by a call to the 
+//     placement new operator
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T> struct CreateUsingMalloc
+    {
+        static T* Create()
+        {
+            void* p = std::malloc(sizeof(T));
+            if (!p) return 0;
+            return new(p) T;
+        }
+        
+        static void Destroy(T* p)
+        {
+            p->~T();
+            std::free(p);
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template CreateStatic
+// Implementation of the CreationPolicy used by SingletonHolder
+// Creates an object in static memory
+// Implementation is slightly nonportable because it uses the MaxAlign trick 
+//     (an union of all types to ensure proper memory alignment). This trick is 
+//     nonportable in theory but highly portable in practice.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T> struct CreateStatic
+    {        
+#ifdef _MSC_VER
+#pragma warning( push ) 
+ // alignment of a member was sensitive to packing
+#pragma warning( disable : 4121 )
+#endif // _MSC_VER
+        union MaxAlign
+        {
+            char t_[sizeof(T)];
+            short int shortInt_;
+            int int_;
+            long int longInt_;
+            float float_;
+            double double_;
+            long double longDouble_;
+            struct Test;
+            int Test::* pMember_;
+            int (Test::*pMemberFn_)(int);
+        };
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif // _MSC_VER
+        
+        static T* Create()
+        {
+            static MaxAlign staticMemory_;
+            return new(&staticMemory_) T;
+        }
+        
+        static void Destroy(T* p)
+        {
+            p->~T();
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template DefaultLifetime
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Schedules an object's destruction as per C++ rules
+// Forwards to std::atexit
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    struct DefaultLifetime
+    {
+        static void ScheduleDestruction(T*, void (*pFun)())
+        { std::atexit(pFun); }
+        
+        static void OnDeadReference()
+        { throw std::logic_error("Dead Reference Detected"); }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template PhoenixSingleton
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Schedules an object's destruction as per C++ rules, and it allows object 
+//    recreation by not throwing an exception from OnDeadReference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class PhoenixSingleton
+    {
+    public:
+        static void ScheduleDestruction(T*, void (*pFun)())
+        {
+#ifndef ATEXIT_FIXED
+            if (!destroyedOnce_)
+#endif
+                std::atexit(pFun);
+        }
+        
+        static void OnDeadReference()
+        {
+#ifndef ATEXIT_FIXED
+            destroyedOnce_ = true;
+#endif
+        }
+        
+    private:
+#ifndef ATEXIT_FIXED
+        static bool destroyedOnce_;
+#endif
+    };
+    
+#ifndef ATEXIT_FIXED
+    template <class T> bool PhoenixSingleton<T>::destroyedOnce_ = false;
+#endif
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template Adapter
+// Helper for SingletonWithLongevity below
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class T>
+        struct Adapter
+        {
+            void operator()(T*) { return pFun_(); }
+            void (*pFun_)();
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SingletonWithLongevity
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Schedules an object's destruction in order of their longevities
+// Assumes a visible function GetLongevity(T*) that returns the longevity of the
+//     object
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class SingletonWithLongevity
+    {
+    public:
+        static void ScheduleDestruction(T* pObj, void (*pFun)())
+        {
+            Private::Adapter<T> adapter = { pFun };
+            SetLongevity(pObj, GetLongevity(pObj), adapter);
+        }
+        
+        static void OnDeadReference()
+        { throw std::logic_error("Dead Reference Detected"); }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template NoDestroy
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Never destroys the object
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    struct NoDestroy
+    {
+        static void ScheduleDestruction(T*, void (*)())
+        {}
+        
+        static void OnDeadReference()
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SingletonHolder
+// Provides Singleton amenities for a type T
+// To protect that type from spurious instantiations, you have to protect it
+//     yourself.
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class ClientType,
+        class ThreadingModelType,
+        class PtrInstanceType
+    >
+    class SingletonHolderStaticData
+    {
+        friend ClientType; // illegal (11.4/2) but works with VC
+        static ThreadingModelType s_ThreadingModelData;
+        static PtrInstanceType    s_pInstance;
+        static bool               s_destroyed;
+    };
+
+    template<class C, class M, class P>
+    M SingletonHolderStaticData<C, M, P>::s_ThreadingModelData;
+
+    template<class C, class M, class P>
+    P SingletonHolderStaticData<C, M, P>::s_pInstance;
+
+    template<class C, class M, class P>
+    bool SingletonHolderStaticData<C, M, P>::s_destroyed;
+
+    template
+    <
+        typename T,
+        template <class> class CreationPolicy = CreateUsingNew,
+        template <class> class LifetimePolicy = DefaultLifetime,
+        template <class> class ThreadingModel = SingleThreaded
+    >
+    class SingletonHolder
+    {
+        typedef typename ThreadingModel<T*>::VolatileType PtrInstanceType;
+
+        typedef SingletonHolderStaticData
+        <
+            SingletonHolder,
+            ThreadingModel<T>,
+            PtrInstanceType
+        >
+        MySingletonHolderStaticData;
+
+    public:
+        static T& Instance()
+        {
+            if (!pInstance_())
+            {
+                MakeInstance();
+            }
+            return *pInstance_();
+        }
+        
+    private:
+        // Helpers
+        static void MakeInstance()
+        {
+            typename ThreadingModel<T>::Lock guard(
+                MySingletonHolderStaticData::s_ThreadingModelData);
+
+            (void)guard;
+
+            if (!pInstance_())
+            {
+                if (destroyed_())
+                {
+                    LifetimePolicy<T>::OnDeadReference();
+                    destroyed_() = false;
+                }
+
+                pInstance_() = CreationPolicy<T>::Create();
+
+                LifetimePolicy<T>::ScheduleDestruction
+                (
+                    pInstance_(), 
+                    &DestroySingleton
+                );
+            }
+        }
+
+        static void DestroySingleton()
+        {
+            assert(!destroyed_());
+            CreationPolicy<T>::Destroy(pInstance_());
+            pInstance_() = 0;
+            destroyed_() = true;
+        }
+        
+        // Protection
+        SingletonHolder();
+        
+        // Data
+        static PtrInstanceType &pInstance_()
+        {
+            return MySingletonHolderStaticData::s_pInstance;
+        }
+
+        static bool &destroyed_()
+        {
+            return MySingletonHolderStaticData::s_destroyed;
+        }
+    };
+    
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// May 21, 2001: Correct the volatile qualifier - credit due to Darin Adler
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // SINGLETON_INC_
Index: avida/current/source/third-party/Loki/MSVC/1300/SmallObj.cpp
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/SmallObj.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/SmallObj.cpp	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,418 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: March 20, 2001
+
+#include "SmallObj.h"
+#include <cassert>
+#include <algorithm>
+
+using namespace Loki;
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Init
+// Initializes a chunk object
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Init(std::size_t blockSize, unsigned char blocks)
+{
+    assert(blockSize > 0);
+    assert(blocks > 0);
+    // Overflow check
+    assert((blockSize * blocks) / blockSize == blocks);
+    
+    pData_ = new unsigned char[blockSize * blocks];
+    Reset(blockSize, blocks);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Reset
+// Clears an already allocated chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Reset(std::size_t blockSize, unsigned char blocks)
+{
+    assert(blockSize > 0);
+    assert(blocks > 0);
+    // Overflow check
+    assert((blockSize * blocks) / blockSize == blocks);
+
+    firstAvailableBlock_ = 0;
+    blocksAvailable_ = blocks;
+
+    unsigned char i = 0;
+    unsigned char* p = pData_;
+    for (; i != blocks; p += blockSize)
+    {
+        *p = ++i;
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Release
+// Releases the data managed by a chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Release()
+{
+    delete[] pData_;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Allocate
+// Allocates a block from a chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void* FixedAllocator::Chunk::Allocate(std::size_t blockSize)
+{
+    if (!blocksAvailable_) return 0;
+    
+    assert((firstAvailableBlock_ * blockSize) / blockSize == 
+        firstAvailableBlock_);
+
+    unsigned char* pResult =
+        pData_ + (firstAvailableBlock_ * blockSize);
+    firstAvailableBlock_ = *pResult;
+    --blocksAvailable_;
+    
+    return pResult;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Deallocate
+// Dellocates a block from a chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Deallocate(void* p, std::size_t blockSize)
+{
+    assert(p >= pData_);
+
+    unsigned char* toRelease = static_cast<unsigned char*>(p);
+    // Alignment check
+    assert((toRelease - pData_) % blockSize == 0);
+
+    *toRelease = firstAvailableBlock_;
+    firstAvailableBlock_ = static_cast<unsigned char>(
+        (toRelease - pData_) / blockSize);
+    // Truncation check
+    assert(firstAvailableBlock_ == (toRelease - pData_) / blockSize);
+
+    ++blocksAvailable_;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::FixedAllocator
+// Creates a FixedAllocator object of a fixed block size
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::FixedAllocator(std::size_t blockSize)
+    : blockSize_(blockSize)
+    , allocChunk_(0)
+    , deallocChunk_(0)
+{
+    assert(blockSize_ > 0);
+    
+    prev_ = next_ = this;
+
+    std::size_t numBlocks = DEFAULT_CHUNK_SIZE / blockSize;
+    if (numBlocks > UCHAR_MAX) numBlocks = UCHAR_MAX;
+    else if (numBlocks == 0) numBlocks = 8 * blockSize;
+    
+    numBlocks_ = static_cast<unsigned char>(numBlocks);
+    assert(numBlocks_ == numBlocks);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::FixedAllocator(const FixedAllocator&)
+// Creates a FixedAllocator object of a fixed block size
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::FixedAllocator(const FixedAllocator& rhs)
+    : blockSize_(rhs.blockSize_)
+    , numBlocks_(rhs.numBlocks_)
+    , chunks_(rhs.chunks_)
+{
+    prev_ = &rhs;
+    next_ = rhs.next_;
+    rhs.next_->prev_ = this;
+    rhs.next_ = this;
+    
+    allocChunk_ = rhs.allocChunk_
+        ? &chunks_.front() + (rhs.allocChunk_ - &rhs.chunks_.front())
+        : 0;
+
+    deallocChunk_ = rhs.deallocChunk_
+        ? &chunks_.front() + (rhs.deallocChunk_ - &rhs.chunks_.front())
+        : 0;
+}
+
+FixedAllocator& FixedAllocator::operator=(const FixedAllocator& rhs)
+{
+    FixedAllocator copy(rhs);
+    copy.Swap(*this);
+    return *this;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::~FixedAllocator
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::~FixedAllocator()
+{
+    if (prev_ != this)
+    {
+        prev_->next_ = next_;
+        next_->prev_ = prev_;
+        return;
+    }
+    
+    assert(prev_ == next_);
+    Chunks::iterator i = chunks_.begin();
+    for (; i != chunks_.end(); ++i)
+    {
+       assert(i->blocksAvailable_ == numBlocks_);
+       i->Release();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Swap
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Swap(FixedAllocator& rhs)
+{
+    using namespace std;
+    
+    swap(blockSize_, rhs.blockSize_);
+    swap(numBlocks_, rhs.numBlocks_);
+    chunks_.swap(rhs.chunks_);
+    swap(allocChunk_, rhs.allocChunk_);
+    swap(deallocChunk_, rhs.deallocChunk_);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Allocate
+// Allocates a block of fixed size
+////////////////////////////////////////////////////////////////////////////////
+
+void* FixedAllocator::Allocate()
+{
+    if (allocChunk_ == 0 || allocChunk_->blocksAvailable_ == 0)
+    {
+        Chunks::iterator i = chunks_.begin();
+        for (;; ++i)
+        {
+            if (i == chunks_.end())
+            {
+                // Initialize
+                chunks_.reserve(chunks_.size() + 1);
+                Chunk newChunk;
+                newChunk.Init(blockSize_, numBlocks_);
+                chunks_.push_back(newChunk);
+                allocChunk_ = &chunks_.back();
+                deallocChunk_ = &chunks_.front();
+                break;
+            }
+            if (i->blocksAvailable_ > 0)
+            {
+                allocChunk_ = &*i;
+                break;
+            }
+        }
+    }
+    assert(allocChunk_ != 0);
+    assert(allocChunk_->blocksAvailable_ > 0);
+    
+    return allocChunk_->Allocate(blockSize_);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Deallocate
+// Deallocates a block previously allocated with Allocate
+// (undefined behavior if called with the wrong pointer)
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Deallocate(void* p)
+{
+    assert(!chunks_.empty());
+    assert(&chunks_.front() <= deallocChunk_);
+    assert(&chunks_.back() >= deallocChunk_);
+    
+    deallocChunk_  = VicinityFind(p);
+    assert(deallocChunk_);
+
+    DoDeallocate(p);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::VicinityFind (internal)
+// Finds the chunk corresponding to a pointer, using an efficient search
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::Chunk* FixedAllocator::VicinityFind(void* p)
+{
+    assert(!chunks_.empty());
+    assert(deallocChunk_);
+
+    const std::size_t chunkLength = numBlocks_ * blockSize_;
+
+    Chunk* lo = deallocChunk_;
+    Chunk* hi = deallocChunk_ + 1;
+    Chunk* loBound = &chunks_.front();
+    Chunk* hiBound = &chunks_.back() + 1;
+
+    for (;;)
+    {
+        if (lo)
+        {
+            if (p >= lo->pData_ && p < lo->pData_ + chunkLength)
+            {
+                return lo;
+            }
+            if (lo == loBound) lo = 0;
+            else --lo;
+        }
+        
+        if (hi)
+        {
+            if (p >= hi->pData_ && p < hi->pData_ + chunkLength)
+            {
+                return hi;
+            }
+            if (++hi == hiBound) hi = 0;
+        }
+    }
+    
+    // assert(false);
+    // return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::DoDeallocate (internal)
+// Performs deallocation. Assumes deallocChunk_ points to the correct chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::DoDeallocate(void* p)
+{
+    assert(deallocChunk_->pData_ <= p);
+    assert(deallocChunk_->pData_ + numBlocks_ * blockSize_ > p);
+
+    // call into the chunk, will adjust the inner list but won't release memory
+    deallocChunk_->Deallocate(p, blockSize_);
+
+    if (deallocChunk_->blocksAvailable_ == numBlocks_)
+    {
+        // deallocChunk_ is completely free, should we release it? 
+        
+        Chunk& lastChunk = chunks_.back();
+        
+        if (&lastChunk == deallocChunk_)
+        {
+            // check if we have two last chunks empty
+            
+            if (chunks_.size() > 1 && 
+                deallocChunk_[-1].blocksAvailable_ == numBlocks_)
+            {
+                // Two free chunks, discard the last one
+                lastChunk.Release();
+                chunks_.pop_back();
+                allocChunk_ = deallocChunk_ = &chunks_.front();
+            }
+            return;
+        }
+        
+        if (lastChunk.blocksAvailable_ == numBlocks_)
+        {
+            // Two free blocks, discard one
+            lastChunk.Release();
+            chunks_.pop_back();
+            allocChunk_ = deallocChunk_;
+        }
+        else
+        {
+            // move the empty chunk to the end
+            std::swap(*deallocChunk_, lastChunk);
+            allocChunk_ = &chunks_.back();
+        }
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// SmallObjAllocator::SmallObjAllocator
+// Creates an allocator for small objects given chunk size and maximum 'small'
+//     object size
+////////////////////////////////////////////////////////////////////////////////
+
+SmallObjAllocator::SmallObjAllocator(
+        std::size_t chunkSize, 
+        std::size_t maxObjectSize)
+    : pLastAlloc_(0), pLastDealloc_(0)
+    , chunkSize_(chunkSize), maxObjectSize_(maxObjectSize) 
+{   
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// SmallObjAllocator::Allocate
+// Allocates 'numBytes' memory
+// Uses an internal pool of FixedAllocator objects for small objects  
+////////////////////////////////////////////////////////////////////////////////
+
+void* SmallObjAllocator::Allocate(std::size_t numBytes)
+{
+    if (numBytes > maxObjectSize_) return operator new(numBytes);
+    
+    if (pLastAlloc_ && pLastAlloc_->BlockSize() == numBytes)
+    {
+        return pLastAlloc_->Allocate();
+    }
+    Pool::iterator i = std::lower_bound(pool_.begin(), pool_.end(), numBytes);
+    if (i == pool_.end() || i->BlockSize() != numBytes)
+    {
+        i = pool_.insert(i, FixedAllocator(numBytes));
+        pLastDealloc_ = &*pool_.begin();
+    }
+    pLastAlloc_ = &*i;
+    return pLastAlloc_->Allocate();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// SmallObjAllocator::Deallocate
+// Deallocates memory previously allocated with Allocate
+// (undefined behavior if you pass any other pointer)
+////////////////////////////////////////////////////////////////////////////////
+
+void SmallObjAllocator::Deallocate(void* p, std::size_t numBytes)
+{
+    if (numBytes > maxObjectSize_) return operator delete(p);
+
+    if (pLastDealloc_ && pLastDealloc_->BlockSize() == numBytes)
+    {
+        pLastDealloc_->Deallocate(p);
+        return;
+    }
+    Pool::iterator i = std::lower_bound(pool_.begin(), pool_.end(), numBytes);
+    assert(i != pool_.end());
+    assert(i->BlockSize() == numBytes);
+    pLastDealloc_ = &*i;
+    pLastDealloc_->Deallocate(p);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// March 20: fix exception safety issue in FixedAllocator::Allocate 
+//     (thanks to Chris Udazvinis for pointing that out)
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
Index: avida/current/source/third-party/Loki/MSVC/1300/SmallObj.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/SmallObj.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/SmallObj.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,211 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef SMALLOBJ_INC_
+#define SMALLOBJ_INC_
+
+#include "Threads.h"
+#include "Singleton.h"
+#include <cstddef>
+#include <vector>
+
+#ifndef DEFAULT_CHUNK_SIZE
+#define DEFAULT_CHUNK_SIZE 4096
+#endif
+
+#ifndef MAX_SMALL_OBJECT_SIZE
+#define MAX_SMALL_OBJECT_SIZE 64
+#endif
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class FixedAllocator
+// Offers services for allocating fixed-sized objects
+////////////////////////////////////////////////////////////////////////////////
+
+    class FixedAllocator
+    {
+    public: // VC7 access control BUG
+        class Chunk
+        {
+            friend FixedAllocator;
+
+            void Init(std::size_t blockSize, unsigned char blocks);
+            void* Allocate(std::size_t blockSize);
+            void Deallocate(void* p, std::size_t blockSize);
+            void Reset(std::size_t blockSize, unsigned char blocks);
+            void Release();
+            unsigned char* pData_;
+            unsigned char
+                firstAvailableBlock_,
+                blocksAvailable_;
+        };
+        
+    private:
+        // Internal functions        
+        void DoDeallocate(void* p);
+        Chunk* VicinityFind(void* p);
+        
+        // Data 
+        std::size_t blockSize_;
+        unsigned char numBlocks_;
+        typedef std::vector<Chunk> Chunks;
+        Chunks chunks_;
+        Chunk* allocChunk_;
+        Chunk* deallocChunk_;
+        // For ensuring proper copy semantics
+        mutable const FixedAllocator* prev_;
+        mutable const FixedAllocator* next_;
+        
+    public:
+        // Create a FixedAllocator able to manage blocks of 'blockSize' size
+        explicit FixedAllocator(std::size_t blockSize = 0);
+        FixedAllocator(const FixedAllocator&);
+        FixedAllocator& operator=(const FixedAllocator&);
+        ~FixedAllocator();
+        
+        void Swap(FixedAllocator& rhs);
+        
+        // Allocate a memory block
+        void* Allocate();
+        // Deallocate a memory block previously allocated with Allocate()
+        // (if that's not the case, the behavior is undefined)
+        void Deallocate(void* p);
+        // Returns the block size with which the FixedAllocator was initialized
+        std::size_t BlockSize() const
+        { return blockSize_; }
+        // Comparison operator for sorting 
+        bool operator<(std::size_t rhs) const
+        { return BlockSize() < rhs; }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class SmallObjAllocator
+// Offers services for allocating small-sized objects
+////////////////////////////////////////////////////////////////////////////////
+
+    class SmallObjAllocator
+    {
+    public:
+        SmallObjAllocator(
+            std::size_t chunkSize, 
+            std::size_t maxObjectSize);
+    
+        void* Allocate(std::size_t numBytes);
+        void Deallocate(void* p, std::size_t size);
+    
+    private:
+        SmallObjAllocator(const SmallObjAllocator&);
+        SmallObjAllocator& operator=(const SmallObjAllocator&);
+        
+        typedef std::vector<FixedAllocator> Pool;
+        Pool pool_;
+        FixedAllocator* pLastAlloc_;
+        FixedAllocator* pLastDealloc_;
+        std::size_t chunkSize_;
+        std::size_t maxObjectSize_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class SmallObject
+// Base class for polymorphic small objects, offers fast
+//     allocations/deallocations
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class ClientType,
+        class ThreadingModelType
+    >
+    class SmallObjectStaticData
+    {
+        friend ClientType; // illegal (11.4/2) but works with VC
+        static ThreadingModelType s_ThreadingModelData;
+    };
+
+    template<class C, class M>
+    M SmallObjectStaticData<C, M>::s_ThreadingModelData; 
+
+    template
+    <
+        template <class> class ThreadingModel = DEFAULT_THREADING,
+        std::size_t chunkSize = DEFAULT_CHUNK_SIZE,
+        std::size_t maxSmallObjectSize = MAX_SMALL_OBJECT_SIZE
+    >
+    class SmallObject : public ThreadingModel< 
+        SmallObject<ThreadingModel, chunkSize, maxSmallObjectSize> >
+    {
+        typedef ThreadingModel< SmallObject<ThreadingModel, 
+                chunkSize, maxSmallObjectSize> > MyThreadingModel;
+                
+        typedef SmallObjectStaticData
+        <
+            SmallObject,
+            MyThreadingModel
+        > 
+        MySmallObjectStaticData;
+
+        struct MySmallObjAllocator : public SmallObjAllocator
+        {
+            MySmallObjAllocator() 
+            : SmallObjAllocator(chunkSize, maxSmallObjectSize)
+            {}
+        };
+        // The typedef below would make things much simpler, 
+        //     but MWCW won't like it
+        // typedef SingletonHolder<MySmallObjAllocator/*, CreateStatic, 
+        //        DefaultLifetime, ThreadingModel*/> MyAllocator;
+        
+    public:
+        static void* operator new(std::size_t size)
+        {
+#if (MAX_SMALL_OBJECT_SIZE != 0) && (DEFAULT_CHUNK_SIZE != 0)
+            typename MyThreadingModel::Lock lock(
+                MySmallObjectStaticData::s_ThreadingModelData);
+            (void)lock; // get rid of warning
+            
+            return SingletonHolder<MySmallObjAllocator, CreateStatic, 
+                PhoenixSingleton>::Instance().Allocate(size);
+#else
+            return ::operator new(size);
+#endif
+        }
+        static void operator delete(void* p, std::size_t size)
+        {
+#if (MAX_SMALL_OBJECT_SIZE != 0) && (DEFAULT_CHUNK_SIZE != 0)
+            typename MyThreadingModel::Lock lock(
+                MySmallObjectStaticData::s_ThreadingModelData);
+            (void)lock; // get rid of warning
+            
+            SingletonHolder<MySmallObjAllocator, CreateStatic, 
+                PhoenixSingleton>::Instance().Deallocate(p, size);
+#else
+            ::operator delete(p, size);
+#endif
+        }
+        virtual ~SmallObject() {}
+    };
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // SMALLOBJ_INC_
Index: avida/current/source/third-party/Loki/MSVC/1300/SmartPtr.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/SmartPtr.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/SmartPtr.h	Wed Sep 24 01:12:08 2003
@@ -0,0 +1,1329 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef SMARTPTR_INC_
+#define SMARTPTR_INC_
+
+////////////////////////////////////////////////////////////////////////////////
+// IMPORTANT NOTE
+// Due to threading issues, the OwnershipPolicy has been changed as follows:
+//     Release() returns a boolean saying if that was the last release
+//        so the pointer can be deleted by the StoragePolicy
+//     IsUnique() was removed
+////////////////////////////////////////////////////////////////////////////////
+
+
+#include "SmallObj.h"
+#include "TypeManip.h"
+#include "static_check.h"
+#include <functional>
+#include <stdexcept>
+#include <cassert>
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DefaultSPStorage
+// Implementation of the StoragePolicy used by SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class DefaultSPStorage
+    {
+    protected:
+        typedef T* StoredType;    // the type of the pointee_ object
+        typedef T* PointerType;   // type returned by operator->
+        typedef T& ReferenceType; // type returned by operator*
+        
+    public:
+        DefaultSPStorage() : pointee_(Default()) 
+        {}
+
+        // The storage policy doesn't initialize the stored pointer 
+        //     which will be initialized by the OwnershipPolicy's Clone fn
+        DefaultSPStorage(const DefaultSPStorage&)
+        {}
+
+        template <class U>
+        DefaultSPStorage(const DefaultSPStorage<U>&) 
+        {}
+        
+        DefaultSPStorage(const StoredType& p) : pointee_(p) {}
+        
+        PointerType operator->() const { return pointee_; }
+        
+        ReferenceType operator*() const { return *pointee_; }
+        
+        void Swap(DefaultSPStorage& rhs)
+        { std::swap(pointee_, rhs.pointee_); }
+    
+        // Accessors
+        friend inline PointerType GetImpl(const DefaultSPStorage& sp)
+        { return sp.pointee_; }
+        
+        friend inline const StoredType& GetImplRef(const DefaultSPStorage& sp)
+        { return sp.pointee_; }
+
+        friend inline StoredType& GetImplRef(DefaultSPStorage& sp)
+        { return sp.pointee_; }
+
+    protected:
+        // Destroys the data stored
+        // (Destruction might be taken over by the OwnershipPolicy)
+        void Destroy()
+        { delete pointee_; }
+        
+        // Default value to initialize the pointer
+        static StoredType Default()
+        { return 0; }
+    
+    private:
+        // Data
+        StoredType pointee_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template RefCounted
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Provides a classic external reference counting implementation
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class RefCounted
+    {
+    public:
+        RefCounted() 
+        {
+            pCount_ = static_cast<unsigned int*>(
+                SmallObject<>::operator new(sizeof(unsigned int)));
+            assert(pCount_);
+            *pCount_ = 1;
+        }
+        
+        RefCounted(const RefCounted& rhs) 
+        : pCount_(rhs.pCount_)
+        {}
+        
+        // MWCW lacks template friends, hence the following kludge
+        template <typename P1>
+        RefCounted(const RefCounted<P1>& rhs) 
+        : pCount_(reinterpret_cast<const RefCounted&>(rhs).pCount_)
+        {}
+        
+        P Clone(const P& val)
+        {
+            ++*pCount_;
+            return val;
+        }
+        
+        bool Release(const P&, bool = false)
+        {
+            if (!--*pCount_)
+            {
+                SmallObject<>::operator delete(pCount_, sizeof(unsigned int));
+                return true;
+            }
+            return false;
+        }
+        
+        void Swap(RefCounted& rhs)
+        { std::swap(pCount_, rhs.pCount_); }
+    
+        enum { destructiveCopy = false };
+
+    private:
+        // Data
+        unsigned int* pCount_;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template RefCountedMT
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements external reference counting for multithreaded programs
+////////////////////////////////////////////////////////////////////////////////
+    template <template <class> class ThreadingModel>
+    struct RefCountedMTAdj
+    {
+        template <class P>
+        class RefCountedMT : public ThreadingModel< RefCountedMT<P> >
+        {
+            typedef ThreadingModel< RefCountedMT<P> > base_type;
+            typedef typename base_type::IntType       CountType;
+            typedef volatile CountType               *CountPtrType;
+
+        public:
+            RefCountedMT() 
+            {
+                pCount_ = static_cast<CountPtrType>(
+                    SmallObject<ThreadingModel>::operator new(
+                        sizeof(*pCount_)));
+                assert(pCount_);
+                *pCount_ = 1;
+            }
+
+            RefCountedMT(const RefCountedMT& rhs) 
+            : pCount_(rhs.pCount_)
+            {}
+
+            //MWCW lacks template friends, hence the following kludge
+            template <typename P1>
+            RefCountedMT(const RefCountedMT<P1>& rhs) 
+            : pCount_(reinterpret_cast<const RefCountedMT<P>&>(rhs).pCount_)
+            {}
+
+            P Clone(const P& val)
+            {
+                ThreadingModel<RefCountedMT>::AtomicIncrement(*pCount_);
+                return val;
+            }
+
+            bool Release(const P&, bool = false)
+            {
+                if (!ThreadingModel<RefCountedMT>::AtomicDecrement(*pCount_))
+                {
+                    SmallObject<ThreadingModel>::operator delete(
+                        const_cast<CountType *>(pCount_), 
+                        sizeof(*pCount_));
+                    return true;
+                }
+                return false;
+            }
+
+            void Swap(RefCountedMT& rhs)
+            { std::swap(pCount_, rhs.pCount_); }
+
+            enum { destructiveCopy = false };
+
+        private:
+            // Data
+            CountPtrType pCount_;
+        };
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template COMRefCounted
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Adapts COM intrusive reference counting to OwnershipPolicy-specific syntax
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class COMRefCounted
+    {
+    public:
+        COMRefCounted()
+        {}
+        
+        template <class U>
+        COMRefCounted(const COMRefCounted<U>&)
+        {}
+        
+        static P Clone(const P& val)
+        {
+            val->AddRef();
+            return val;
+        }
+        
+        static bool Release(const P& val, bool KP_reject = false)
+        { if (!KP_reject) val->Release(); return false; }
+        
+        enum { destructiveCopy = false };
+        
+        static void Swap(COMRefCounted&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DeepCopy
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements deep copy semantics, assumes existence of a Clone() member 
+//     function of the pointee type
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct DeepCopy
+    {
+        DeepCopy()
+        {}
+        
+        template <class P1>
+        DeepCopy(const DeepCopy<P1>&)
+        {}
+        
+        static P Clone(const P& val)
+        { return val->Clone(); }
+        
+        static bool Release(const P&, bool = false)
+        { return true; }
+        
+        static void Swap(DeepCopy&)
+        {}
+        
+        enum { destructiveCopy = false };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template RefLinked
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements reference linking
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        class RefLinkedBase
+        {
+        public:
+            RefLinkedBase() 
+            { prev_ = next_ = this; }
+            
+            RefLinkedBase(const RefLinkedBase& rhs) 
+            {
+                prev_ = &rhs;
+                next_ = rhs.next_;
+                prev_->next_ = this;
+                next_->prev_ = this;
+            }
+            
+            bool Release()
+            {
+                if (next_ == this)
+                {   
+                    assert(prev_ == this);
+                    return true;
+                }
+                prev_->next_ = next_;
+                next_->prev_ = prev_;
+                return false;
+            }
+            
+            void Swap(RefLinkedBase& rhs)
+            {
+                if (next_ == this)
+                {
+                    assert(prev_ == this);
+                    if (rhs.next_ == &rhs)
+                    {
+                        assert(rhs.prev_ == &rhs);
+                        // both lists are empty, nothing 2 do
+                        return;
+                    }
+                    prev_ = rhs.prev_;
+                    next_ = rhs.next_;
+                    prev_->next_ = next_->prev_ = this;
+                    rhs.next_ = rhs.prev_ = &rhs;
+                    return;
+                }
+                if (rhs.next_ == &rhs)
+                {
+                    rhs.Swap(*this);
+                    return;
+                }
+                std::swap(prev_, rhs.prev_);
+                std::swap(next_, rhs.next_);
+                std::swap(prev_->next_, rhs.prev_->next_);
+                std::swap(next_->prev_, rhs.next_->prev_);
+            }
+                
+            enum { destructiveCopy = false };
+
+        private:
+            mutable const RefLinkedBase* prev_;
+            mutable const RefLinkedBase* next_;
+        };
+    }
+    
+    template <class P>
+    class RefLinked : public Private::RefLinkedBase
+    {
+    public:
+        RefLinked()
+        {}
+        
+        template <class P1>
+        RefLinked(const RefLinked<P1>& rhs) 
+        : Private::RefLinkedBase(rhs)
+        {}
+
+        static P Clone(const P& val)
+        { return val; }
+
+        bool Release(const P&, bool = false)
+        { return Private::RefLinkedBase::Release(); }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template DestructiveCopy
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements destructive copy semantics (a la std::auto_ptr)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class DestructiveCopy
+    {
+    public:
+        DestructiveCopy()
+        {}
+        
+        template <class P1>
+        DestructiveCopy(const DestructiveCopy<P1>&)
+        {}
+        
+        template <class P1>
+        static P Clone(P1& val)
+        {
+            P result(val);
+            val = P1();
+            return result;
+        }
+        
+        static bool Release(const P&, bool = false)
+        { return true; }
+        
+        static void Swap(DestructiveCopy&)
+        {}
+        
+        enum { destructiveCopy = true };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template NoCopy
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements a policy that doesn't allow copying objects
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class NoCopy
+    {
+    public:
+        NoCopy()
+        {}
+        
+        template <class P1>
+        NoCopy(const NoCopy<P1>&)
+        {}
+        
+        static P Clone(const P&)
+        {
+            STATIC_CHECK(false, This_Policy_Disallows_Value_Copying);
+        }
+        
+        static bool Release(const P&, bool = false)
+        { return true; }
+        
+        static void Swap(NoCopy&)
+        {}
+        
+        enum { destructiveCopy = false };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template AllowConversion
+// Implementation of the ConversionPolicy used by SmartPtr
+// Allows implicit conversion from SmartPtr to the pointee type
+////////////////////////////////////////////////////////////////////////////////
+
+    struct AllowConversion
+    {
+        enum { allow = true };
+
+        void Swap(AllowConversion&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DisallowConversion
+// Implementation of the ConversionPolicy used by SmartPtr
+// Does not allow implicit conversion from SmartPtr to the pointee type
+// You can initialize a DisallowConversion with an AllowConversion
+////////////////////////////////////////////////////////////////////////////////
+
+    struct DisallowConversion
+    {
+        DisallowConversion()
+        {}
+        
+        DisallowConversion(const AllowConversion&)
+        {}
+        
+        enum { allow = false };
+
+        void Swap(DisallowConversion&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template NoCheck
+// Implementation of the CheckingPolicy used by SmartPtr
+// Well, it's clear what it does :o)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct NoCheck
+    {
+        NoCheck()
+        {}
+        
+        template <class P1>
+        NoCheck(const NoCheck<P1>&)
+        {}
+        
+        static void OnDefault(const P&)
+        {}
+
+        static void OnInit(const P&)
+        {}
+
+        static void OnDereference(const P&)
+        {}
+
+        static void Swap(NoCheck&)
+        {}
+    };
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AssertCheck
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct AssertCheck
+    {
+        AssertCheck()
+        {}
+        
+        template <class P1>
+        AssertCheck(const AssertCheck<P1>&)
+        {}
+        
+        template <class P1>
+        AssertCheck(const NoCheck<P1>&)
+        {}
+        
+        static void OnDefault(const P&)
+        {}
+
+        static void OnInit(const P&)
+        {}
+
+        static void OnDereference(P val)
+        { assert(val); (void)val; }
+
+        static void Swap(AssertCheck&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AssertCheckStrict
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer against zero upon initialization and before dereference
+// You can initialize an AssertCheckStrict with an AssertCheck 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct AssertCheckStrict
+    {
+        AssertCheckStrict()
+        {}
+        
+        template <class U>
+        AssertCheckStrict(const AssertCheckStrict<U>&)
+        {}
+        
+        template <class U>
+        AssertCheckStrict(const AssertCheck<U>&)
+        {}
+        
+        template <class P1>
+        AssertCheckStrict(const NoCheck<P1>&)
+        {}
+        
+        static void OnDefault(P val)
+        { assert(val); }
+        
+        static void OnInit(P val)
+        { assert(val); }
+        
+        static void OnDereference(P val)
+        { assert(val); }
+        
+        static void Swap(AssertCheckStrict&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class NullPointerException
+// Used by some implementations of the CheckingPolicy used by SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    struct NullPointerException : public std::runtime_error
+    {
+        NullPointerException() : std::runtime_error("")
+        { }
+        const char* what() const throw()
+        { return "Null Pointer Exception"; }
+    };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template RejectNullStatic
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer upon initialization and before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct RejectNullStatic
+    {
+        RejectNullStatic()
+        {}
+        
+        template <class P1>
+        RejectNullStatic(const RejectNullStatic<P1>&)
+        {}
+        
+        template <class P1>
+        RejectNullStatic(const NoCheck<P1>&)
+        {}
+        
+        template <class P1>
+        RejectNullStatic(const AssertCheck<P1>&)
+        {}
+        
+        template <class P1>
+        RejectNullStatic(const AssertCheckStrict<P1>&)
+        {}
+        
+        static void OnDefault(const P&)
+        {
+            STATIC_CHECK(false, This_Policy_Does_Not_Allow_Default_Initialization);
+        }
+        
+        static void OnInit(const P& val)
+        { if (!val) throw NullPointerException(); }
+        
+        static void OnDereference(const P& val)
+        { if (!val) throw NullPointerException(); }
+        
+        static void Swap(RejectNullStatic&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template RejectNull
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct RejectNull
+    {
+        RejectNull()
+        {}
+        
+        template <class P1>
+        RejectNull(const RejectNull<P1>&)
+        {}
+        
+        static void OnInit(P val)
+        { if (!val) throw NullPointerException(); }
+
+        static void OnDefault(P val)
+        { OnInit(val); }
+        
+        void OnDereference(P val)
+        { OnInit(val); }
+        
+        void Swap(RejectNull&)
+        {}        
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template RejectNullStrict
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer upon initialization and before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct RejectNullStrict
+    {
+        RejectNullStrict()
+        {}
+        
+        template <class P1>
+        RejectNullStrict(const RejectNullStrict<P1>&)
+        {}
+        
+        template <class P1>
+        RejectNullStrict(const RejectNull<P1>&)
+        {}
+        
+        static void OnInit(P val)
+        { if (!val) throw NullPointerException(); }
+
+        void OnDereference(P val)
+        { OnInit(val); }
+        
+        void Swap(RejectNullStrict&)
+        {}        
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ByRef
+// Transports a reference as a value
+// Serves to implement the Colvin/Gibbons trick for SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class ByRef
+    {
+    public:
+        ByRef(T& v) : value_(v) {}
+        operator T&() { return value_; }
+        // gcc doesn't like this:
+        operator const T&() const { return value_; }
+
+    private:
+        ByRef(const ByRef &);
+        ByRef& operator=(const ByRef &);
+
+        T& value_;
+    };
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template WrapTemplate (definition)
+// suggested workaround for vc7 limitation with template template arguments
+////////////////////////////////////////////////////////////////////////////////
+template<template<typename> class C>
+struct WrapTemplate
+{
+    template<typename T>
+    struct In
+    {
+        typedef C<T> type;
+    };
+
+    // VC7 BUG - cannot access protected typedef
+    template<typename T>
+    struct PointerType : private C<T>
+    {
+        typedef typename C<T>::PointerType type;
+    };
+
+    // VC7 BUG - cannot access protected typedef
+    template<typename T>
+    struct StoredType : private C<T>
+    {
+        typedef typename C<T>::StoredType type;
+    };
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SmartPtr (declaration)
+// The reason for all the fuss above
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OwnershipPolicy = WrapTemplate<RefCounted>,
+        class ConversionPolicy = DisallowConversion,
+        class CheckingPolicy = WrapTemplate<AssertCheck>,
+        class StoragePolicy = WrapTemplate<DefaultSPStorage>
+    >
+    class SmartPtr;
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SmartPtrDef (definition)
+// this class added to adjust the ported SmartPtr to the original one.
+// instead of writing SmartPtr<T,OP,CP,KP,SP> write SmartPtrDef<T,OP,CP,KP,SP>::type
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OwnershipPolicy = RefCounted,
+        class ConversionPolicy = DisallowConversion,
+        template <class> class CheckingPolicy = AssertCheck,
+        template <class> class StoragePolicy = DefaultSPStorage
+    >
+    struct SmartPtrDef
+    {
+        typedef SmartPtr
+        <
+            T,
+            WrapTemplate<OwnershipPolicy>,
+            ConversionPolicy,
+            WrapTemplate<CheckingPolicy>,
+            WrapTemplate<StoragePolicy>
+        >
+        type;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SmartPtr (definition)
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OwnershipPolicy,
+        class ConversionPolicy,
+        class CheckingPolicy,
+        class StoragePolicy
+    >
+    class SmartPtr
+        : public StoragePolicy::In<T>::type
+        , public OwnershipPolicy::In<typename StoragePolicy::template PointerType<T>::type>::type
+        , public CheckingPolicy ::In<typename StoragePolicy::template StoredType<T>::type>::type
+        , public ConversionPolicy
+    {
+        typedef typename StoragePolicy::template In<T>::type SP;
+        typedef typename OwnershipPolicy::template In<typename SP::PointerType>::type OP;
+        typedef typename CheckingPolicy::template  In<typename SP::StoredType>::type  KP;
+        typedef ConversionPolicy CP;
+        
+        // VC7 bug
+        enum { OP_destructiveCopy = OP::destructiveCopy };
+        enum { CP_allow = CP::allow };
+
+    public:
+        typedef typename SP::PointerType PointerType;
+        typedef typename SP::StoredType StoredType;
+        typedef typename SP::ReferenceType ReferenceType;
+        
+
+        typedef typename Select
+        <
+            OP_destructiveCopy, 
+            SmartPtr, 
+            const SmartPtr
+        >
+        ::Result CopyArg;
+    
+   private:
+        void OnKPReject()
+        {
+            if (OP::Release(GetImpl(*static_cast<SP*>(this)), true))
+            {
+                // if KP::IsDestructive(GetImpl(*this))
+                // call SP::Destroy() ?
+            }
+        }
+
+        class SmartPtrGuard
+        {
+        public:
+            typedef void (SmartPtr::*action_t)();
+
+            SmartPtrGuard(SmartPtr &sptr, action_t action)
+                : sptr_(sptr), action_(action), guard_(true)
+            {}
+
+            void Dismiss() { guard_ = false; }
+
+            ~SmartPtrGuard()
+            { if (guard_) (sptr_.*action_)(); }
+
+        private:
+            SmartPtrGuard(const SmartPtrGuard &);
+            SmartPtrGuard& operator=(const SmartPtrGuard &);
+
+        private:
+            SmartPtr    &sptr_;
+            action_t    action_;
+            bool        guard_;
+        };
+
+    public:
+
+        SmartPtr()
+        { 
+            SmartPtrGuard KPGuard(*this, &SmartPtr::OnKPReject);
+            KP::OnDefault(GetImpl(*this)); 
+            KPGuard.Dismiss();
+        }
+        
+        //
+        // This constructor has exception safety problem
+        // If OP constructor throw - p might be leaked
+        // One solution is to add method to OP named OnInit with the following usage:
+        // OP::OnInit(GetImpl(*this), implicit_cast<SP&>(*this)); 
+        // The OP default constructor will have no throw guaranty 
+        // and the OP::OnInit will decide if destroy should be invoked upon exception
+        //
+        SmartPtr(const StoredType& p) : SP(p)
+        { 
+            //
+            // The following try catch only solve part of the exception safety problem.
+            // The solution might be wrong because KP might reject illegal pointers (not destructible via destroy like null com pointer).
+            // The complete solution might involve more tight connections between KP, OP and SP.
+            //
+            SmartPtrGuard KPGuard(*this, &SmartPtr::OnKPReject);
+            KP::OnInit(GetImpl(*this)); 
+            KPGuard.Dismiss();
+        }
+        
+        SmartPtr(CopyArg& rhs)
+        : SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+        { GetImplRef(*this) = OP::Clone(GetImplRef(rhs)); }
+
+        template
+        <
+            typename T1,
+            class OP1,
+            class CP1,
+            class KP1,
+            class SP1
+        >
+        SmartPtr(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+        : SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+        { GetImplRef(*this) = OP::Clone(GetImplRef(rhs)); }
+
+        template
+        <
+            typename T1,
+            class OP1,
+            class CP1,
+            class KP1,
+            class SP1
+        >
+        SmartPtr(SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+        : SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+        { GetImplRef(*this) = OP::Clone(GetImplRef(rhs)); }
+
+        SmartPtr(ByRef<SmartPtr> rhs)
+        : SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+        {}
+        
+        operator ByRef<SmartPtr>()
+        { return ByRef<SmartPtr>(*this); }
+
+        SmartPtr& operator=(CopyArg& rhs)
+        {
+            SmartPtr temp(rhs);
+            temp.Swap(*this);
+            return *this;
+        }
+
+        template
+        <
+            typename T1,
+            class OP1,
+            class CP1,
+            class KP1,
+            class SP1
+        >
+        SmartPtr& operator=(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+        {
+            SmartPtr temp(rhs);
+            temp.Swap(*this);
+            return *this;
+        }
+        
+        template
+        <
+            typename T1,
+            class OP1,
+            class CP1,
+            class KP1,
+            class SP1
+        >
+        SmartPtr& operator=(SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+        {
+            SmartPtr temp(rhs);
+            temp.Swap(*this);
+            return *this;
+        }
+        
+        void Swap(SmartPtr& rhs)
+        {
+            OP::Swap(rhs);
+            CP::Swap(rhs);
+            KP::Swap(rhs);
+            SP::Swap(rhs);
+        }
+        
+        ~SmartPtr()
+        {
+            if (OP::Release(GetImpl(*static_cast<SP*>(this))))
+            {
+                SP::Destroy();
+            }
+        }
+        
+        friend inline void Release(SmartPtr& sp, typename SP::StoredType& p)
+        {
+            p = GetImplRef(sp);
+            GetImplRef(sp) = SP::Default();
+        }
+        
+        friend inline void Reset(SmartPtr& sp, typename SP::StoredType p)
+        { SmartPtr(p).Swap(sp); }
+
+        PointerType operator->()
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator->();
+        }
+
+        PointerType operator->() const
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator->();
+        }
+
+        ReferenceType operator*()
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator*();
+        }
+        
+        ReferenceType operator*() const
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator*();
+        }
+        
+        bool operator!() const // Enables "if (!sp) ..."
+        { return GetImpl(*this) == 0; }
+        
+        inline friend bool operator==(const SmartPtr& lhs,
+            const T* rhs)
+        { return GetImpl(lhs) == rhs; }
+        
+        inline friend bool operator==(const T* lhs,
+            const SmartPtr& rhs)
+        { return rhs == lhs; }
+        
+        inline friend bool operator!=(const SmartPtr& lhs,
+            const T* rhs)
+        { return !(lhs == rhs); }
+        
+        inline friend bool operator!=(const T* lhs,
+            const SmartPtr& rhs)
+        { return rhs != lhs; }
+
+        // Ambiguity buster
+        template
+        <
+            typename T1,
+            class OP1,
+            class CP1,
+            class KP1,
+            class SP1
+        >
+        bool operator==(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs) const
+        { return *this == GetImpl(rhs); }
+
+        // Ambiguity buster
+        template
+        <
+            typename T1,
+            class OP1,
+            class CP1,
+            class KP1,
+            class SP1
+        >
+        bool operator!=(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs) const
+        { return !(*this == rhs); }
+
+        // Ambiguity buster
+        template
+        <
+            typename T1,
+            class OP1,
+            class CP1,
+            class KP1,
+            class SP1
+        >
+        bool operator<(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs) const
+        { return *this < GetImpl(rhs); }
+
+    private:
+        // Helper for enabling 'if (sp)'
+        struct Tester
+        {
+            Tester() {}
+        private:
+            void operator delete(void*);
+        };
+        
+    public:
+        // enable 'if (sp)'
+        operator const volatile Tester*() const
+        {
+            if (!*this) return 0;
+            static Tester t;
+            return &t;
+        }
+
+    private:
+        // Helper for disallowing automatic conversion
+        struct Insipid
+        {
+            Insipid(PointerType) {}
+        };
+        
+
+        typedef typename Select<CP_allow, PointerType, Insipid>::Result
+            AutomaticConversionResult;
+    
+    public:        
+        operator AutomaticConversionResult() const
+        { return GetImpl(*this); }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// free comparison operators for class template SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////
+// operator== for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator==(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return GetImpl(lhs) == rhs; }
+    
+////////////////////////////////////////////////////////////////////////////////
+// operator== for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator==(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return rhs == lhs; }
+
+////////////////////////////////////////////////////////////////////////////////
+// operator!= for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator!=(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return !(lhs == rhs); }
+    
+////////////////////////////////////////////////////////////////////////////////
+// operator!= for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator!=(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return rhs != lhs; }
+
+////////////////////////////////////////////////////////////////////////////////
+// operator< for lhs = SmartPtr, rhs = raw pointer -- NOT DEFINED
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator<(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs);
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator< for lhs = raw pointer, rhs = SmartPtr -- NOT DEFINED
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator<(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs);
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator> for lhs = SmartPtr, rhs = raw pointer -- NOT DEFINED
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator>(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return rhs < lhs; }
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator> for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator>(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return rhs < lhs; }
+  
+////////////////////////////////////////////////////////////////////////////////
+// operator<= for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator<=(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return !(rhs < lhs); }
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator<= for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator<=(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return !(rhs < lhs); }
+
+////////////////////////////////////////////////////////////////////////////////
+// operator>= for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator>=(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return !(lhs < rhs); }
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator>= for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP,
+        typename U
+    >
+    inline bool operator>=(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return !(lhs < rhs); }
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// specialization of std::less for SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+#if 0
+namespace std
+{
+    template
+    <
+        typename T,
+        class OP,
+        class CP,
+        class KP,
+        class SP
+    >
+    struct less< Loki::SmartPtr<T, OP, CP, KP, SP> >
+        : public binary_function<Loki::SmartPtr<T, OP, CP, KP, SP>,
+            Loki::SmartPtr<T, OP, CP, KP, SP>, bool>
+    {
+        bool operator()(const Loki::SmartPtr<T, OP, CP, KP, SP>& lhs,
+            const Loki::SmartPtr<T, OP, CP, KP, SP>& rhs) const
+        { return less<T*>()(GetImpl(lhs), GetImpl(rhs)); }
+    };
+}
+#endif
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // SMARTPTR_INC_
Index: avida/current/source/third-party/Loki/MSVC/1300/Threads.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/Threads.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/Threads.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,202 @@
+#ifndef THREADS_H_
+#define THREADS_H_
+
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFAULT_THREADING
+// Selects the default threading model for certain components of Loki
+// If you don't define it, it defaults to single-threaded
+// All classes in Loki have configurable threading model; DEFAULT_THREADING
+// affects only default template arguments
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef DEFAULT_THREADING
+#define DEFAULT_THREADING /**/ ::Loki::SingleThreaded
+#endif
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template SingleThreaded
+// Implementation of the ThreadingModel policy used by various classes
+// Implements a single-threaded model; no synchronization
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class Host>
+    class SingleThreaded
+    {
+    public:
+        struct Lock
+        {
+            Lock() {}
+            explicit Lock(const SingleThreaded&) {}
+        };
+        
+        typedef Host VolatileType;
+
+        typedef int IntType; 
+
+        static IntType AtomicAdd(volatile IntType& lval, IntType val)
+        { return lval += val; }
+        
+        static IntType AtomicSubtract(volatile IntType& lval, IntType val)
+        { return lval -= val; }
+
+        static IntType AtomicMultiply(volatile IntType& lval, IntType val)
+        { return lval *= val; }
+        
+        static IntType AtomicDivide(volatile IntType& lval, IntType val)
+        { return lval /= val; }
+        
+        static IntType AtomicIncrement(volatile IntType& lval)
+        { return ++lval; }
+        
+        static IntType AtomicDecrement(volatile IntType& lval)
+        { return --lval; }
+
+        static IntType AtomicDivide(volatile IntType& lval)
+        { return lval /= val; }
+        
+        static void AtomicAssign(volatile IntType & lval, IntType val)
+        { lval = val; }
+        
+        static void AtomicAssign(IntType & lval, volatile IntType & val)
+        { lval = val; }
+    };
+    
+#ifdef _WINDOWS_
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ObjectLevelLockable
+// Implementation of the ThreadingModel policy used by various classes
+// Implements a object-level locking scheme
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class Host>
+    class ObjectLevelLockable
+    {
+        CRITICAL_SECTION mtx_;
+
+    public:
+        ObjectLevelLockable()
+        {
+            ::InitializeCriticalSection(&mtx_);
+        }
+
+        ~ObjectLevelLockable()
+        {
+            ::DeleteCriticalSection(&mtx_);
+        }
+
+        class Lock;
+        friend class Lock;
+        
+        class Lock
+        {
+            ObjectLevelLockable& host_;
+            
+            Lock(const Lock&);
+            Lock& operator=(const Lock&);
+            Lock(); // buggy design
+        public:
+
+            explicit Lock(ObjectLevelLockable& host) : host_(host)
+            {
+                ::EnterCriticalSection(&host_.mtx_);
+            }
+            ~Lock()
+            {
+                ::LeaveCriticalSection(&host_.mtx_);
+            }
+        };
+
+        typedef volatile Host VolatileType;
+
+        typedef LONG IntType; 
+
+        static IntType AtomicIncrement(volatile IntType& lval)
+        { return InterlockedIncrement(&const_cast<IntType&>(lval)); }
+        
+        static IntType AtomicDecrement(volatile IntType& lval)
+        { return InterlockedDecrement(&const_cast<IntType&>(lval)); }
+        
+        static void AtomicAssign(volatile IntType& lval, IntType val)
+        { InterlockedExchange(&const_cast<IntType&>(lval), val); }
+        
+        static void AtomicAssign(IntType& lval, volatile IntType& val)
+        { InterlockedExchange(&lval, val); }
+    };
+    
+    template <class Host>
+    class ClassLevelLockable
+    {
+        struct Initializer
+        {   
+            CRITICAL_SECTION mtx_;
+
+            Initializer()
+            {
+                ::InitializeCriticalSection(&mtx_);
+            }
+            ~Initializer()
+            {
+                ::DeleteCriticalSection(&mtx_);
+            }
+        };
+        
+        static Initializer initializer_;
+
+    public:
+        class Lock;
+        friend class Lock;
+        
+        class Lock
+        {
+            Lock(const Lock&);
+            Lock& operator=(const Lock&);
+        public:
+            Lock()
+            {
+                ::EnterCriticalSection(&initializer_.mtx_);
+            }
+            explicit Lock(ClassLevelLockable&)
+            {
+                ::EnterCriticalSection(&initializer_.mtx_);
+            }
+            ~Lock()
+            {
+                ::LeaveCriticalSection(&initializer_.mtx_);
+            }
+        };
+
+        typedef volatile Host VolatileType;
+
+        typedef LONG IntType; 
+
+        static IntType AtomicIncrement(volatile IntType& lval)
+        { return InterlockedIncrement(&const_cast<IntType&>(lval)); }
+        
+        static IntType AtomicDecrement(volatile IntType& lval)
+        { return InterlockedDecrement(&const_cast<IntType&>(lval)); }
+        
+        static void AtomicAssign(volatile IntType& lval, IntType val)
+        { InterlockedExchange(&const_cast<IntType&>(lval), val); }
+        
+        static void AtomicAssign(IntType& lval, volatile IntType& val)
+        { InterlockedExchange(&lval, val); }
+    };
+    
+    template <class Host>
+    typename ClassLevelLockable<Host>::Initializer 
+    ClassLevelLockable<Host>::initializer_;
+    
+#endif    
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: avida/current/source/third-party/Loki/MSVC/1300/TypeInfo.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/TypeInfo.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/TypeInfo.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,107 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef TYPEINFO_INC_
+#define TYPEINFO_INC_
+
+#include <typeinfo>
+#include <cassert>
+#include "Typelist.h"
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class TypeInfo
+// Purpose: offer a first-class, comparable wrapper over std::type_info
+////////////////////////////////////////////////////////////////////////////////
+
+    class TypeInfo
+    {
+    public:
+        // Constructors
+        TypeInfo(); // needed for containers
+        TypeInfo(const std::type_info&); // non-explicit
+
+        // Access for the wrapped std::type_info
+        const std::type_info& Get() const;
+        // Compatibility functions
+        bool before(const TypeInfo& rhs) const;
+        const char* name() const;
+
+    private:
+        const std::type_info* pInfo_;
+    };
+    
+// Implementation
+    
+    inline TypeInfo::TypeInfo()
+    {
+        class Nil {};
+        pInfo_ = &typeid(Nil);
+        assert(pInfo_);
+    }
+    
+    inline TypeInfo::TypeInfo(const std::type_info& ti)
+    : pInfo_(&ti)
+    { assert(pInfo_); }
+    
+    inline bool TypeInfo::before(const TypeInfo& rhs) const
+    {
+        assert(pInfo_);
+        return pInfo_->before(*rhs.pInfo_) != 0;
+    }
+
+    inline const std::type_info& TypeInfo::Get() const
+    {
+        assert(pInfo_);
+        return *pInfo_;
+    }
+    
+    inline const char* TypeInfo::name() const
+    {
+        assert(pInfo_);
+        return pInfo_->name();
+    }
+
+// Comparison operators
+    
+    inline bool operator==(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return (lhs.Get() == rhs.Get()) != 0; }
+
+    inline bool operator<(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return lhs.before(rhs); }
+
+    inline bool operator!=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs == rhs); }    
+    
+    inline bool operator>(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return rhs < lhs; }
+    
+    inline bool operator<=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs > rhs); }
+     
+    inline bool operator>=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs < rhs); }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPEINFO_INC_
Index: avida/current/source/third-party/Loki/MSVC/1300/TypeList.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/TypeList.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/TypeList.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,1059 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef TYPELIST_INC_
+#define TYPELIST_INC_
+
+#include "static_check.h"
+#include "Nulltype.h"
+#include "TypeManip.h"
+
+////////////////////////////////////////////////////////////////////////////////
+// macros TYPELIST_1, TYPELIST_2, ... TYPELIST_50
+// Each takes a number of arguments equal to its numeric suffix
+// The arguments are type names. TYPELIST_NN generates a typelist containing 
+//     all types passed as arguments, in that order.
+// Example: TYPELIST_2(char, int) generates a type containing char and int.
+////////////////////////////////////////////////////////////////////////////////
+
+#define TYPELIST_1(T1) ::Loki::Typelist<T1, ::Loki::NullType>
+
+#define TYPELIST_2(T1, T2) ::Loki::Typelist<T1, TYPELIST_1(T2) >
+
+#define TYPELIST_3(T1, T2, T3) ::Loki::Typelist<T1, TYPELIST_2(T2, T3) >
+
+#define TYPELIST_4(T1, T2, T3, T4) \
+    ::Loki::Typelist<T1, TYPELIST_3(T2, T3, T4) >
+
+#define TYPELIST_5(T1, T2, T3, T4, T5) \
+    ::Loki::Typelist<T1, TYPELIST_4(T2, T3, T4, T5) >
+
+#define TYPELIST_6(T1, T2, T3, T4, T5, T6) \
+    ::Loki::Typelist<T1, TYPELIST_5(T2, T3, T4, T5, T6) >
+
+#define TYPELIST_7(T1, T2, T3, T4, T5, T6, T7) \
+    ::Loki::Typelist<T1, TYPELIST_6(T2, T3, T4, T5, T6, T7) >
+
+#define TYPELIST_8(T1, T2, T3, T4, T5, T6, T7, T8) \
+    ::Loki::Typelist<T1, TYPELIST_7(T2, T3, T4, T5, T6, T7, T8) >
+
+#define TYPELIST_9(T1, T2, T3, T4, T5, T6, T7, T8, T9) \
+    ::Loki::Typelist<T1, TYPELIST_8(T2, T3, T4, T5, T6, T7, T8, T9) >
+
+#define TYPELIST_10(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) \
+    ::Loki::Typelist<T1, TYPELIST_9(T2, T3, T4, T5, T6, T7, T8, T9, T10) >
+
+#define TYPELIST_11(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) \
+    ::Loki::Typelist<T1, TYPELIST_10(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) >
+
+#define TYPELIST_12(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) \
+    ::Loki::Typelist<T1, TYPELIST_11(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12) >
+
+#define TYPELIST_13(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \
+    ::Loki::Typelist<T1, TYPELIST_12(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13) >
+
+#define TYPELIST_14(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14) \
+    ::Loki::Typelist<T1, TYPELIST_13(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14) >
+
+#define TYPELIST_15(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15) \
+    ::Loki::Typelist<T1, TYPELIST_14(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15) >
+
+#define TYPELIST_16(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16) \
+    ::Loki::Typelist<T1, TYPELIST_15(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16) >
+
+#define TYPELIST_17(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17) \
+    ::Loki::Typelist<T1, TYPELIST_16(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17) >
+
+#define TYPELIST_18(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18) \
+    ::Loki::Typelist<T1, TYPELIST_17(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18) >
+
+#define TYPELIST_19(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19) \
+    ::Loki::Typelist<T1, TYPELIST_18(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19) >
+
+#define TYPELIST_20(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) \
+    ::Loki::Typelist<T1, TYPELIST_19(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) >
+
+#define TYPELIST_21(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) \
+    ::Loki::Typelist<T1, TYPELIST_20(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) >
+
+#define TYPELIST_22(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) \
+    ::Loki::Typelist<T1, TYPELIST_21(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) >
+
+#define TYPELIST_23(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) \
+    ::Loki::Typelist<T1, TYPELIST_22(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) >
+
+#define TYPELIST_24(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) \
+    ::Loki::Typelist<T1, TYPELIST_23(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) >
+
+#define TYPELIST_25(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25) \
+    ::Loki::Typelist<T1, TYPELIST_24(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25) >
+
+#define TYPELIST_26(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26) \
+    ::Loki::Typelist<T1, TYPELIST_25(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26) >
+
+#define TYPELIST_27(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27) \
+    ::Loki::Typelist<T1, TYPELIST_26(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27) >
+
+#define TYPELIST_28(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28) \
+    ::Loki::Typelist<T1, TYPELIST_27(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28) >
+
+#define TYPELIST_29(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29) \
+    ::Loki::Typelist<T1, TYPELIST_28(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29) >
+
+#define TYPELIST_30(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) \
+    ::Loki::Typelist<T1, TYPELIST_29(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) >
+
+#define TYPELIST_31(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) \
+    ::Loki::Typelist<T1, TYPELIST_30(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) >
+
+#define TYPELIST_32(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) \
+    ::Loki::Typelist<T1, TYPELIST_31(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) >
+
+#define TYPELIST_33(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) \
+    ::Loki::Typelist<T1, TYPELIST_32(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) >
+
+#define TYPELIST_34(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) \
+    ::Loki::Typelist<T1, TYPELIST_33(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) >
+
+#define TYPELIST_35(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35) \
+    ::Loki::Typelist<T1, TYPELIST_34(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35) >
+
+#define TYPELIST_36(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36) \
+    ::Loki::Typelist<T1, TYPELIST_35(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36) >
+
+#define TYPELIST_37(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37) \
+    ::Loki::Typelist<T1, TYPELIST_36(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37) >
+
+#define TYPELIST_38(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38) \
+    ::Loki::Typelist<T1, TYPELIST_37(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38) >
+
+#define TYPELIST_39(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39) \
+    ::Loki::Typelist<T1, TYPELIST_38(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39) >
+
+#define TYPELIST_40(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) \
+    ::Loki::Typelist<T1, TYPELIST_39(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) >
+
+#define TYPELIST_41(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) \
+    ::Loki::Typelist<T1, TYPELIST_40(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) >
+
+#define TYPELIST_42(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) \
+    ::Loki::Typelist<T1, TYPELIST_41(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) >
+
+#define TYPELIST_43(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) \
+    ::Loki::Typelist<T1, TYPELIST_42(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) >
+
+#define TYPELIST_44(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) \
+    ::Loki::Typelist<T1, TYPELIST_43(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) >
+
+#define TYPELIST_45(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45) \
+    ::Loki::Typelist<T1, TYPELIST_44(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45) >
+
+#define TYPELIST_46(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46) \
+    ::Loki::Typelist<T1, TYPELIST_45(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46) >
+
+#define TYPELIST_47(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47) \
+    ::Loki::Typelist<T1, TYPELIST_46(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47) >
+
+#define TYPELIST_48(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48) \
+    ::Loki::Typelist<T1, TYPELIST_47(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48) >
+
+#define TYPELIST_49(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49) \
+    ::Loki::Typelist<T1, TYPELIST_48(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49) >
+
+#define TYPELIST_50(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) \
+    ::Loki::Typelist<T1, TYPELIST_49(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) >
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template Typelist
+// The building block of typelists of any length
+// Use it through the TYPELIST_NN macros
+// Defines nested types:
+//     Head (first element, a non-typelist type by convention)
+//     Tail (second element, can be another typelist)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, class U>
+    struct Typelist
+    {
+       typedef T Head;
+       typedef U Tail;
+    };
+
+    namespace TL
+    {
+
+////////////////////////////////////////////////////////////////////////////////
+// class template MakeTypelist
+// Takes a number of arguments equal to its numeric suffix
+// The arguments are type names.
+// MakeTypeList<T1, T2, ...>::Result
+// returns a typelist that is of T1, T2, ...
+////////////////////////////////////////////////////////////////////////////////
+
+        template
+        <
+            typename T1  = NullType, typename T2  = NullType, typename T3  = NullType,
+            typename T4  = NullType, typename T5  = NullType, typename T6  = NullType,
+            typename T7  = NullType, typename T8  = NullType, typename T9  = NullType,
+            typename T10 = NullType, typename T11 = NullType, typename T12 = NullType,
+            typename T13 = NullType, typename T14 = NullType, typename T15 = NullType,
+            typename T16 = NullType, typename T17 = NullType, typename T18 = NullType
+        > 
+        struct MakeTypeList
+        {
+        private:
+            typedef typename MakeTypeList
+            <
+                T2 , T3 , T4 , 
+                T5 , T6 , T7 , 
+                T8 , T9 , T10, 
+                T11, T12, T13,
+                T14, T15, T16, 
+                T17, T18
+            >
+            ::Result TailResult;
+
+        public:
+            typedef Typelist<T1, TailResult> Result;
+        };
+
+        template<>
+        struct MakeTypeList
+        <
+            NullType, NullType, NullType, 
+            NullType, NullType, NullType, 
+            NullType, NullType, NullType, 
+            NullType, NullType, NullType,
+            NullType, NullType, NullType,
+            NullType, NullType, NullType
+        >{
+            typedef NullType Result;
+        };
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template is_Typelist
+// detects if type is Typelist (including Nulltype)
+// Invocation :
+// is_Typelist<T>::value
+// returns a compile-time boolean constant containing true iff T is some Typelist<T1,T2>
+// is_Typelist<T>::type_id
+// returns a compile-time unsigned constant containing 
+// 1 iff T == Typelist<T1,T2>, 2 iff T == NullType and 3 otherwise
+////////////////////////////////////////////////////////////////////////////////
+        struct Typelist_tag {};
+        struct NullType_tag {};
+        struct NoneList_tag {};
+        
+        enum 
+        {
+            Typelist_ID = 1,
+            NullType_ID = 2,
+            NoneList_ID = 3
+        };
+
+        template<typename T>
+        struct is_Typelist
+        {
+        private:
+            typedef char (&ye1)[Typelist_ID];
+            typedef char (&ye2)[NullType_ID];
+            typedef char (&no) [NoneList_ID];
+
+            template<typename Head, typename Tail>
+            static ye1 check(Type2Type< Typelist<Head, Tail> >);
+            static ye2 check(Type2Type<NullType>);
+
+            static no  check(...);
+
+        public:
+            #if (_MSC_VER >= 1300)
+              // VC7 fail NPS_HierarchyGenerators.h if this one is enum
+              static const unsigned int type_id = sizeof(check( Type2Type<T>() ));
+            #else
+						  enum { type_id = sizeof(check( Type2Type<T>() )) };
+            #endif
+
+            enum { value = type_id != sizeof(no) };
+
+            typedef typename Select
+            <
+                type_id == Typelist_ID, 
+                Typelist_tag,
+                typename Select<type_id == NullType_ID, NullType_tag, NoneList_tag>::Result
+            > 
+            ::Result type_tag;
+        };
+
+
+
+#ifndef TL_FAST_COMPILATION
+
+// this macro will cause compile time error if _type_ is not a Typelist or NullType
+#define ASSERT_TYPELIST(_type_) \
+STATIC_CHECK( ::Loki::TL::is_Typelist<_type_>::value, TList_is_not_legal_Typelist )
+
+#else
+
+// might improve the compilation time
+#define ASSERT_TYPELIST(_type_) \
+typedef char _type_##_is_not_a_Typelist[true]
+
+#endif // ndef TL_FAST_COMPILATION
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Length
+// Computes the length of a typelist
+// Invocation (TList is a typelist):
+// Length<TList>::value
+// returns a compile-time constant containing the length of TList, not counting
+//     the end terminator (which by convention is NullType)
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList> struct Length;
+        
+        template <> 
+        struct Length<NullType>
+        {
+            enum { value = 0 };
+        };
+        
+        template <class TList>
+        struct Length
+        {
+        private:
+            ASSERT_TYPELIST(TList);
+            
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+
+        public:
+            enum { value = 1 + Length<Tail>::value };
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeAt
+// Finds the type at a given index in a typelist
+// Invocation (TList is a typelist and index is a compile-time integral 
+//     constant):
+// TypeAt<TList, index>::Result
+// returns the type in position 'index' in TList
+// If you pass an out-of-bounds index, the result is a compile-time error
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, unsigned int index> 
+        struct TypeAt
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+        private:
+            ASSERT_TYPELIST(TList);
+
+            template<unsigned int i>
+            struct In
+            {
+                typedef typename TypeAt<Tail, i - 1>::Result Result;
+            };
+
+            template<>
+            struct In<0>
+            {
+                typedef Head Result;
+            };
+
+        public:
+            typedef typename In<index>::Result Result;
+        };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeAtNonStrict
+// Finds the type at a given index in a typelist
+// Invocations (TList is a typelist and index is a compile-time integral 
+//     constant):
+// a) TypeAt<TList, index>::Result
+// returns the type in position 'index' in TList, or NullType if index is 
+//     out-of-bounds
+// b) TypeAt<TList, index, D>::Result
+// returns the type in position 'index' in TList, or D if index is out-of-bounds
+////////////////////////////////////////////////////////////////////////////////
+
+
+        template <class TList, unsigned int index, typename DefaultType = NullType> 
+        struct TypeAtNonStrict
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+        private:
+            ASSERT_TYPELIST(TList);
+
+            template<class TList1,unsigned int i>
+            struct In
+            {
+                typedef typename TypeAtNonStrict
+                <
+                    typename TList1::Tail, 
+                    i - 1,
+                    DefaultType
+                >
+                ::Result Result;
+            };
+
+            template<>
+            struct In<Typelist<Head, Tail>, 0>
+            {
+                typedef Head Result;
+            };
+
+            template<>
+            struct In<NullType, index>
+            {
+                typedef DefaultType Result;
+            };
+        public:
+            typedef typename In<TList, index>::Result Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IndexOf
+// Finds the index of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// IndexOf<TList, T>::value
+// returns the position of T in TList, or NullType if T is not found in TList
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T> 
+        struct IndexOf
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+        private:
+            ASSERT_TYPELIST(TList);
+
+            template<class TList1>
+            struct In
+            {
+            private:
+                typedef typename TList1::Tail Tail;
+
+                enum { temp = (IndexOf<Tail, T>::value) };
+
+            public:
+                enum { value = temp == -1 ? -1 : 1 + temp  };
+            };
+
+            template<>
+            struct In< Typelist<T, Tail> >
+            {
+                enum { value = 0 };
+            };
+
+            template<>
+            struct In<NullType>
+            {
+                enum { value = -1 };
+            };
+
+        public:
+            enum { value = In<TList>::value };
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Append
+// Appends a type or a typelist to another
+// Invocation (TList is a typelist and T is either a type or a typelist):
+// Append<TList, T>::Result
+// returns a typelist that is TList followed by T and NullType-terminated
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T> 
+        struct Append
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+        private:
+            ASSERT_TYPELIST(TList);
+
+            template<class TList1>
+            struct In
+            {
+                typedef typename TList1::Tail Tail;
+
+                typedef Typelist
+                <
+                    Head, 
+                    typename Append<Tail, T>::Result
+                > 
+                Result;
+            };
+
+            template<>
+            struct In<NullType>
+            {
+                typedef typename Select
+                <
+                    is_Typelist<T>::value, 
+                    T, TYPELIST_1(T) 
+                >
+                ::Result Result;
+            };
+
+        public:
+            typedef typename In<TList>::Result Result;
+        };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template Erase
+// Erases the first occurence, if any, of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// Erase<TList, T>::Result
+// returns a typelist that is TList without the first occurence of T
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T> 
+        struct Erase
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+        private:
+            ASSERT_TYPELIST(TList);
+
+            template<class TList1>
+            struct In
+            {
+                typedef typename TList1::Tail Tail;
+
+                typedef Typelist
+                <
+                    Head, 
+                    typename Erase<Tail, T>::Result
+                >
+                Result;
+            };
+
+            template<>
+            struct In< Typelist<T, Tail> >
+            {
+                typedef Tail Result;
+            };
+
+            template<>
+            struct In<NullType>
+            {
+                typedef NullType Result;
+            };
+
+        public:
+            typedef typename In<TList>::Result Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template EraseAll
+// Erases all first occurences, if any, of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// EraseAll<TList, T>::Result
+// returns a typelist that is TList without any occurence of T
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T> 
+        struct EraseAll
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+        private:
+            ASSERT_TYPELIST(TList);
+
+            template<class TList1>
+            struct In
+            {
+            private:
+                typedef typename TList1::Tail Tail;
+                typedef typename EraseAll<Tail, T>::Result TailResult;
+            
+            public:
+                typedef typename Select
+                <
+                    SameType<Head, T>::value,
+                    TailResult,
+                    Typelist<Head, TailResult>
+                >
+                ::Result Result;
+            };
+
+            template<>
+            struct In<NullType>
+            {
+                typedef NullType Result;
+            };
+
+        public:
+            typedef typename In<TList>::Result Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template NoDuplicates
+// Removes all duplicate types in a typelist
+// Invocation (TList is a typelist):
+// NoDuplicates<TList, T>::Result
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList> 
+        struct NoDuplicates
+        {
+        private:
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+            ASSERT_TYPELIST(TList);
+
+            typedef typename NoDuplicates<Tail>::Result L1;
+            typedef typename Erase<L1, Head>::Result    L2;
+
+        public:
+            typedef Typelist<Head, L2> Result;
+        };
+        
+        template <> 
+        struct NoDuplicates<NullType>
+        {
+            typedef NullType Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Replace
+// Replaces the first occurence of a type in a typelist, with another type
+// Invocation (TList is a typelist, T, U are types):
+// Replace<TList, T, U>::Result
+// returns a typelist in which the first occurence of T is replaced with U
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T, class U> 
+        struct Replace
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+        private:
+            ASSERT_TYPELIST(TList);
+
+            template<class TList1>
+            struct In
+            {
+                typedef typename TList1::Tail Tail;
+
+                typedef Typelist
+                <
+                    Head, 
+                    typename Replace<Tail, T, U>::Result
+                >
+                Result;
+            };
+
+            template<>
+            struct In< Typelist<T, Tail> >
+            {
+                typedef Typelist<U, Tail> Result;
+            };
+
+            template<>
+            struct In<NullType>
+            {
+                typedef NullType Result;
+            };
+
+        public:
+            typedef typename In<TList>::Result Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ReplaceAll
+// Replaces all occurences of a type in a typelist, with another type
+// Invocation (TList is a typelist, T, U are types):
+// Replace<TList, T, U>::Result
+// returns a typelist in which all occurences of T is replaced with U
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T, class U> 
+        struct ReplaceAll
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+        private:
+            ASSERT_TYPELIST(TList);
+
+            template<class TList1>
+            struct In
+            {
+            private:
+                typedef typename TList1::Tail Tail;
+                typedef typename ReplaceAll<Tail, T, U>::Result TailResult;
+            
+            public:
+                typedef typename Select
+                <
+                    SameType<Head, T>::value,
+                    Typelist<U,    TailResult>,
+                    Typelist<Head, TailResult>
+                >
+                ::Result Result;
+            };
+
+            template<>
+            struct In<NullType>
+            {
+                typedef NullType Result;
+            };
+
+        public:
+            typedef typename In<TList>::Result Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Reverse
+// Reverses a typelist
+// Invocation (TList is a typelist):
+// Reverse<TList>::Result
+// returns a typelist that is TList reversed
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList> struct Reverse;
+        
+        template <>
+        struct Reverse<NullType>
+        {
+            typedef NullType Result;
+        };
+        
+        template <class TList> 
+        struct Reverse
+        {
+        private:
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+            ASSERT_TYPELIST(TList);
+
+        public:
+            typedef typename Append<
+                typename Reverse<Tail>::Result, Head>::Result Result;
+        };
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template MostDerived
+// Finds the type in a typelist that is the most derived from a given type
+// Invocation (TList is a typelist, T is a type):
+// Replace<TList, T>::Result
+// returns the type in TList that's the most derived from T
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T> 
+        struct MostDerived
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+        private:
+            ASSERT_TYPELIST(TList);
+
+            template<class TList1>
+            struct In
+            {
+            private:
+                typedef typename TList1::Tail Tail;
+                typedef typename TList1::Head Head;
+                typedef typename MostDerived<Tail, T>::Result Candidate;
+            
+            public:
+                typedef typename Select
+                <
+                    SUPERSUBCLASS(Candidate, Head),
+                    Head, Candidate
+                >
+                ::Result Result;
+            };
+
+            template<>
+            struct In<NullType>
+            {
+                typedef T Result;
+            };
+
+        public:
+            typedef typename In<TList>::Result Result;
+        };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template DerivedToFront
+// Arranges the types in a typelist so that the most derived types appear first
+// Invocation (TList is a typelist):
+// DerivedToFront<TList>::Result
+// returns the reordered TList 
+////////////////////////////////////////////////////////////////////////////////
+        
+        template <class TList> struct DerivedToFront;
+        
+        template <>
+        struct DerivedToFront<NullType>
+        {
+            typedef NullType Result;
+        };
+        
+        template <class TList>
+        struct DerivedToFront
+        {
+        private:
+            ASSERT_TYPELIST(TList);
+
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+            typedef typename MostDerived<Tail, Head>::Result TheMostDerived;
+            typedef typename ReplaceAll<Tail, TheMostDerived, Head>::Result Temp;
+            typedef typename DerivedToFront<Temp>::Result L;
+
+        public:
+            typedef Typelist<TheMostDerived, L> Result;
+        };
+                
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DerivedToFrontAll
+// Arranges all the types in a typelist so that the most derived types appear first
+// Invocation (TList is a typelist):
+// DerivedToFront<TList>::Result
+// returns the reordered TList 
+////////////////////////////////////////////////////////////////////////////////
+        
+        template <class TList> struct DerivedToFrontAll;
+        
+        template <>
+        struct DerivedToFrontAll<NullType>
+        {
+            typedef NullType Result;
+        };
+        
+        template <class TList>
+        struct DerivedToFrontAll
+        {
+        private:
+            ASSERT_TYPELIST(TList);
+
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+        
+            typedef typename MostDerived<Tail, Head>::Result TheMostDerived;
+            typedef typename Replace<Tail, TheMostDerived, Head>::Result L;
+            
+            typedef typename DerivedToFrontAll<L>::Result TailResult;
+
+        public:
+            typedef Typelist<TheMostDerived, TailResult> Result;
+        };
+                                    
+    }   // namespace TL
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 09, 2001: Fix bug in parameter list of macros TYPELIST_23 to TYPELIST_27
+//      (credit due to Dave Taylor)
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPELIST_INC_
+
Index: avida/current/source/third-party/Loki/MSVC/1300/TypeManip.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/TypeManip.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/TypeManip.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,211 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef TYPEMANIP_INC_
+#define TYPEMANIP_INC_
+
+namespace Loki
+{    
+////////////////////////////////////////////////////////////////////////////////
+// class template Int2Type
+// Converts each integral constant into a unique type
+// Invocation: Int2Type<v> where v is a compile-time constant integral
+// Defines 'value', an enum that evaluates to v
+////////////////////////////////////////////////////////////////////////////////
+
+    template <int v>
+    struct Int2Type
+    {
+        enum { value = v };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template Type2Type
+// Converts each type into a unique, insipid type
+// Invocation Type2Type<T> where T is a type
+// Defines the type OriginalType which maps back to T
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct Type2Type
+    {   
+        typedef T OriginalType;
+        Type2Type(){} // VC7
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template Select
+// Selects one of two types based upon a boolean constant
+// Invocation: Select<flag, T, U>::Result
+// where:
+// flag is a compile-time boolean constant
+// T and U are types
+// Result evaluates to T if flag is true, and to U otherwise.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <bool flag, typename T, typename U>
+    struct Select
+    {
+    private:
+        template<bool>
+        struct In 
+        { typedef T Result; };
+
+        template<>
+        struct In<false>
+        { typedef U Result; };
+
+    public:
+        typedef typename In<flag>::Result Result;
+    };
+    
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SameType
+// Return true iff two given types are the same
+// Invocation: SameType<T, U>::value
+// where:
+// T and U are types
+// Result evaluates to true iff U == T (types equal)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T, typename U>
+    struct SameType
+    {
+    private:
+        template<typename>
+        struct In 
+        { enum { value = false }; };
+
+        template<>
+        struct In<T>
+        { enum { value = true };  };
+
+    public:
+        enum { value = In<U>::value };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// Helper types Small and Big - guarantee that sizeof(Small) < sizeof(Big)
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        typedef char Small;
+        class Big { char dummy[2]; };
+
+        template<typename T>
+        struct IsVoid
+        {
+            enum { result = 
+                SameType<T, void>::value          ||
+                SameType<T, const void>::value    ||
+                SameType<T, volatile void>::value ||
+                SameType<T, const volatile void>::value
+            };
+        };
+    }
+
+//
+// is one type convertable to another?
+//
+    template <class T, class U>
+    class is_convertible
+    {
+        struct VoidReplace {};
+
+        typedef typename Select
+        <
+            Private::IsVoid<T>::result,
+            VoidReplace, T
+        >
+        ::Result T1;
+
+        typedef typename Select
+        <
+            Private::IsVoid<U>::result,
+            VoidReplace, U
+        >
+        ::Result U1;
+
+        static Private::Big   Test(...);
+        static Private::Small Test(U1);
+        static T1 MakeT();
+
+    public:       
+        enum { exists = sizeof(Test(MakeT())) == sizeof(Private::Small) };
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Conversion
+// Figures out the conversion relationships between two types
+// Invocations (T and U are types):
+// a) Conversion<T, U>::exists
+// returns (at compile time) true if there is an implicit conversion from T
+// to U (example: Derived to Base)
+// b) Conversion<T, U>::exists2Way
+// returns (at compile time) true if there are both conversions from T
+// to U and from U to T (example: int to char and back)
+// c) Conversion<T, U>::sameType
+// returns (at compile time) true if T and U represent the same type
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, class U>
+    struct Conversion
+    {
+        enum { exists = (is_convertible<T,U>::exists) };
+        enum { exists2Way = (exists && is_convertible<U, T>::exists) };
+        enum { sameType = (SameType<T, U>::value) };
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// macro SUPERSUBCLASS
+// Invocation: SUPERSUBCLASS(B, D) where B and D are types. 
+// Returns true if B is a public base of D, or if B and D are aliases of the 
+// same type.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+#define SUPERSUBCLASS(T, U) \
+    (::Loki::Conversion<const volatile U*, const volatile T*>::exists && \
+    !::Loki::Conversion<const volatile T*, const volatile void*>::sameType)
+
+////////////////////////////////////////////////////////////////////////////////
+// macro SUPERSUBCLASS
+// Invocation: SUPERSUBCLASS(B, D) where B and D are types. 
+// Returns true if B is a public base of D.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+#define SUPERSUBCLASS_STRICT(T, U) \
+    (SUPERSUBCLASS(T, U) && \
+    !::Loki::Conversion<const volatile T *, const volatile U *>::sameType)
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPEMANIP_INC_
+
Index: avida/current/source/third-party/Loki/MSVC/1300/TypeTraits.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/TypeTraits.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/TypeTraits.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,347 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef TYPETRAITS_INC_
+#define TYPETRAITS_INC_
+
+#include "Typelist.h"
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomUnsignedInt
+// Offers a means to integrate nonstandard built-in unsigned integral types
+// (such as unsigned __int64 or unsigned long long int) with the TypeTraits 
+//     class template defined below.
+// Invocation: IsCustomUnsignedInt<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in unsigned
+//     integral type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomUnsignedInt
+    {
+        enum { value = 0 };
+    };        
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomSignedInt
+// Offers a means to integrate nonstandard built-in unsigned integral types
+// (such as unsigned __int64 or unsigned long long int) with the TypeTraits 
+//     class template defined below.
+// Invocation: IsCustomSignedInt<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in signed
+//     integral type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomSignedInt
+    {
+        enum { value = 0 };
+    };        
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomFloat
+// Offers a means to integrate nonstandard floating point types with the
+//     TypeTraits class template defined below.
+// Invocation: IsCustomFloat<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in
+//     floating point type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomFloat
+    {
+        enum { value = 0 };
+    };        
+
+////////////////////////////////////////////////////////////////////////////////
+// Helper types for class template TypeTraits defined below
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        typedef TYPELIST_4(unsigned char, unsigned short int,
+           unsigned int, unsigned long int) StdUnsignedInts;
+        typedef TYPELIST_4(signed char, short int,
+           int, long int) StdSignedInts;
+        typedef TYPELIST_3(bool, char, wchar_t) StdOtherInts;
+        typedef TYPELIST_3(float, double, long double) StdFloats;
+    }
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeTraits
+// Figures out various properties of any given type
+// Invocations (T is a type):
+// a) TypeTraits<T>::isPointer
+// returns (at compile time) true if T is a pointer type
+// b) TypeTraits<T>::PointeeType
+// returns the type to which T points is T is a pointer type, NullType otherwise
+// a) TypeTraits<T>::isReference
+// returns (at compile time) true if T is a reference type
+// b) TypeTraits<T>::ReferredType
+// returns the type to which T refers is T is a reference type, NullType
+// otherwise
+// c) TypeTraits<T>::isMemberPointer
+// returns (at compile time) true if T is a pointer to member type
+// d) TypeTraits<T>::isStdUnsignedInt
+// returns (at compile time) true if T is a standard unsigned integral type
+// e) TypeTraits<T>::isStdSignedInt
+// returns (at compile time) true if T is a standard signed integral type
+// f) TypeTraits<T>::isStdIntegral
+// returns (at compile time) true if T is a standard integral type
+// g) TypeTraits<T>::isStdFloat
+// returns (at compile time) true if T is a standard floating-point type
+// h) TypeTraits<T>::isStdArith
+// returns (at compile time) true if T is a standard arithmetic type
+// i) TypeTraits<T>::isStdFundamental
+// returns (at compile time) true if T is a standard fundamental type
+// j) TypeTraits<T>::isUnsignedInt
+// returns (at compile time) true if T is a unsigned integral type
+// k) TypeTraits<T>::isSignedInt
+// returns (at compile time) true if T is a signed integral type
+// l) TypeTraits<T>::isIntegral
+// returns (at compile time) true if T is a integral type
+// m) TypeTraits<T>::isFloat
+// returns (at compile time) true if T is a floating-point type
+// n) TypeTraits<T>::isArith
+// returns (at compile time) true if T is a arithmetic type
+// o) TypeTraits<T>::isFundamental
+// returns (at compile time) true if T is a fundamental type
+// p) TypeTraits<T>::ParameterType
+// returns the optimal type to be used as a parameter for functions that take Ts
+// q) TypeTraits<T>::isConst
+// returns (at compile time) true if T is a const-qualified type
+// r) TypeTraits<T>::NonConstType
+// removes the 'const' qualifier from T, if any
+// s) TypeTraits<T>::isVolatile
+// returns (at compile time) true if T is a volatile-qualified type
+// t) TypeTraits<T>::NonVolatileType
+// removes the 'volatile' qualifier from T, if any
+// u) TypeTraits<T>::UnqualifiedType
+// removes both the 'const' and 'volatile' qualifiers from T, if any
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    class TypeTraits
+    {
+        typedef char (&yes)[1];
+        typedef char (&no) [2];
+
+        template<typename U, size_t N>
+        static void vc7_need_this_for_is_array(Type2Type<U[N]>);
+
+        template<typename U>
+        static yes is_reference(Type2Type<U&>);
+        static no  is_reference(...);
+
+        template<typename U>
+        static yes is_pointer1(Type2Type<U*>);
+        static no  is_pointer1(...);
+
+        template<typename U>
+        static yes is_pointer2(Type2Type<U const *>);
+        static no  is_pointer2(...);
+
+        template<typename U>
+        static yes is_pointer3(Type2Type<U volatile *>);
+        static no  is_pointer3(...);
+
+        template<typename U>
+        static yes is_pointer4(Type2Type<U const volatile *>);
+        static no  is_pointer4(...);
+
+        template<typename U, typename V>
+        static yes is_pointer2member(Type2Type<U V::*>);
+        static no  is_pointer2member(...);
+
+        template<typename U, size_t N>
+        static yes is_array1(Type2Type<U[N]>);
+        static no  is_array1(...);
+
+        template<typename U>
+        static yes is_array2(Type2Type<U[]>);
+        static no  is_array2(...);
+
+        template<typename U>
+        static yes is_const(Type2Type<const U>);
+        static no  is_const(...);
+
+        template<typename U>
+        static yes is_volatile(Type2Type<volatile U>);
+        static no  is_volatile(...);
+
+    public:        
+        //
+        // VC7 BUG - will not detect refernce to function
+        //
+        enum { 
+            isReference = 
+                sizeof(is_reference(Type2Type<T>())) == sizeof(yes) 
+        };
+        
+        //
+        // VC7 BUG - will not detect pointer to function
+        //
+        enum { 
+            isPointer = 
+                sizeof(is_pointer1(Type2Type<T>())) == sizeof(yes) ||
+                sizeof(is_pointer2(Type2Type<T>())) == sizeof(yes) ||
+                sizeof(is_pointer3(Type2Type<T>())) == sizeof(yes) ||
+                sizeof(is_pointer4(Type2Type<T>())) == sizeof(yes)
+        };
+        
+        enum { 
+            isMemberPointer = 
+                sizeof(is_pointer2member(Type2Type<T>())) == sizeof(yes)
+        };
+    
+        enum { 
+            isArray =
+                sizeof(is_array1(Type2Type<T>())) == sizeof(yes) ||
+                sizeof(is_array2(Type2Type<T>())) == sizeof(yes)
+        };
+
+        enum { 
+            isVoid = 
+                SameType<T, void>::value          ||
+                SameType<T, const void>::value    ||
+                SameType<T, volatile void>::value ||
+                SameType<T, const volatile void>::value
+        };
+
+        enum { isStdUnsignedInt = 
+            TL::IndexOf<Private::StdUnsignedInts, T>::value >= 0 };
+        enum { isStdSignedInt = 
+            TL::IndexOf<Private::StdSignedInts, T>::value >= 0 };
+        enum { isStdIntegral = isStdUnsignedInt || isStdSignedInt ||
+            TL::IndexOf<Private::StdOtherInts, T>::value >= 0 };
+        enum { isStdFloat = TL::IndexOf<Private::StdFloats, T>::value >= 0 };
+        enum { isStdArith = isStdIntegral || isStdFloat };
+        enum { isStdFundamental = isStdArith || isStdFloat || isVoid };
+            
+        enum { isUnsignedInt = isStdUnsignedInt || IsCustomUnsignedInt<T>::value };
+        enum { isSignedInt = isStdSignedInt || IsCustomSignedInt<T>::value };
+        enum { isIntegral = isStdIntegral || isUnsignedInt || isSignedInt };
+        enum { isFloat = isStdFloat || IsCustomFloat<T>::value };
+        enum { isArith = isIntegral || isFloat };
+        enum { isFundamental = isStdFundamental || isArith || isFloat };
+        
+        enum { 
+            isConst = 
+                sizeof(is_const(Type2Type<T>())) == sizeof(yes)
+        };
+
+        enum { 
+            isVolatile = 
+                sizeof(is_volatile(Type2Type<T>())) == sizeof(yes)
+        };
+
+        
+    private:
+        // is_scalar include functions types
+        struct is_scalar
+        {
+        private:
+            struct BoolConvert { BoolConvert(bool); };
+
+            static yes check(BoolConvert);
+            static no  check(...);
+
+            struct NotScalar {};
+
+            typedef typename Select
+            <
+                isVoid || isReference || isArray, 
+                NotScalar, T
+            >
+            ::Result RetType;
+            
+            static RetType& get();
+
+        public:
+//
+// Ignore forcing value to bool 'true' or 'false' (performance warning)
+//
+#ifdef _MSC_VER
+#pragma warning (disable: 4800)
+#endif
+
+            enum { value = sizeof(check(get())) == sizeof(yes) };
+
+#ifdef _MSC_VER
+#pragma warning (default: 4800)
+#endif
+        }; // is_scalar
+
+    
+    private:
+        template<bool IsRef>
+        struct AdjReference
+        {
+            template<typename U>
+            struct In { typedef U const & Result; };
+        };
+
+        template<>
+        struct AdjReference<true>
+        {
+            template<typename U>
+            struct In { typedef U Result; };
+        };
+
+        typedef typename AdjReference<isReference || isVoid>::
+                template In<T>::Result AdjType;
+
+    public:        
+        enum { isScalar = is_scalar::value };
+
+
+        typedef typename Select
+        <
+            isScalar || isArray, T, AdjType
+        >
+        ::Result ParameterType;
+        
+        //
+        // We get is_class for free
+        // BUG - fails with functions types (ICE) and unknown size array
+        // (but works for other incomplete types)
+        // (the boost one (Paul Mensonides) is better)
+        //
+        enum { isClass = 
+                !isScalar    && 
+                !isArray     && 
+                !isReference &&
+                !isVoid 
+        };
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May  10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPETRAITS_INC_
Index: avida/current/source/third-party/Loki/MSVC/1300/VC_Alignment.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/VC_Alignment.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/VC_Alignment.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,106 @@
+// Last update: June 20, 2001
+
+#ifdef _MSC_VER
+# pragma once
+#else
+# error "Visual C++ specific header !"
+#endif
+
+#ifndef VC_ALIGNMENT_INC_
+#define VC_ALIGNMENT_INC_
+
+#include "Typelist.h"
+#include "static_check.h"
+
+////////////////////////////////////////////////////////////////////////////////
+// class template MaxAlign
+// Computes the maximum alignof for all types in a typelist
+// Usage: MaxAlign<TList>::result
+////////////////////////////////////////////////////////////////////////////////
+
+template <class TList> struct VC_MaxAlign;
+
+template <> 
+struct VC_MaxAlign< ::Loki::NullType >
+{
+    enum { result = 0 };
+};
+
+template <class TList>
+struct VC_MaxAlign
+{
+private:
+    ASSERT_TYPELIST(TList);
+
+    typedef typename TList::Head Head;
+    typedef typename TList::Tail Tail;
+
+private:
+    enum { headResult = __alignof(Head)        };
+    enum { tailResult = VC_MaxAlign<Tail>::result };
+
+public:
+    enum { result = headResult > tailResult ? 
+           headResult : tailResult };
+};
+
+                         
+////////////////////////////////////////////////////////////////////////////////
+// class VC_AlignedPODBase
+// Defines a host of protected types used by VC_AlignedPOD (defined later)
+// Could be just part of VC_AlignedPOD itself, but making it separate ought to 
+// reduce compile times 
+////////////////////////////////////////////////////////////////////////////////
+class VC_AlignedPODBase
+{
+protected:
+
+    template<unsigned AlignmentSize>
+    struct AlignedPod
+    {
+        STATIC_CHECK(AlignmentSize == 0, BadAlignmentSize_OnlyUpTo128);
+    };
+
+//
+// I used the macro because align(#) 
+// only works with Integer literals
+//
+#define ALIGNED_POD(_size_)                                   \
+template<> struct AlignedPod<_size_> {                        \
+  __declspec(align(_size_)) struct type { char X[_size_]; };  \
+  enum { alignment = __alignof(type) }; };                    \
+STATIC_CHECK((_size_ == sizeof(AlignedPod<_size_>::type)), SizeofNotEqualSize); \
+STATIC_CHECK((_size_ == (AlignedPod<_size_>::alignment)), SizeofNotEqualAlignof)
+
+
+    ALIGNED_POD(1);
+    ALIGNED_POD(2);
+    ALIGNED_POD(4);
+    ALIGNED_POD(8);
+    ALIGNED_POD(16);
+    ALIGNED_POD(32);
+    ALIGNED_POD(64);
+    ALIGNED_POD(128);
+    // can be up to 8192 - is it realistic?
+
+#undef ALIGNED_POD
+
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template VC_AlignedPOD
+// Computes the alignment of all types in a typelist
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename TList>
+class VC_AlignedPOD : VC_AlignedPODBase
+{
+    enum { maxAlign = VC_MaxAlign<TList>::result };
+
+public:
+    typedef typename AlignedPod<maxAlign>::type Result;
+};
+
+#endif // VC_ALIGNMENT_INC_
+
Index: avida/current/source/third-party/Loki/MSVC/1300/Variant.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/Variant.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/Variant.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,864 @@
+////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2001, 2002 by Andrei Alexandrescu
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author makes no representations about the suitability of this software 
+//     for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef VARIANT_INC_
+#define VARIANT_INC_
+
+#include <cstddef>
+#include <memory>
+#include <typeinfo>
+#include "Visitor.h"
+#include "Typelist.h"
+#include "static_check.h"
+
+//
+// At the moment there is no namespace for Variant
+//
+
+#ifdef _MSC_VER
+# include "VC_Alignment.h"
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ConfigurableUnion
+// Builds a union that contains each type in a typelist
+// Usage: ConfigurableUnion<TList> is the very type
+////////////////////////////////////////////////////////////////////////////////
+
+template <class U> union ConfigurableUnion;
+
+template <> union ConfigurableUnion< ::Loki::NullType >
+{
+};
+
+template <class TList> 
+union ConfigurableUnion
+{
+private:
+    ASSERT_TYPELIST(TList);
+
+    typedef typename TList::Head Head;
+    typedef typename TList::Tail Tail;
+
+public:
+   Head head_;
+   ConfigurableUnion<Tail> tail_;
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template MaxSize
+// Computes the maximum sizeof for all types in a typelist
+// Usage: MaxSize<TList>::result
+////////////////////////////////////////////////////////////////////////////////
+
+template <class TList> struct MaxSize;
+
+template <> 
+struct MaxSize< ::Loki::NullType >
+{
+    enum { result = 0 };
+};
+
+template <class TList>
+struct MaxSize
+{
+private:
+    ASSERT_TYPELIST(TList);
+
+    typedef typename TList::Head Head;
+    typedef typename TList::Tail Tail;
+
+private:
+    enum { headResult = sizeof(Head)          };
+    enum { tailResult = MaxSize<Tail>::result };
+
+public:
+    enum { result = headResult > tailResult ? 
+           headResult : tailResult };
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class AlignedPODBase
+// Defines a host of protected types used by AlignedPOD (defined later)
+// Could be just part of AlignedPOD itself, but making it separate ought to 
+// reduce compile times 
+////////////////////////////////////////////////////////////////////////////////
+
+class AlignedPODBase
+{
+protected:
+    template <class TList, std::size_t size> 
+    struct ComputeAlignBound
+    {
+    private:
+        ASSERT_TYPELIST(TList);
+    
+        typedef typename TList::Head Head;
+        typedef typename TList::Tail Tail;
+    
+    private:
+        template<class TList1>
+        struct In
+        {
+        private:
+            typedef typename TList1::Head Head1;
+            typedef typename TList1::Tail Tail1;
+    
+            typedef typename ComputeAlignBound<Tail1, size>::Result TailResult;
+    
+        public:
+            typedef typename ::Loki::Select
+            <
+                sizeof(Head1) <= size,
+                ::Loki::Typelist<Head1, TailResult>,
+                TailResult
+            >
+            ::Result Result;
+        };
+
+        template<>
+        struct In< ::Loki::NullType >
+        {
+            typedef ::Loki::NullType Result;
+        };
+
+    public:
+        typedef typename In<TList>::Result Result;
+    };
+
+    template <typename U> struct Structify
+    { U dummy_; };
+    
+    class Unknown;
+
+    // VC7: fatal error C1067: compiler limit :
+    // debug information module size exceeded
+    // Therfore I decreased the list to 26 without 
+    // changing the rage of detectable alignment
+    typedef TYPELIST_26(
+            char,
+            wchar_t,
+            short int,
+            int,
+            long int,
+            float,
+            double,
+            long double,
+            char*,
+            void*,
+            Unknown (*)(Unknown),
+            Unknown* Unknown::*,
+            Unknown (Unknown::*)(Unknown),
+            Structify<char>, 
+            Structify<wchar_t>, 
+            Structify<short int>, 
+            Structify<int>,
+            Structify<long int>,
+            Structify<float>,
+            Structify<double>,
+            Structify<long double>,
+            Structify<char*>,
+            Structify<void*>,
+            Structify<Unknown (*)(Unknown)>,
+            Structify<Unknown* Unknown::*>,
+            Structify<Unknown (Unknown::*)(Unknown)>
+            )
+        TypesOfAllAlignments;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AlignedPOD
+// Computes the alignment of all types in a typelist
+// Usage: ConfigurableUnion<TList> is the very type
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename TList>
+class AlignedPOD : private AlignedPODBase
+{
+    enum { maxSize = MaxSize<TList>::result };
+
+    typedef typename ComputeAlignBound
+    <
+        TypesOfAllAlignments, 
+        maxSize
+    >
+    ::Result AlignTypes;
+
+public:
+    typedef ConfigurableUnion<AlignTypes> Result;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// class template MakeConst
+// Given a typelist TList, returns a typelist that contains the types in TList 
+// adding a const qualifier to each.
+// Usage: MakeConst<TList>::Result 
+////////////////////////////////////////////////////////////////////////////////
+
+template <class TList> struct MakeConst;
+
+template <> struct MakeConst< ::Loki::NullType >
+{
+    typedef ::Loki::NullType Result; // terminator is not const
+};
+
+template <class TList>
+struct MakeConst
+{
+private:
+    ASSERT_TYPELIST(TList);
+
+    typedef typename TList::Head Head;
+    typedef typename TList::Tail Tail;
+    
+private:
+    typedef typename MakeConst<Tail>::Result NewTail;
+
+public:
+    typedef ::Loki::Typelist<const Head, NewTail> Result; 
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Converter
+// Supports the Variant-to-Variant conversion constructor
+// Guaranteed to issue an internal compiler error on:
+//      1. Metrowerks CodeWarrior 7.0 (internal compiler error: File: 
+//          'CTemplateTools.c' Line: 1477 
+//          Variant.h line 244           UnitBase > VisitorBase;)
+//      2. Microsoft Visual C++ 7.1 alpha release (Assertion failed: 
+//          ( name - nameBuf ) < LIMIT_ID_LENGTH, 
+//          file f:\vs70builds\2108\vc\Compiler\CxxFE\sl\P1\C\outdname.c, 
+//          line 4583)
+//      3. GNU gcc 2.95.3-6 (Internal compiler error 980422)
+////////////////////////////////////////////////////////////////////////////////
+
+template <class VariantFrom, class VariantTo>
+struct Converter
+{
+//private: VC7 complains
+    struct UnitBase : public VariantFrom::ConstStrictVisitor
+    {
+    protected:
+        VariantTo* storageForDestination;
+    };
+
+    template <class Type, class Base> 
+    struct Unit : public Base
+    {
+    private:
+        void DoVisit(const Type& obj, ::Loki::Int2Type<true>)
+        {
+            new(this->storageForDestination) VariantTo(obj);
+        }
+        void DoVisit(const Type&, ::Loki::Int2Type<false>)
+        {
+            throw std::runtime_error("Cannot convert");
+        }
+        virtual void Visit(const Type& obj)
+        {
+            using namespace Loki;
+            typedef typename VariantTo::Types TList;
+            enum { dispatch = TL::IndexOf<TList, Type>::value > -1 };
+            this->DoVisit(obj, Int2Type<dispatch>());
+        }
+    };
+    
+private:
+    typedef ::Loki::GenLinearHierarchy
+    <
+        typename VariantFrom::Types,
+        Unit,
+        UnitBase 
+    > 
+    VisitorBase;
+
+public:
+    struct Visitor : public VisitorBase
+    {
+        explicit Visitor(VariantTo& dest)
+        {
+            // Initialize the pointer to destination
+            this->storageForDestination = &dest;
+        }
+    };
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ConverterTo
+// Supports Variant-to-T conversion
+////////////////////////////////////////////////////////////////////////////////
+#if 0
+template <class VariantFrom, class T>
+struct ConverterTo
+{
+private:
+    struct DestHolder 
+        : VariantFrom::ConstStrictVisitor
+    {
+    protected:
+        DestHolder() {}
+        DestHolder(const T& dest) : destination_(dest) {}
+        T destination_;
+    };
+
+    template <class TList> 
+    struct VisitorBase
+        : VisitorBase<typename TList::Tail>
+    {
+    private:
+        ASSERT_TYPELIST(TList);
+    
+        typedef typename TList::Head Type;
+        typedef typename TList::Tail Tail;
+    
+    protected:
+        VisitorBase<TList>() {}
+        VisitorBase<TList>(const T& dest) 
+            : VisitorBase<Tail>(dest) {}
+    
+    private:
+        void DoVisit(const Type& obj, ::Loki::Int2Type<true>)
+        {   //
+            // T temp(obj)
+            // swap(destination_, temp) or destination_ = temp
+            //
+            this->destination_ = obj;
+        }
+        void DoVisit(const Type&, ::Loki::Int2Type<false>)
+        {
+            throw std::runtime_error("Cannot convert");
+        }
+
+        virtual void Visit(const Type& obj)
+        {
+            using namespace Loki;
+            enum { dispatch = Conversion<Type, T>::exists != 0 };
+            this->DoVisit(obj, Int2Type<dispatch>());
+        }
+    };
+    
+    template <> 
+    struct VisitorBase< ::Loki::NullType > 
+        : DestHolder
+    {
+    protected:
+        VisitorBase< ::Loki::NullType >() {}
+        VisitorBase< ::Loki::NullType >(const T& dest) 
+            : DestHolder(dest) {}
+    };
+
+    
+    typedef VisitorBase
+    <
+        typename VariantFrom::Types
+    >
+    VisitorBaseType;
+    
+public:
+    struct Visitor : public VisitorBaseType
+    {
+        Visitor() {}
+
+        explicit Visitor(const T& dest) 
+            : VisitorBaseType(dest) {}
+
+        const T &GetDestination() const 
+        { return this->destination_; }
+    };
+};
+
+#else
+
+template <class VariantFrom, class T>
+struct ConverterTo
+{
+//private:
+    struct UnitBase : public VariantFrom::ConstStrictVisitor
+    {
+    protected:
+        T destination_;
+    };
+
+    template <class Type, class Base> 
+    struct Unit : public Base
+    {
+    private:
+        void DoVisit(const Type& obj, ::Loki::Int2Type<true>)
+        {
+            this->destination_ = obj;
+        }
+        void DoVisit(const Type&, ::Loki::Int2Type<false>)
+        {
+            throw std::runtime_error("Cannot convert");
+        }
+        virtual void Visit(const Type& obj)
+        {
+            using namespace Loki;
+            enum { dispatch = Conversion<Type, T>::exists != 0 };
+            this->DoVisit(obj, Int2Type<dispatch>());
+        }
+    };
+    
+    typedef ::Loki::GenLinearHierarchy<
+        typename VariantFrom::Types,
+        Unit,
+        UnitBase > VisitorBase;
+
+public:
+    struct Visitor : public VisitorBase
+    {
+        const T &GetDestination() const 
+        { return this->destination_; }
+    };
+};
+
+#endif
+
+namespace Private 
+{
+    template<typename T>
+    struct RawDataKeeper
+    {        
+    private:        
+        typedef char RawBuffer_t[sizeof(T)];
+        enum ObjectState_e { eNone, ePreConstruct, ePostConstruct };
+
+        T               &obj_;
+        ObjectState_e   eObjState_;
+        RawBuffer_t     bufferOrg_;
+        RawBuffer_t     bufferNew_;
+
+    private:
+        void SetObj(const RawBuffer_t &buf) throw()
+        {
+            memcpy(&reinterpret_cast<char &>(obj_), buf, sizeof(buf));
+        }    
+
+        void GetObj(RawBuffer_t &buf) throw()
+        {
+            memcpy(buf, &reinterpret_cast<const char &>(obj_), sizeof(buf));
+        }    
+
+    public:
+        explicit RawDataKeeper(T &obj) 
+            : obj_(obj), eObjState_(eNone)
+        {}
+    
+        // add const U & version ?
+        template<typename U>
+        void ConstructNew(U &src)
+        {
+            assert(eObjState_ == eNone);
+
+            GetObj(bufferOrg_);
+            
+            eObjState_ = ePreConstruct;
+            new (&obj_) T(src);
+            eObjState_ = ePostConstruct;
+
+            GetObj(bufferNew_);
+            SetObj(bufferOrg_);
+        }
+
+        void SetNew() throw()
+        {
+            assert(eObjState_ == ePostConstruct);
+
+            obj_.~T();
+            SetObj(bufferNew_);
+            eObjState_ = eNone;
+        }
+
+        ~RawDataKeeper()
+        {
+            switch(eObjState_)
+            {
+            case ePostConstruct:
+                SetObj(bufferNew_);
+                obj_.~T();
+                // fall
+            
+            case ePreConstruct:
+                SetObj(bufferOrg_);
+                // fall
+
+            case eNone:
+                break;
+            }
+        }
+
+    private:
+        RawDataKeeper(const RawDataKeeper &);
+        RawDataKeeper& operator=(const RawDataKeeper &);
+    };
+
+    //
+    // based on Eric Fridman's safe_swap from boost Variant 
+    //
+    //   strong exception-safety guarantee.
+    //
+    // !WARNING!
+    //   SafeSwap CANNOT be safely used in the general case if either
+    //   argument's data members may be accessed concurrently.
+    //
+    template<typename T>
+    void SafeSwap(T &lhs, T &rhs)
+    {
+        typedef RawDataKeeper<T> RhsDataKeeper;
+        typedef RawDataKeeper<T> LhsDataKeeper;
+
+        RhsDataKeeper rhsKeeper(rhs);
+        rhsKeeper.ConstructNew(lhs);
+            
+        LhsDataKeeper lhsKeeper(lhs);
+        lhsKeeper.ConstructNew(rhs);
+    
+        rhsKeeper.SetNew();
+        lhsKeeper.SetNew();
+    }
+
+
+    //
+    // based on Eric Fridman's safe_assign from boost Variant 
+    //
+    //   strong exception-safety guarantee.
+    //
+    // !WARNING!
+    //   SafeAssign CANNOT be safely used in the general case if either
+    //   argument's data members may be accessed concurrently.
+    //
+    template<typename T, typename U>
+    void SafeAssign(T &lhs, const U &src)
+    {
+        typedef RawDataKeeper<T> LhsDataKeeper;
+
+        LhsDataKeeper lhsKeeper(lhs);
+        lhsKeeper.ConstructNew(src);
+        lhsKeeper.SetNew();
+    }
+
+    template<typename T>
+    inline void SwapHelper(T &lhs, T &rhs)
+    {
+        using namespace std;
+        swap(lhs, rhs);
+    }
+} // namespace Private 
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Variant
+// Implements a discriminated union in C++
+////////////////////////////////////////////////////////////////////////////////
+
+template <class TList, class AlignedPODType = AlignedPOD<TList> >
+class Variant
+{
+    // VC7: fatal error C1067: compiler limit :
+    // debug information module size exceeded
+    // Therfore define this type here 
+    typedef typename AlignedPODType::Result Align;
+
+public:
+    typedef TList Types;
+
+    // Default constructor
+    // Initializes the Variant with a default-constructed object of the 
+    // first type in the typelist
+    Variant()
+    {
+        typedef typename TList::Head T;
+        new(&buffer_[0]) T;
+        vptr_ = VTableImpl<T>::GetVPTR();
+    }
+
+    // Copy constructor
+    Variant(const Variant& rhs)
+    {
+        (rhs.vptr_->clone_)(rhs, *this);
+    }
+
+private:
+    // Converting constructor; accepts any type in the typelist
+    // @@@ Suggested simple improvement: accept any type convertible to one of 
+    // the types in the typelist. Use Loki::Conversion as a building block
+    template <class T>
+    void VariantConstruct(const T& val, double)
+    {
+        STATIC_CHECK((::Loki::TL::IndexOf<TList, T>::value >= 0), 
+            Invalid_Type_Used_As_Initializer);
+        
+        new(&buffer_[0]) T(val);
+        vptr_ = VTableImpl<T>::GetVPTR();
+    }
+    
+    // Inter-Variant conversion constructor
+    // Current policy is: conversion succeeds iff the actual type of the source 
+    // is one of the types accepted by the target
+    // @@@ Possible change: accept if the actual type of the source is
+    //     convertible to one of the types accepted by the target. Problem to 
+    //     solve: handle ambiguities in a satisfactory manner. Suggestion: when
+    //     in doubt, do closest to what the compiler would do.
+    template <class TList2, typename Align2>
+    void VariantConstruct(const Variant<TList2, Align2>& rhs, int)
+    {
+        typename Converter<Variant<TList2, Align2>, Variant>::Visitor v(*this);
+        typename Variant<TList2, Align2>::ConstStrictVisitor& visitor = v;
+        rhs.Accept(visitor);
+    }
+
+public:
+    // VC7 don't support partial ordering
+    // The constructor initialization section 
+    // is empty which make it to use function instead
+    // without the int = 0 the explicit seems to confuse
+    // VC7 when the copy constructor should be selected
+    // Crazy stuff
+    template <class T>
+    explicit Variant(const T& val, int = 0)
+    {
+        VariantConstruct(val, int(0));
+    }
+
+    // Canonic assignment operator
+    Variant& operator=(const Variant& rhs)
+    {
+        Private::SafeAssign(*this, rhs);
+        return *this;
+    }
+    
+private:
+    // Assignment operator from one of the allowed types
+    // This is necessary because the constructor is explicit
+    template <class T> 
+    void VariantAssign(const T& rhs, double)
+    {
+        Private::SafeAssign(*this, rhs);
+    }
+    
+    // Assignment from another Variant instantiation
+    template <class TList2, typename Align2>
+    void VariantAssign(const Variant<TList2, Align2>& rhs, int)
+    {
+        Private::SafeAssign(*this, rhs);
+    }
+    
+public:
+    // VC7 don't support partial ordering
+    template <class T> 
+    Variant& operator=(const T& rhs)
+    {
+        // Both VariantAssign are the same in this implementation
+        VariantAssign(rhs, int(0));
+        return *this;
+    }
+
+    // ~
+    ~Variant()
+    {
+        (vptr_->destroy_)(*this);
+    }
+
+    // Visitors definitions
+    // @@@ Possible improvement: add defintions of visitor who return
+    //     something else than void
+
+    typedef ::Loki::Visitor<TList, void> StrictVisitor;
+    typedef ::Loki::Visitor<typename MakeConst<TList>::Result, void>
+        ConstStrictVisitor;
+    typedef ::Loki::NonStrictVisitor<TList, void> NonStrictVisitor;
+    typedef ::Loki::NonStrictVisitor<typename MakeConst<TList>::Result, void> 
+        ConstNonStrictVisitor;
+
+private:
+    // VTable structure
+    // The essential component of the fake vtable idiom, VTable contains
+    // pointers to functions, pointers that will be filled up with addresses
+    // of functions in VTableImpl
+
+    struct VTable
+    {
+        const std::type_info& (*typeId_)();
+        void (*destroy_)(const Variant&);
+        void (*clone_)(const Variant&, Variant&);
+        void (*swap_)(void* lhs, void* rhs);
+        void (*accept_)(Variant&, StrictVisitor&);
+        void (*acceptConst_)(const Variant&, ConstStrictVisitor&);
+    };
+
+    // VTable concrete implementations
+    // VTableImpl<T> contains definitions for all of a VTable's pointer to
+    // functions.
+
+    // VC7 thinks that Variant inside VTableImpl is template
+    typedef Variant VariantType;
+
+    template <class T>
+    struct VTableImpl
+    {
+    private:
+        static const std::type_info& TypeId()
+        {
+            return typeid(T);
+        }
+        
+        static void Destroy(const VariantType& var)
+        {
+            const T& data = *reinterpret_cast<const T*>(&var.buffer_[0]);
+            (void)data.~T();
+        }
+        
+        static void Swap(void* lhs, void* rhs)
+        {
+            Private::SwapHelper(*static_cast<T*>(lhs), *static_cast<T*>(rhs));
+        }
+
+        static void Clone(const VariantType& src, VariantType& dest)
+        {
+            new(&dest.buffer_[0]) T(
+                *reinterpret_cast<const T*>(&src.buffer_[0]));
+            dest.vptr_ = src.vptr_;
+        }
+                
+        static void Accept(VariantType& var, StrictVisitor& visitor)
+        {
+            typedef typename StrictVisitor::ReturnType RType;
+            ::Loki::Visitor<T,RType> &v = visitor;
+
+            v.Visit(*reinterpret_cast<T*>(&var.buffer_[0]));
+        }        
+        
+        static void AcceptConst(const VariantType& var, ConstStrictVisitor& visitor)
+        {
+            typedef typename ConstStrictVisitor::ReturnType RType;
+            ::Loki::Visitor<const T,RType> &v = visitor;
+
+            v.Visit(*reinterpret_cast<const T*>(&var.buffer_[0]));
+        }        
+
+    public:
+        static const VTable *GetVPTR()
+        {
+            static const VTable vTbl_ =
+            {
+                &TypeId,
+                &Destroy,
+                &Clone,
+                &Swap,
+                &Accept,
+                &AcceptConst,
+            };
+
+            return &vTbl_;
+        }
+    };
+
+    template <class T> friend struct VTableImpl;
+
+private:   // should be private; some compilers prefer 'public' :o}
+
+    enum { neededSize = MaxSize<TList>::result };
+
+    VTable const * vptr_;
+    union
+    {
+        Align dummy_;
+        char buffer_[neededSize];
+    };
+    
+public:
+    void swap(Variant& rhs)
+    {
+        if (this->TypeId() == rhs.TypeId())
+        {
+            (vptr_->swap_)(this->buffer_, rhs.buffer_);
+        }
+        else
+        {
+            Private::SafeSwap(*this, rhs);
+        }
+    }
+    
+    const std::type_info& TypeId() const
+    {
+        return (vptr_->typeId_)();
+    }
+    
+    template <typename T> T* GetPtr()
+    {
+        return TypeId() == typeid(T) 
+            ? reinterpret_cast<T*>(&buffer_[0])
+            : 0;
+    }
+    
+    template <typename T> const T* GetPtr() const
+    {
+        return TypeId() == typeid(T) 
+            ? reinterpret_cast<const T*>(&buffer_[0])
+            : 0;
+    }
+    
+    template <typename T> T& Get()
+    {
+        T* p = GetPtr<T>();
+        if (!p) throw std::runtime_error("Variant::Get() Invalid variant type");
+        return *p;
+    }
+    
+    template <typename T> const T& Get() const
+    {
+        const T* p = GetPtr<T>();
+        if (!p) throw std::runtime_error("Variant::Get() const Invalid variant type");
+        return *p;
+    }
+
+    // Visitation primitives
+    // Although there are four visitor types, only two Accept functions are 
+    // necessary, because the non-strict visitors inherit the strict visitors
+
+    void Accept(StrictVisitor& visitor)
+    {
+        (vptr_->accept_)(*this, visitor);
+    }
+
+    void Accept(ConstStrictVisitor& visitor) const
+    {
+        (vptr_->acceptConst_)(*this, visitor);
+    }
+
+    // Extracts the value of a Variant converted to a specific type
+
+    template <class To> To ConvertTo() const
+    {
+        typename ConverterTo<Variant, To>::Visitor v;
+        ConstStrictVisitor& visitor = v;
+        this->Accept(visitor);
+        return v.GetDestination();
+    }
+
+    // Changes the type of a Variant in-place
+
+    template <class To> void ChangeType()
+    {
+        Variant(this->ConvertTo<To>()).swap(*this);
+    }
+
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// July 10, 2002: ported by Rani Sharoni to VC7 (RTM - 9466)
+////////////////////////////////////////////////////////////////////////////////
+
+#endif
+
Index: avida/current/source/third-party/Loki/MSVC/1300/Visitor.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/Visitor.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/Visitor.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,328 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: May 19, 2002
+
+#ifndef VISITOR_INC_
+#define VISITOR_INC_
+
+#include "Typelist.h"
+#include "HierarchyGenerators.h"
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitor
+// The base class of any Acyclic Visitor
+////////////////////////////////////////////////////////////////////////////////
+
+    class BaseVisitor
+    {
+    public:
+        virtual ~BaseVisitor() {}
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template Visitor
+// Forward decleration
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, typename R = void>
+    class Visitor;
+
+    namespace Private
+    {
+    // for some reason VC7 needs the base definition altough not in use
+    template <typename TListTag> 
+    struct VisitorHelper1
+    {
+        template <typename T, typename R>
+        struct In 
+        { 
+            typedef typename T::ERROR_THIS_INSTANCE_SELECTED Result; 
+        };
+    };
+    
+    template <typename TListTag> 
+    struct VisitorHelper2
+    {
+        template <typename T, typename R>
+        struct In 
+        { 
+            typedef typename T::ERROR_THIS_INSTANCE_SELECTED Result; 
+        };
+    };
+    
+    template <> 
+    struct VisitorHelper1<TL::Typelist_tag>
+    {
+        template <class TList, typename R>
+        struct In
+        {
+            typedef Visitor<typename TList::Head, R> Result;
+        };
+    };
+    
+    template <> 
+    struct VisitorHelper2<TL::Typelist_tag>
+    {
+        template <class TList, typename R>
+        struct In
+        {
+        private:
+            template<typename Tail>
+            struct In1
+            {
+                typedef Visitor<typename TList::Tail, R> Result;
+            };
+
+            template<>
+            struct In1<NullType>
+            {
+                struct Result {};
+            };
+
+        public:
+            typedef typename In1<typename TList::Tail>::Result Result;
+        };
+    };
+    
+    
+    template <> 
+    struct VisitorHelper1<TL::NoneList_tag>
+    {
+        template <class T, typename R>
+        struct In 
+        { 
+            struct Result
+            {
+                typedef R ReturnType;
+                virtual ReturnType Visit(T&) = 0;
+            };
+        };
+    };
+    
+    template <> 
+    struct VisitorHelper2<TL::NoneList_tag>
+    {
+        template <class T, typename R>
+        struct In { struct Result {}; };        
+    };
+    
+    } // namespace Private
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Visitor
+// The building block of Acyclic Visitor
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, typename R>
+    class Visitor
+        : public Private::VisitorHelper1
+          <
+            typename TL::is_Typelist<T>::type_tag
+          >
+          ::template In<T, R>::Result
+
+        , public Private::VisitorHelper2
+          <
+            typename TL::is_Typelist<T>::type_tag
+          >
+          ::template In<T, R>::Result
+    {  
+    public:
+        typedef R ReturnType;
+    };
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitorImpl
+// Implements non-strict visitation (you can implement only part of the Visit
+//     functions)
+////////////////////////////////////////////////////////////////////////////////
+    template <class TList, typename R = void> 
+    class BaseVisitorImpl;
+
+    namespace Private
+    {
+    // for some reason VC7 needs the base definition altough not in use
+    template<typename TListTag> 
+    struct BaseVisitorImplHelper
+    {
+        template <typename T, typename R>
+        struct In 
+        { 
+            typedef typename T::ERROR_THIS_INSTANCE_SELECTED Result; 
+        };
+    };
+    
+    template<> 
+    struct BaseVisitorImplHelper<TL::Typelist_tag>
+    {
+        template <typename TList, typename R>
+        struct In 
+        { 
+            typedef BaseVisitorImpl<TList, R> Result; 
+        };
+    };
+
+    template<> 
+    struct BaseVisitorImplHelper<TL::NullType_tag>
+    {
+        template <typename TList, typename R>
+        struct In 
+        { 
+            struct Result {}; 
+        };
+    };
+
+    } // namespace Private
+    
+    template <class TList, typename R>
+    class BaseVisitorImpl
+        : public Visitor<typename TList::Head, R>
+        
+        , public Private::BaseVisitorImplHelper
+          <
+            typename TL::is_Typelist<typename TList::Tail>::type_tag
+          >
+          ::template In<typename TList::Tail, R>::Result
+    {
+        ASSERT_TYPELIST(TList);
+
+    public:
+        // using BaseVisitorImpl<Tail, R>::Visit;
+
+        virtual R Visit(typename TList::Head&)
+        { return R(); }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template NonStrictVisitor
+// Implements non-strict visitation (you can implement only part of the Visit
+//     functions)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, class Base>
+    struct NonStrictVisitorUnit : public Base
+    {
+        typedef typename Base::ReturnType ReturnType;
+        ReturnType Visit(T&)
+        {
+            return ReturnType();
+        }
+    };
+
+    template <class TList, typename R = void> 
+    class NonStrictVisitor 
+        : public GenLinearHierarchy<
+            TList, 
+            NonStrictVisitorUnit, 
+            Visitor<TList, R> >
+    {
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitable
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename R, typename Visited>
+struct DefaultCatchAll
+{
+    static R OnUnknownVisitor(Visited&, BaseVisitor&)
+    { return R(); }
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitable
+////////////////////////////////////////////////////////////////////////////////
+
+    template 
+    <
+        typename R = void, 
+        template <typename, class> class CatchAll = DefaultCatchAll
+    >
+    class BaseVisitable
+    {
+    public:
+        typedef R ReturnType;
+        virtual ~BaseVisitable() {}
+        virtual ReturnType Accept(BaseVisitor&) = 0;
+        
+    protected: // give access only to the hierarchy
+        template <class T>
+        static ReturnType AcceptImpl(T& visited, BaseVisitor& guest)
+        {
+            // Apply the Acyclic Visitor
+            if (Visitor<T,R>* p = dynamic_cast<Visitor<T,R>*>(&guest))
+            {
+                return p->Visit(visited);
+            }
+            return CatchAll<R, T>::OnUnknownVisitor(visited, guest);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFINE_VISITABLE
+// Put it in every class that you want to make visitable (in addition to 
+//     deriving it from BaseVisitable<R>
+////////////////////////////////////////////////////////////////////////////////
+
+#define DEFINE_VISITABLE() \
+    virtual ReturnType Accept(BaseVisitor& guest) \
+    { return AcceptImpl(*this, guest); }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template CyclicVisitor
+// Put it in every class that you want to make visitable (in addition to 
+//     deriving it from BaseVisitable<R>
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, class TList>
+    class CyclicVisitor : public Visitor<TList, R>
+    {
+    public:
+        typedef R ReturnType;
+        // using Visitor<TList, R>::Visit;
+        
+        virtual ~CyclicVisitor() {}
+
+        template <class Visited>
+        ReturnType GenericVisit(Visited& host)
+        {
+            Visitor<Visited, ReturnType>& subObj = *this;
+            return subObj.Visit(host);
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFINE_CYCLIC_VISITABLE
+// Put it in every class that you want to make visitable by a cyclic visitor
+////////////////////////////////////////////////////////////////////////////////
+
+#define DEFINE_CYCLIC_VISITABLE(SomeVisitor) \
+    virtual SomeVisitor::ReturnType Accept(SomeVisitor& guest) \
+    { return guest.GenericVisit(*this); }
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// March 20: add default argument DefaultCatchAll to BaseVisitable
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // VISITOR_INC_
+
Index: avida/current/source/third-party/Loki/MSVC/1300/portby.txt
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/portby.txt:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/portby.txt	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,2 @@
+MSVC7
+Rani Sharoni
\ No newline at end of file
Index: avida/current/source/third-party/Loki/MSVC/1300/readme.txt
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/readme.txt:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/readme.txt	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,18 @@
+Last update: May 19, 2002
+
+Directions:
+
+To use Loki, simply extract the files from the archive, give your compiler access to their path, and include them appropriately in your code via #include.
+
+If you use the small object allocator directly or indirectly (through the Functor class) you must add SmallObj.cpp to your project/makefile.
+
+If you use Singletons with longevity you must add Singleton.cpp to your project/makefile.
+
+Compatibility:
+This is ported version of Loki to VC.NET (VC7 - 9466) it is only targeted for this compiler.
+To compile your sources with the original Loki you'll have to place it in a separate directory.
+
+More info:
+
+http://moderncppdesign.com
+http://www.geocities.com/rani_sharoni/LokiPort.html
Index: avida/current/source/third-party/Loki/MSVC/1300/static_check.h
diff -u /dev/null avida/current/source/third-party/Loki/MSVC/1300/static_check.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/MSVC/1300/static_check.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef STATIC_CHECK_INC_
+#define STATIC_CHECK_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// Helper structure for the STATIC_CHECK macro
+////////////////////////////////////////////////////////////////////////////////
+
+    template<bool CompileTimeAssertion>
+    struct CompileTimeError;
+
+    template<> 
+    struct CompileTimeError<true> 
+    {
+        typedef void type;
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// macro STATIC_CHECK
+// Invocation: STATIC_CHECK(expr, id)
+// where:
+// expr is a compile-time integral or pointer expression
+// id is a C++ identifier that does not need to be defined
+// If expr is zero, id will appear in a compile-time error message.
+////////////////////////////////////////////////////////////////////////////////
+
+#define STATIC_CHECK(expr, msg) \
+typedef char ERROR_##msg[1][(expr)]
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// March 20, 2001: add extra parens to STATIC_CHECK - it looked like a fun 
+//     definition
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// July 09, 2002: improved for favor of VC diagnostic and usage 
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // STATIC_CHECK_INC_
Index: avida/current/source/third-party/Loki/Reference/AbstractFactory.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/AbstractFactory.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/AbstractFactory.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,164 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef ABSTRACTFACTORY_INC_
+#define ABSTRACTFACTORY_INC_
+
+#include "Typelist.h"
+#include "TypeManip.h"
+#include "HierarchyGenerators.h"
+
+#include <cassert>
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AbstractFactoryUnit
+// The building block of an Abstract Factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class AbstractFactoryUnit
+    {
+    public:
+        virtual T* DoCreate(Type2Type<T>) = 0;
+        virtual ~AbstractFactoryUnit() {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AbstractFactory
+// Defines an Abstract Factory interface starting from a typelist
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class TList,
+        template <class> class Unit = AbstractFactoryUnit
+    >
+    class AbstractFactory : public GenScatterHierarchy<TList, Unit>
+    {
+    public:
+        typedef TList ProductList;
+        
+        template <class T> T* Create()
+        {
+            Unit<T>& unit = *this;
+            return unit.DoCreate(Type2Type<T>());
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template OpNewFactoryUnit
+// Creates an object by invoking the new operator
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ConcreteProduct, class Base>
+    class OpNewFactoryUnit : public Base
+    {
+        typedef typename Base::ProductList BaseProductList;
+    
+    protected:
+        typedef typename BaseProductList::Tail ProductList;
+    
+    public:
+        typedef typename BaseProductList::Head AbstractProduct;
+        ConcreteProduct* DoCreate(Type2Type<AbstractProduct>)
+        {
+            return new ConcreteProduct;
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template PrototypeFactoryUnit
+// Creates an object by cloning a prototype
+// There is a difference between the implementation herein and the one described
+//     in the book: GetPrototype and SetPrototype use the helper friend 
+//     functions DoGetPrototype and DoSetPrototype. The friend functions avoid
+//     name hiding issues. Plus, GetPrototype takes a reference to pointer
+//     instead of returning the pointer by value.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ConcreteProduct, class Base>
+    class PrototypeFactoryUnit : public Base
+    {
+        typedef typename Base::ProductList BaseProductList;
+    
+    protected:
+        typedef typename BaseProductList::Tail ProductList;
+
+    public:
+        typedef typename BaseProductList::Head AbstractProduct;
+
+        PrototypeFactoryUnit(AbstractProduct* p = 0)
+            : pPrototype_(p)
+        {}
+        
+        friend void DoGetPrototype(const PrototypeFactoryUnit& me,
+            AbstractProduct*& pPrototype)
+        { pPrototype = me.pPrototype_; }
+        
+        friend void DoSetPrototype(PrototypeFactoryUnit& me, 
+            AbstractProduct* pObj)
+        { me.pPrototype_ = pObj; }
+        
+        template <class U>
+        void GetPrototype(AbstractProduct*& p)
+        { return DoGetPrototype(*this, p); }
+        
+        template <class U>
+        void SetPrototype(U* pObj)
+        { DoSetPrototype(*this, pObj); }
+        
+        AbstractProduct* DoCreate(Type2Type<AbstractProduct>)
+        {
+            assert(pPrototype_);
+            return pPrototype_->Clone();
+        }
+        
+    private:
+        AbstractProduct* pPrototype_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ConcreteFactory
+// Implements an AbstractFactory interface
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class AbstractFact,
+        template <class, class> class Creator = OpNewFactoryUnit,
+        class TList = typename AbstractFact::ProductList
+    >
+    class ConcreteFactory
+        : public GenLinearHierarchy<
+            typename TL::Reverse<TList>::Result, Creator, AbstractFact>
+    {
+    public:
+        typedef typename AbstractFact::ProductList ProductList;
+        typedef TList ConcreteProductList;
+    };
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // ABSTRACTFACTORY_INC_
Index: avida/current/source/third-party/Loki/Reference/AssocVector.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/AssocVector.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/AssocVector.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,335 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef ASSOCVECTOR_INC_
+#define ASSOCVECTOR_INC_
+
+#include <algorithm>
+#include <functional>
+#include <vector>
+#include <utility>
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template AssocVectorCompare
+// Used by AssocVector
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class Value, class C>
+        class AssocVectorCompare : public C
+        {
+            typedef std::pair<typename C::first_argument_type, Value>
+                Data;
+            typedef typename C::first_argument_type first_argument_type;
+
+        public:
+            AssocVectorCompare()
+            {}
+            
+            AssocVectorCompare(const C& src) : C(src)
+            {}
+            
+            bool operator()(const first_argument_type& lhs, 
+                const first_argument_type& rhs) const
+            { return C::operator()(lhs, rhs); }
+            
+            bool operator()(const Data& lhs, const Data& rhs) const
+            { return operator()(lhs.first, rhs.first); }
+            
+            bool operator()(const Data& lhs, 
+                const first_argument_type& rhs) const
+            { return operator()(lhs.first, rhs); }
+            
+            bool operator()(const first_argument_type& lhs,
+                const Data& rhs) const
+            { return operator()(lhs, rhs.first); }
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AssocVector
+// An associative vector built as a syntactic drop-in replacement for std::map
+// BEWARE: AssocVector doesn't respect all map's guarantees, the most important
+//     being:
+// * iterators are invalidated by insert and erase operations
+// * the complexity of insert/erase is O(N) not O(log N)
+// * value_type is std::pair<K, V> not std::pair<const K, V>
+// * iterators are random
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class K,
+        class V,
+        class C = std::less<K>,
+        class A = std::allocator< std::pair<K, V> >
+    >
+    class AssocVector 
+        : private std::vector< std::pair<K, V>, A >
+        , private Private::AssocVectorCompare<V, C>
+    {
+        typedef std::vector<std::pair<K, V>, A> Base;
+        typedef Private::AssocVectorCompare<V, C> MyCompare;
+
+    public:
+        typedef K key_type;
+        typedef V mapped_type;
+        typedef typename Base::value_type value_type;
+
+        typedef C key_compare;
+        typedef A allocator_type;
+        typedef typename A::reference reference;
+        typedef typename A::const_reference const_reference;
+        typedef typename Base::iterator iterator;
+        typedef typename Base::const_iterator const_iterator;
+        typedef typename Base::size_type size_type;
+        typedef typename Base::difference_type difference_type;
+        typedef typename A::pointer pointer;
+        typedef typename A::const_pointer const_pointer;
+        typedef typename Base::reverse_iterator reverse_iterator;
+        typedef typename Base::const_reverse_iterator const_reverse_iterator;
+
+        class value_compare
+            : public std::binary_function<value_type, value_type, bool>
+            , private key_compare
+        {
+            friend class AssocVector;
+        
+        protected:
+            value_compare(key_compare pred) : key_compare(pred)
+            {}
+
+        public:
+            bool operator()(const value_type& lhs, const value_type& rhs) const
+            { return key_compare::operator()(lhs.first, rhs.first); }
+        };
+        
+        // 23.3.1.1 construct/copy/destroy
+
+        explicit AssocVector(const key_compare& comp = key_compare(), 
+            const A& alloc = A())
+        : Base(alloc), MyCompare(comp)
+        {}
+        
+        template <class InputIterator>
+        AssocVector(InputIterator first, InputIterator last, 
+            const key_compare& comp = key_compare(), 
+            const A& alloc = A())
+        : Base(first, last, alloc), MyCompare(comp)
+        {
+            MyCompare& me = *this;
+            std::sort(begin(), end(), me);
+        }
+        
+        AssocVector& operator=(const AssocVector& rhs)
+        { 
+            AssocVector(rhs).swap(*this); 
+            return *this;
+        }
+
+        // iterators:
+        // The following are here because MWCW gets 'using' wrong
+        iterator begin() { return Base::begin(); }
+        const_iterator begin() const { return Base::begin(); }
+        iterator end() { return Base::end(); }
+        const_iterator end() const { return Base::end(); }
+        reverse_iterator rbegin() { return Base::rbegin(); }
+        const_reverse_iterator rbegin() const { return Base::rbegin(); }
+        reverse_iterator rend() { return Base::rend(); }
+        const_reverse_iterator rend() const { return Base::rend(); }
+        
+        // capacity:
+        bool empty() const { return Base::empty(); }
+        size_type size() const { return Base::size(); }
+        size_type max_size() { return Base::max_size(); }
+
+        // 23.3.1.2 element access:
+        mapped_type& operator[](const key_type& key)
+        { return insert(value_type(key, mapped_type())).first->second; }
+
+        // modifiers:
+        std::pair<iterator, bool> insert(const value_type& val)
+        {
+            bool found(true);
+            iterator i(lower_bound(val.first));
+
+            if (i == end() || operator()(val.first, i->first))
+            {
+                i = Base::insert(i, val);
+                found = false;
+            }
+            return std::make_pair(i, !found);
+        }
+
+        iterator insert(iterator pos, const value_type& val)
+        {
+            if (pos != end() && operator()(*pos, val) && 
+                (pos == end() - 1 ||
+                    !operator()(val, pos[1]) &&
+                        operator()(pos[1], val)))
+            {
+                return Base::insert(pos, val);
+            }
+            return insert(val).first;
+        }
+       
+        template <class InputIterator>
+        void insert(InputIterator first, InputIterator last)
+        { for (; first != last; ++first) insert(*first); }
+        
+        void erase(iterator pos)
+        { Base::erase(pos); }
+
+        size_type erase(const key_type& k)
+        {
+            iterator i(find(k));
+            if (i == end()) return 0;
+            erase(i);
+            return 1;
+        }
+
+        void erase(iterator first, iterator last)
+        { Base::erase(first, last); }
+
+        void swap(AssocVector& other)
+        {
+            using std::swap;
+            Base::swap(other);
+            MyCompare& me = *this;
+            MyCompare& rhs = other;
+            swap(me, rhs);
+        }
+        
+        void clear()
+        { Base::clear(); }
+
+        // observers:
+        key_compare key_comp() const
+        { return *this; }
+
+        value_compare value_comp() const
+        {
+            const key_compare& comp = *this;
+            return value_compare(comp);
+        }
+
+        // 23.3.1.3 map operations:
+        iterator find(const key_type& k)
+        {
+            iterator i(lower_bound(k));
+            if (i != end() && operator()(k, i->first))
+            {
+                i = end();
+            }
+            return i;
+        }
+
+        const_iterator find(const key_type& k) const
+        {       
+            const_iterator i(lower_bound(k));
+            if (i != end() && operator()(k, i->first))
+            {
+                i = end();
+            }
+            return i;
+        }
+
+        size_type count(const key_type& k) const
+        { return find(k) != end(); }
+
+        iterator lower_bound(const key_type& k)
+        {
+            MyCompare& me = *this;
+            return std::lower_bound(begin(), end(), k, me);
+        }
+
+        const_iterator lower_bound(const key_type& k) const
+        {
+            const MyCompare& me = *this;
+            return std::lower_bound(begin(), end(), k, me);
+        }
+
+        iterator upper_bound(const key_type& k)
+        {
+            MyCompare& me = *this;
+            return std::upper_bound(begin(), end(), k, me);
+        }
+
+        const_iterator upper_bound(const key_type& k) const
+        {
+            const MyCompare& me = *this;
+            return std::upper_bound(begin(), end(), k, me);
+        }
+
+        std::pair<iterator, iterator> equal_range(const key_type& k)
+        {
+            MyCompare& me = *this;
+            return std::equal_range(begin(), end(), k, me);
+        }
+
+        std::pair<const_iterator, const_iterator> equal_range(
+            const key_type& k) const
+        {
+            const MyCompare& me = *this;
+            return std::equal_range(begin(), end(), k, me);
+        }
+        
+        friend bool operator==(const AssocVector& lhs, const AssocVector& rhs)
+        {
+            const Base& me = lhs;
+            return me == rhs;
+        } 
+
+        bool operator<(const AssocVector& rhs) const
+        {
+            const Base& me = *this;
+            const Base& yo = rhs;
+            return me < yo;
+        } 
+
+        friend bool operator!=(const AssocVector& lhs, const AssocVector& rhs)
+        { return !(lhs == rhs); } 
+
+        friend bool operator>(const AssocVector& lhs, const AssocVector& rhs)
+        { return rhs < lhs; }
+
+        friend bool operator>=(const AssocVector& lhs, const AssocVector& rhs)
+        { return !(lhs < rhs); } 
+
+        friend bool operator<=(const AssocVector& lhs, const AssocVector& rhs)
+        { return !(rhs < lhs); }
+    };
+
+    // specialized algorithms:
+    template <class K, class V, class C, class A>
+    void swap(AssocVector<K, V, C, A>& lhs, AssocVector<K, V, C, A>& rhs)
+    { lhs.swap(rhs); }
+    
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// May 20, 2001: change operator= - credit due to Cristoph Koegl
+// June 11, 2001: remove paren in equal_range - credit due to Cristoph Koegl
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// January 22, 2002: fixed operator= - credit due to Tom Hyer
+// June 25, 2002: fixed template insert() - credit due to Robert Minsk
+// June 27, 2002: fixed member swap() - credit due to David Brookman
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // ASSOCVECTOR_INC_
Index: avida/current/source/third-party/Loki/Reference/EmptyType.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/EmptyType.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/EmptyType.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef EMPTYTYPE_INC_
+#define EMPTYTYPE_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class EmptyType
+// Used as a class type that doesn't hold anything
+// Useful as a strawman class
+////////////////////////////////////////////////////////////////////////////////
+
+    class EmptyType {};
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // EMPTYTYPE_INC_
Index: avida/current/source/third-party/Loki/Reference/Factory.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/Factory.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/Factory.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,145 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef FACTORY_INC_
+#define FACTORY_INC_
+
+#include "TypeInfo.h"
+#include "AssocVector.h"
+#include <exception>
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DefaultFactoryError
+// Manages the "Unknown Type" error in an object factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename IdentifierType, class AbstractProduct>
+    struct DefaultFactoryError
+    {
+        struct Exception : public std::exception
+        {
+            const char* what() const throw() { return "Unknown Type"; }
+        };
+        
+        static AbstractProduct* OnUnknownType(IdentifierType)
+        {
+            throw Exception();
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Factory
+// Implements a generic object factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class AbstractProduct, 
+        typename IdentifierType,
+        typename ProductCreator = AbstractProduct* (*)(),
+        template<typename, class>
+            class FactoryErrorPolicy = DefaultFactoryError
+    >
+    class Factory 
+        : public FactoryErrorPolicy<IdentifierType, AbstractProduct>
+    {
+    public:
+        bool Register(const IdentifierType& id, ProductCreator creator)
+        {
+            return associations_.insert(
+                IdToProductMap::value_type(id, creator)).second;
+        }
+        
+        bool Unregister(const IdentifierType& id)
+        {
+            return associations_.erase(id) == 1;
+        }
+        
+        AbstractProduct* CreateObject(const IdentifierType& id)
+        {
+            typename IdToProductMap::iterator i = associations_.find(id);
+            if (i != associations_.end())
+            {
+                return (i->second)();
+            }
+            return OnUnknownType(id);
+        }
+        
+    private:
+        typedef AssocVector<IdentifierType, ProductCreator> IdToProductMap;
+        IdToProductMap associations_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template CloneFactory
+// Implements a generic cloning factory
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class AbstractProduct, 
+        class ProductCreator = 
+            AbstractProduct* (*)(const AbstractProduct*),
+        template<typename, class>
+            class FactoryErrorPolicy = DefaultFactoryError
+    >
+    class CloneFactory
+        : public FactoryErrorPolicy<TypeInfo, AbstractProduct>
+    {
+    public:
+        bool Register(const TypeInfo& ti, ProductCreator creator)
+        {
+            return associations_.insert(
+                IdToProductMap::value_type(ti, creator)).second;
+        }
+        
+        bool Unregister(const TypeInfo& id)
+        {
+            return associations_.erase(id) == 1;
+        }
+        
+        AbstractProduct* CreateObject(const AbstractProduct* model)
+        {
+            if (model == 0) return 0;
+            
+            typename IdToProductMap::iterator i = 
+                associations_.find(typeid(*model));
+            if (i != associations_.end())
+            {
+                return (i->second)(model);
+            }
+            return OnUnknownType(typeid(*model));
+        }
+        
+    private:
+        typedef AssocVector<TypeInfo, ProductCreator> IdToProductMap;
+        IdToProductMap associations_;
+    };
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// May 08, 2002: replaced const_iterator with iterator so that self-modifying
+//      ProductCreators are supported. Also, added a throw() spec to what().
+//      Credit due to Jason Fischl.
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // FACTORY_INC_
Index: avida/current/source/third-party/Loki/Reference/Functor.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/Functor.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/Functor.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,1144 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef FUNCTOR_INC_
+#define FUNCTOR_INC_
+
+#include "Typelist.h"
+#include "EmptyType.h"
+#include "SmallObj.h"
+#include "TypeTraits.h"
+#include <typeinfo>
+#include <memory>
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl (internal)
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <typename R, template <class> class ThreadingModel>
+        struct FunctorImplBase : public SmallObject<ThreadingModel>
+        {
+            typedef R ResultType;
+            
+            typedef EmptyType Parm1;
+            typedef EmptyType Parm2;
+            typedef EmptyType Parm3;
+            typedef EmptyType Parm4;
+            typedef EmptyType Parm5;
+            typedef EmptyType Parm6;
+            typedef EmptyType Parm7;
+            typedef EmptyType Parm8;
+            typedef EmptyType Parm9;
+            typedef EmptyType Parm10;
+            typedef EmptyType Parm11;
+            typedef EmptyType Parm12;
+            typedef EmptyType Parm13;
+            typedef EmptyType Parm14;
+            typedef EmptyType Parm15;
+
+            virtual FunctorImplBase* DoClone() const = 0;
+            template <class U>
+            static U* Clone(U* pObj)
+            {
+                if (!pObj) return 0;
+                U* pClone = static_cast<U*>(pObj->DoClone());
+                assert(typeid(*pClone) == typeid(*pObj));
+                return pClone;
+            }
+        };
+    }
+    
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFINE_CLONE_FUNCTORIMPL
+// Implements the DoClone function for a functor implementation
+////////////////////////////////////////////////////////////////////////////////
+
+#define DEFINE_CLONE_FUNCTORIMPL(Cls) \
+    virtual Cls* DoClone() const { return new Cls(*this); }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// The base class for a hierarchy of functors. The FunctorImpl class is not used
+//     directly; rather, the Functor class manages and forwards to a pointer to
+//     FunctorImpl
+// You may want to derive your own functors from FunctorImpl.
+// Specializations of FunctorImpl for up to 15 parameters follow
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, class TList, 
+        template <class> class ThreadingModel = DEFAULT_THREADING>
+    class FunctorImpl;
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 0 (zero) parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, template <class> class ThreadingModel>
+    class FunctorImpl<R, NullType, ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        virtual R operator()() = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 1 parameter
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_1(P1), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        virtual R operator()(Parm1) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 2 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, 
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_2(P1, P2), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        virtual R operator()(Parm1, Parm2) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 3 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_3(P1, P2, P3), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        virtual R operator()(Parm1, Parm2, Parm3) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 4 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_4(P1, P2, P3, P4), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 5 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_5(P1, P2, P3, P4, P5), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 6 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_6(P1, P2, P3, P4, P5, P6), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 7 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_7(P1, P2, P3, P4, P5, P6, P7), ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 8 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_8(P1, P2, P3, P4, P5, P6, P7, P8),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 9 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_9(P1, P2, P3, P4, P5, P6, P7, P8, P9),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 10 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R, TYPELIST_10(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 11 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10, typename P11,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R,
+            TYPELIST_11(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        typedef typename TypeTraits<P11>::ParameterType Parm11;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10, Parm11) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 12 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10, typename P11, typename P12,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R,
+            TYPELIST_12(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        typedef typename TypeTraits<P11>::ParameterType Parm11;
+        typedef typename TypeTraits<P12>::ParameterType Parm12;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10, Parm11, Parm12) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 13 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10, typename P11, typename P12, typename P13,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R,
+            TYPELIST_13(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        typedef typename TypeTraits<P11>::ParameterType Parm11;
+        typedef typename TypeTraits<P12>::ParameterType Parm12;
+        typedef typename TypeTraits<P13>::ParameterType Parm13;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10, Parm11, Parm12, Parm13) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 14 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10, typename P11, typename P12, typename P13, typename P14,
+        template <class> class ThreadingModel>
+    class FunctorImpl<R,
+            TYPELIST_14(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13,
+                P14),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        typedef typename TypeTraits<P11>::ParameterType Parm11;
+        typedef typename TypeTraits<P12>::ParameterType Parm12;
+        typedef typename TypeTraits<P13>::ParameterType Parm13;
+        typedef typename TypeTraits<P14>::ParameterType Parm14;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10, Parm11, Parm12, Parm13, Parm14) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorImpl
+// Specialization for 15 parameters
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, typename P1, typename P2, typename P3, typename P4,
+        typename P5, typename P6, typename P7, typename P8, typename P9,
+        typename P10, typename P11, typename P12, typename P13, typename P14,
+        typename P15, template <class> class ThreadingModel>
+    class FunctorImpl<R,
+            TYPELIST_15(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13,
+                P14, P15),
+            ThreadingModel>
+        : public Private::FunctorImplBase<R, ThreadingModel>
+    {
+    public:
+        typedef R ResultType;
+        typedef typename TypeTraits<P1>::ParameterType Parm1;
+        typedef typename TypeTraits<P2>::ParameterType Parm2;
+        typedef typename TypeTraits<P3>::ParameterType Parm3;
+        typedef typename TypeTraits<P4>::ParameterType Parm4;
+        typedef typename TypeTraits<P5>::ParameterType Parm5;
+        typedef typename TypeTraits<P6>::ParameterType Parm6;
+        typedef typename TypeTraits<P7>::ParameterType Parm7;
+        typedef typename TypeTraits<P8>::ParameterType Parm8;
+        typedef typename TypeTraits<P9>::ParameterType Parm9;
+        typedef typename TypeTraits<P10>::ParameterType Parm10;
+        typedef typename TypeTraits<P11>::ParameterType Parm11;
+        typedef typename TypeTraits<P12>::ParameterType Parm12;
+        typedef typename TypeTraits<P13>::ParameterType Parm13;
+        typedef typename TypeTraits<P14>::ParameterType Parm14;
+        typedef typename TypeTraits<P15>::ParameterType Parm15;
+        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
+            Parm7, Parm8, Parm9, Parm10, Parm11, Parm12, Parm13, Parm14,
+            Parm15) = 0;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorHandler
+// Wraps functors and pointers to functions
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ParentFunctor, typename Fun>
+    class FunctorHandler
+        : public ParentFunctor::Impl
+    {
+        typedef typename ParentFunctor::Impl Base;
+
+    public:
+        typedef typename Base::ResultType ResultType;
+        typedef typename Base::Parm1 Parm1;
+        typedef typename Base::Parm2 Parm2;
+        typedef typename Base::Parm3 Parm3;
+        typedef typename Base::Parm4 Parm4;
+        typedef typename Base::Parm5 Parm5;
+        typedef typename Base::Parm6 Parm6;
+        typedef typename Base::Parm7 Parm7;
+        typedef typename Base::Parm8 Parm8;
+        typedef typename Base::Parm9 Parm9;
+        typedef typename Base::Parm10 Parm10;
+        typedef typename Base::Parm11 Parm11;
+        typedef typename Base::Parm12 Parm12;
+        typedef typename Base::Parm13 Parm13;
+        typedef typename Base::Parm14 Parm14;
+        typedef typename Base::Parm15 Parm15;
+        
+        FunctorHandler(const Fun& fun) : f_(fun) {}
+        
+        DEFINE_CLONE_FUNCTORIMPL(FunctorHandler)
+
+        // operator() implementations for up to 15 arguments
+                
+        ResultType operator()()
+        { return f_(); }
+
+        ResultType operator()(Parm1 p1)
+        { return f_(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return f_(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return f_(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return f_(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return f_(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return f_(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return f_(p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        { return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return f_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                p14, p15);
+        }
+        
+    private:
+        Fun f_;
+    };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorHandler
+// Wraps pointers to member functions
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class ParentFunctor, typename PointerToObj,
+        typename PointerToMemFn>
+    class MemFunHandler : public ParentFunctor::Impl
+    {
+        typedef typename ParentFunctor::Impl Base;
+
+    public:
+        typedef typename Base::ResultType ResultType;
+        typedef typename Base::Parm1 Parm1;
+        typedef typename Base::Parm2 Parm2;
+        typedef typename Base::Parm3 Parm3;
+        typedef typename Base::Parm4 Parm4;
+        typedef typename Base::Parm5 Parm5;
+        typedef typename Base::Parm6 Parm6;
+        typedef typename Base::Parm7 Parm7;
+        typedef typename Base::Parm8 Parm8;
+        typedef typename Base::Parm9 Parm9;
+        typedef typename Base::Parm10 Parm10;
+        typedef typename Base::Parm11 Parm11;
+        typedef typename Base::Parm12 Parm12;
+        typedef typename Base::Parm13 Parm13;
+        typedef typename Base::Parm14 Parm14;
+        typedef typename Base::Parm15 Parm15;
+
+        MemFunHandler(const PointerToObj& pObj, PointerToMemFn pMemFn) 
+        : pObj_(pObj), pMemFn_(pMemFn)
+        {}
+        
+        DEFINE_CLONE_FUNCTORIMPL(MemFunHandler)
+        
+        ResultType operator()()
+        { return ((*pObj_).*pMemFn_)(); }
+
+        ResultType operator()(Parm1 p1)
+        { return ((*pObj_).*pMemFn_)(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return ((*pObj_).*pMemFn_)(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12, p13);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12, p13, p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return ((*pObj_).*pMemFn_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, 
+                p11, p12, p13, p14, p15);
+        }
+        
+    private:
+        PointerToObj pObj_;
+        PointerToMemFn pMemFn_;
+    };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template Functor
+// A generalized functor implementation with value semantics
+////////////////////////////////////////////////////////////////////////////////
+       
+    template <typename R, class TList = NullType,
+        template<class> class ThreadingModel = DEFAULT_THREADING>
+    class Functor
+    {
+    public:
+        // Handy type definitions for the body type
+        typedef FunctorImpl<R, TList, ThreadingModel> Impl;
+        typedef R ResultType;
+        typedef TList ParmList;
+        typedef typename Impl::Parm1 Parm1;
+        typedef typename Impl::Parm2 Parm2;
+        typedef typename Impl::Parm3 Parm3;
+        typedef typename Impl::Parm4 Parm4;
+        typedef typename Impl::Parm5 Parm5;
+        typedef typename Impl::Parm6 Parm6;
+        typedef typename Impl::Parm7 Parm7;
+        typedef typename Impl::Parm8 Parm8;
+        typedef typename Impl::Parm9 Parm9;
+        typedef typename Impl::Parm10 Parm10;
+        typedef typename Impl::Parm11 Parm11;
+        typedef typename Impl::Parm12 Parm12;
+        typedef typename Impl::Parm13 Parm13;
+        typedef typename Impl::Parm14 Parm14;
+        typedef typename Impl::Parm15 Parm15;
+
+        // Member functions
+
+        Functor() : spImpl_(0)
+        {}
+        
+        Functor(const Functor& rhs) : spImpl_(Impl::Clone(rhs.spImpl_.get()))
+        {}
+        
+        Functor(std::auto_ptr<Impl> spImpl) : spImpl_(spImpl)
+        {}
+        
+        template <typename Fun>
+        Functor(Fun fun)
+        : spImpl_(new FunctorHandler<Functor, Fun>(fun))
+        {}
+
+        template <class PtrObj, typename MemFn>
+        Functor(const PtrObj& p, MemFn memFn)
+        : spImpl_(new MemFunHandler<Functor, PtrObj, MemFn>(p, memFn))
+        {}
+
+        Functor& operator=(const Functor& rhs)
+        {
+            Functor copy(rhs);
+            // swap auto_ptrs by hand
+            Impl* p = spImpl_.release();
+            spImpl_.reset(copy.spImpl_.release());
+            copy.spImpl_.reset(p);
+            return *this;
+        }
+        
+        ResultType operator()()
+        { return (*spImpl_)(); }
+
+        ResultType operator()(Parm1 p1)
+        { return (*spImpl_)(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return (*spImpl_)(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return (*spImpl_)(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return (*spImpl_)(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return (*spImpl_)(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        { return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, 
+                p12);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11,
+            p12, p13);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, 
+                p12, p13, p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return (*spImpl_)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, 
+                p12, p13, p14, p15);
+        }
+
+    private:
+        std::auto_ptr<Impl> spImpl_;
+    };
+    
+    namespace Private
+    {
+        template <class Fctor> struct BinderFirstTraits;
+
+        template <typename R, class TList, template <class> class ThreadingModel>
+        struct BinderFirstTraits< Functor<R, TList, ThreadingModel> >
+        {
+            typedef typename TL::Erase<TList, 
+                    typename TL::TypeAt<TList, 0>::Result>::Result
+                ParmList;
+            typedef Functor<R, ParmList, ThreadingModel> BoundFunctorType;
+            typedef typename BoundFunctorType::Impl Impl;
+        };        
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BinderFirst
+// Binds the first parameter of a Functor object to a specific value
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class OriginalFunctor>
+    class BinderFirst 
+        : public Private::BinderFirstTraits<OriginalFunctor>::Impl
+    {
+        typedef typename Private::BinderFirstTraits<OriginalFunctor>::Impl Base;
+        typedef typename OriginalFunctor::ResultType ResultType;
+
+        typedef typename OriginalFunctor::Parm1 BoundType;
+
+        typedef typename OriginalFunctor::Parm2 Parm1;
+        typedef typename OriginalFunctor::Parm3 Parm2;
+        typedef typename OriginalFunctor::Parm4 Parm3;
+        typedef typename OriginalFunctor::Parm5 Parm4;
+        typedef typename OriginalFunctor::Parm6 Parm5;
+        typedef typename OriginalFunctor::Parm7 Parm6;
+        typedef typename OriginalFunctor::Parm8 Parm7;
+        typedef typename OriginalFunctor::Parm9 Parm8;
+        typedef typename OriginalFunctor::Parm10 Parm9;
+        typedef typename OriginalFunctor::Parm11 Parm10;
+        typedef typename OriginalFunctor::Parm12 Parm11;
+        typedef typename OriginalFunctor::Parm13 Parm12;
+        typedef typename OriginalFunctor::Parm14 Parm13;
+        typedef typename OriginalFunctor::Parm15 Parm14;
+        typedef EmptyType Parm15;
+
+    public:
+        BinderFirst(const OriginalFunctor& fun, BoundType bound)
+        : f_(fun), b_(bound)
+        {}
+        
+        DEFINE_CLONE_FUNCTORIMPL(BinderFirst)
+        
+        // operator() implementations for up to 15 arguments
+                
+        ResultType operator()()
+        { return f_(b_); }
+
+        ResultType operator()(Parm1 p1)
+        { return f_(b_, p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return f_(b_, p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return f_(b_, p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return f_(b_, p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return f_(b_, p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return f_(b_, p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        { return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return f_(b_, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                p14);
+        }
+        
+    private:
+        OriginalFunctor f_;
+        BoundType b_;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// function template BindFirst
+// Binds the first parameter of a Functor object to a specific value
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class Fctor>
+    typename Private::BinderFirstTraits<Fctor>::BoundFunctorType
+    BindFirst(
+        const Fctor& fun,
+        typename Fctor::Parm1 bound)
+    {
+        typedef typename Private::BinderFirstTraits<Fctor>::BoundFunctorType
+            Outgoing;
+        
+        return Outgoing(std::auto_ptr<typename Outgoing::Impl>(
+            new BinderFirst<Fctor>(fun, bound)));
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Chainer
+// Chains two functor calls one after another
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename Fun1, typename Fun2>
+    class Chainer : public Fun2::Impl
+    {
+        typedef Fun2 Base;
+
+    public:
+        typedef typename Base::ResultType ResultType;
+        typedef typename Base::Parm1 Parm1;
+        typedef typename Base::Parm2 Parm2;
+        typedef typename Base::Parm3 Parm3;
+        typedef typename Base::Parm4 Parm4;
+        typedef typename Base::Parm5 Parm5;
+        typedef typename Base::Parm6 Parm6;
+        typedef typename Base::Parm7 Parm7;
+        typedef typename Base::Parm8 Parm8;
+        typedef typename Base::Parm9 Parm9;
+        typedef typename Base::Parm10 Parm10;
+        typedef typename Base::Parm11 Parm11;
+        typedef typename Base::Parm12 Parm12;
+        typedef typename Base::Parm13 Parm13;
+        typedef typename Base::Parm14 Parm14;
+        typedef typename Base::Parm15 Parm15;
+        
+        Chainer(const Fun1& fun1, const Fun2& fun2) : f1_(fun1), f2_(fun2) {}
+
+        DEFINE_CLONE_FUNCTORIMPL(Chainer)
+
+        // operator() implementations for up to 15 arguments
+
+        ResultType operator()()
+        { return f1_(), f2_(); }
+
+        ResultType operator()(Parm1 p1)
+        { return f1_(p1), f2_(p1); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2)
+        { return f1_(p1, p2), f2_(p1, p2); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+        { return f1_(p1, p2, p3), f2_(p1, p2, p3); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+        { return f1_(p1, p2, p3, p4), f2_(p1, p2, p3, p4); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+        { return f1_(p1, p2, p3, p4, p5), f2_(p1, p2, p3, p4, p5); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6)
+        { return f1_(p1, p2, p3, p4, p5, p6), f2_(p1, p2, p3, p4, p5, p6); }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7),
+                f2_(p1, p2, p3, p4, p5, p6, p7);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                    p14),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                   p14);
+        }
+        
+        ResultType operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
+            Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11,
+            Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+        {
+            return f1_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                    p14, p15),
+                f2_(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, 
+                    p14, p15);
+        }
+        
+    private:
+        Fun1 f1_;
+        Fun2 f2_;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// function template Chain
+// Chains two functor calls one after another
+////////////////////////////////////////////////////////////////////////////////
+
+
+    template <class Fun1, class Fun2>
+    Fun2 Chain(
+        const Fun1& fun1,
+        const Fun2& fun2)
+    {
+        return Fun2(std::auto_ptr<typename Fun2::Impl>(
+            new Chainer<Fun1, Fun2>(fun1, fun2)));
+    }
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif  // FUNCTOR_INC_
Index: avida/current/source/third-party/Loki/Reference/HierarchyGenerators.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/HierarchyGenerators.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/HierarchyGenerators.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,255 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: March 05, 2001
+
+#ifndef HIERARCHYGENERATORS_INC_
+#define HIERARCHYGENERATORS_INC_
+
+#include "Typelist.h"
+#include "TypeTraits.h"
+#include "EmptyType.h"
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template GenScatterHierarchy
+// Generates a scattered hierarchy starting from a typelist and a template
+// Invocation (TList is a typelist, Model is a template of one arg):
+// GenScatterHierarchy<TList, Model>
+// The generated class inherits all classes generated by instantiating the 
+// template 'Model' with the types contained in TList 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class TList, template <class> class Unit>
+    class GenScatterHierarchy;
+     
+    template <class T1, class T2, template <class> class Unit>
+    class GenScatterHierarchy<Typelist<T1, T2>, Unit>
+        : public GenScatterHierarchy<T1, Unit>
+        , public GenScatterHierarchy<T2, Unit>
+    {
+    public:
+        typedef Typelist<T1, T2> TList;
+        typedef GenScatterHierarchy<T1, Unit> LeftBase;
+        typedef GenScatterHierarchy<T2, Unit> RightBase;
+        template <typename T> struct Rebind
+        {
+            typedef Unit<T> Result;
+        };
+    };
+     
+    template <class AtomicType, template <class> class Unit>
+    class GenScatterHierarchy : public Unit<AtomicType>
+    {
+        typedef Unit<AtomicType> LeftBase;
+        template <typename T> struct Rebind
+        {
+            typedef Unit<T> Result;
+        };
+    };
+    
+    template <template <class> class Unit>
+    class GenScatterHierarchy<NullType, Unit>
+    {
+        template <typename T> struct Rebind
+        {
+            typedef Unit<T> Result;
+        };
+    };
+     
+////////////////////////////////////////////////////////////////////////////////
+// function template Field
+// Accesses a field in an object of a type generated with GenScatterHierarchy
+// Invocation (obj is an object of a type H generated with GenScatterHierarchy,
+//     T is a type in the typelist used to generate H):
+// Field<T>(obj)
+// returns a reference to Unit<T>, where Unit is the template used to generate H 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, class H>
+    typename H::template Rebind<T>::Result& Field(H& obj)
+    {
+        return obj;
+    }
+     
+    template <class T, class H>
+    const typename H::template Rebind<T>::Result& Field(const H& obj)
+    {
+        return obj;
+    }
+     
+////////////////////////////////////////////////////////////////////////////////
+// function template TupleUnit
+// The building block of tuples 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    struct TupleUnit
+    {
+        T value_;
+        operator T&() { return value_; }
+        operator const T&() const { return value_; }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Tuple
+// Implements a tuple class that holds a number of values and provides field 
+//     access to them via the Field function (below) 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class TList>
+    struct Tuple : public GenScatterHierarchy<TList, TupleUnit>
+    {
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// helper class template FieldHelper
+// See Field below
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class H, unsigned int i> struct FieldHelper;
+    
+    template <class H>
+    struct FieldHelper<H, 0>
+    {
+        typedef typename H::TList::Head ElementType;
+        typedef typename H::template Rebind<ElementType>::Result UnitType;
+        
+        enum
+        {
+            isTuple = Conversion<UnitType, TupleUnit<ElementType> >::sameType,
+            isConst = TypeTraits<H>::isConst
+        };
+
+        typedef const typename H::LeftBase ConstLeftBase;
+        
+        typedef typename Select<isConst, ConstLeftBase, 
+            typename H::LeftBase>::Result LeftBase;
+            
+        typedef typename Select<isTuple, ElementType, 
+            UnitType>::Result UnqualifiedResultType;
+
+        typedef typename Select<isConst, const UnqualifiedResultType,
+                		UnqualifiedResultType>::Result ResultType;
+            
+        static ResultType& Do(H& obj)
+        {
+            LeftBase& leftBase = obj;
+            return leftBase;
+        }
+    };
+
+    template <class H, unsigned int i>
+    struct FieldHelper
+    {
+        typedef typename TL::TypeAt<typename H::TList, i>::Result ElementType;
+        typedef typename H::template Rebind<ElementType>::Result UnitType;
+        
+        enum
+        {
+            isTuple = Conversion<UnitType, TupleUnit<ElementType> >::sameType,
+            isConst = TypeTraits<H>::isConst
+        };
+
+        typedef const typename H::RightBase ConstRightBase;
+        
+        typedef typename Select<isConst, ConstRightBase, 
+            typename H::RightBase>::Result RightBase;
+
+        typedef typename Select<isTuple, ElementType, 
+            UnitType>::Result UnqualifiedResultType;
+
+        typedef typename Select<isConst, const UnqualifiedResultType,
+                		UnqualifiedResultType>::Result ResultType;
+            
+        static ResultType& Do(H& obj)
+        {
+            RightBase& rightBase = obj;
+            return FieldHelper<RightBase, i - 1>::Do(rightBase);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// function template Field
+// Accesses a field in an object of a type generated with GenScatterHierarchy
+// Invocation (obj is an object of a type H generated with GenScatterHierarchy,
+//     i is the index of a type in the typelist used to generate H):
+// Field<i>(obj)
+// returns a reference to Unit<T>, where Unit is the template used to generate H
+//     and T is the i-th type in the typelist 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <int i, class H>
+    typename FieldHelper<H, i>::ResultType&
+    Field(H& obj)
+    {
+        return FieldHelper<H, i>::Do(obj);
+    }
+        
+//    template <int i, class H>
+//    const typename FieldHelper<H, i>::ResultType&
+//    Field(const H& obj)
+//    {
+//        return FieldHelper<H, i>::Do(obj);
+//    }
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template GenLinearHierarchy
+// Generates a linear hierarchy starting from a typelist and a template
+// Invocation (TList is a typelist, Model is a template of two args):
+// GenScatterHierarchy<TList, Model>
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class TList,
+        template <class AtomicType, class Base> class Unit,
+        class Root = EmptyType
+    >
+    class GenLinearHierarchy;
+    
+    template
+    <
+        class T1,
+        class T2,
+        template <class, class> class Unit,
+        class Root
+    >
+    class GenLinearHierarchy<Typelist<T1, T2>, Unit, Root>
+        : public Unit< T1, GenLinearHierarchy<T2, Unit, Root> >
+    {
+    };
+
+    template
+    <
+        class T,
+        template <class, class> class Unit,
+        class Root
+    >
+    class GenLinearHierarchy<Typelist<T, NullType>, Unit, Root>
+        : public Unit<T, Root>
+    {
+    };
+
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// September 16, 2002: Fixed dependent template, using "::template" syntax. T.S.
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // HIERARCHYGENERATORS_INC_
Index: avida/current/source/third-party/Loki/Reference/MultiMethods.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/MultiMethods.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/MultiMethods.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,423 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef MULTIMETHODS_INC_
+#define MULTIMETHODS_INC_
+
+#include "Typelist.h"
+#include "TypeInfo.h"
+#include "Functor.h"
+#include "AssocVector.h"
+
+////////////////////////////////////////////////////////////////////////////////
+// IMPORTANT NOTE:
+// The double dispatchers implemented below differ from the excerpts shown in
+// the book - they are simpler while respecting the same interface.
+////////////////////////////////////////////////////////////////////////////////
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template InvocationTraits (helper)
+// Helps implementing optional symmetry
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class SomeLhs, class SomeRhs, 
+			class Executor, typename ResultType>
+        struct InvocationTraits
+        {
+            static ResultType 
+	    DoDispatch(SomeLhs& lhs, SomeRhs& rhs, 
+			Executor& exec, Int2Type<false>)
+            {
+                return exec.Fire(lhs, rhs);
+            }
+            static ResultType 
+	    DoDispatch(SomeLhs& lhs, SomeRhs& rhs, 
+			Executor& exec, Int2Type<true>)
+            {
+                return exec.Fire(rhs, lhs);
+            }
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template StaticDispatcher
+// Implements an automatic static double dispatcher based on two typelists
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class Executor,
+        class BaseLhs, 
+        class TypesLhs,
+        bool symmetric = true,
+        class BaseRhs = BaseLhs,
+        class TypesRhs = TypesLhs,
+        typename ResultType = void
+    >
+    class StaticDispatcher
+    {
+        template <class SomeLhs>
+        static ResultType DispatchRhs(SomeLhs& lhs, BaseRhs& rhs,
+            Executor exec, NullType)
+        { return exec.OnError(lhs, rhs); }
+        
+        template <class TList, class SomeLhs>
+        static ResultType DispatchRhs(SomeLhs& lhs, BaseRhs& rhs,
+            Executor exec, TList)
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+            
+            if (Head* p2 = dynamic_cast<Head*>(&rhs))
+            {
+                Int2Type<(symmetric &&
+                          int(TL::IndexOf<TypesRhs, Head>::value) <
+                          int(TL::IndexOf<TypesLhs, SomeLhs>::value))> i2t;
+
+                typedef Private::InvocationTraits< 
+                        SomeLhs, Head, Executor, ResultType> CallTraits;
+                    
+                return CallTraits::DoDispatch(lhs, *p2, exec, i2t);
+            }
+            return DispatchRhs(lhs, rhs, exec, Tail());
+        }
+        
+        static ResultType DispatchLhs(BaseLhs& lhs, BaseRhs& rhs,
+            Executor exec, NullType)
+        { return exec.OnError(lhs, rhs); }
+        
+        template <class TList>
+        static ResultType DispatchLhs(BaseLhs& lhs, BaseRhs& rhs,
+            Executor exec, TList)
+        {
+            typedef typename TList::Head Head;
+            typedef typename TList::Tail Tail;
+            
+            if (Head* p1 = dynamic_cast<Head*>(&lhs))
+            {
+                return DispatchRhs(*p1, rhs, exec, TypesRhs());
+            }
+            return DispatchLhs(lhs, rhs, exec, Tail());
+        }
+
+    public:
+        static ResultType Go(BaseLhs& lhs, BaseRhs& rhs,
+            Executor exec)
+        { return DispatchLhs(lhs, rhs, exec, TypesLhs()); }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template BasicDispatcher
+// Implements a logarithmic double dispatcher for functors (or functions)
+// Doesn't offer automated casts or symmetry
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class BaseLhs,
+        class BaseRhs = BaseLhs,
+        typename ResultType = void,
+        typename CallbackType = ResultType (*)(BaseLhs&, BaseRhs&)
+    >
+    class BasicDispatcher
+    {
+        typedef std::pair<TypeInfo,TypeInfo> KeyType;
+        typedef CallbackType MappedType;
+        typedef AssocVector<KeyType, MappedType> MapType;
+        MapType callbackMap_;
+        
+        void DoAdd(TypeInfo lhs, TypeInfo rhs, CallbackType fun);
+        bool DoRemove(TypeInfo lhs, TypeInfo rhs);
+        
+    public:
+        template <class SomeLhs, class SomeRhs>
+        void Add(CallbackType fun)
+        {
+            DoAdd(typeid(SomeLhs), typeid(SomeRhs), fun);
+        }
+        
+        template <class SomeLhs, class SomeRhs>
+        bool Remove()
+        {
+            return DoRemove(typeid(SomeLhs), typeid(SomeRhs));
+        }
+        
+        ResultType Go(BaseLhs& lhs, BaseRhs& rhs);
+    };
+
+    // Non-inline to reduce compile time overhead...
+    template <class BaseLhs, class BaseRhs, 
+		typename ResultType, typename CallbackType>
+    void BasicDispatcher<BaseLhs,BaseRhs,ResultType,CallbackType>
+    	 ::DoAdd(TypeInfo lhs, TypeInfo rhs, CallbackType fun)
+    {
+        callbackMap_[KeyType(lhs, rhs)] = fun;
+    }
+        
+    template <class BaseLhs, class BaseRhs, 
+		typename ResultType, typename CallbackType>
+    bool BasicDispatcher<BaseLhs,BaseRhs,ResultType,CallbackType>
+         ::DoRemove(TypeInfo lhs, TypeInfo rhs)
+    {
+        return callbackMap_.erase(KeyType(lhs, rhs)) == 1;
+    }
+
+    template <class BaseLhs, class BaseRhs, 
+		typename ResultType, typename CallbackType>
+    ResultType BasicDispatcher<BaseLhs,BaseRhs,ResultType,CallbackType>
+               ::Go(BaseLhs& lhs, BaseRhs& rhs)
+    {
+    	typename MapType::key_type k(typeid(lhs),typeid(rhs));
+        typename MapType::iterator i = callbackMap_.find(k);
+        if (i == callbackMap_.end())
+        {
+                throw std::runtime_error("Function not found");
+        }
+        return (i->second)(lhs, rhs);
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template StaticCaster
+// Implementation of the CastingPolicy used by FunctorDispatcher
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class To, class From>
+    struct StaticCaster
+    {
+        static To& Cast(From& obj)
+        {
+            return static_cast<To&>(obj);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DynamicCaster
+// Implementation of the CastingPolicy used by FunctorDispatcher
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class To, class From>
+    struct DynamicCaster
+    {
+        static To& Cast(From& obj)
+        {
+            return dynamic_cast<To&>(obj);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Private::FnDispatcherHelper
+// Implements trampolines and argument swapping used by FnDispatcher
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class BaseLhs, class BaseRhs,
+	    class SomeLhs, class SomeRhs,
+            typename ResultType,
+            class CastLhs, class CastRhs,
+            ResultType (*Callback)(SomeLhs&, SomeRhs&)>
+        struct FnDispatcherHelper
+        {
+            static ResultType Trampoline(BaseLhs& lhs, BaseRhs& rhs)
+            {
+                return Callback(CastLhs::Cast(lhs), CastRhs::Cast(rhs));
+            }
+            static ResultType TrampolineR(BaseRhs& rhs, BaseLhs& lhs)
+            {
+                return Trampoline(lhs, rhs);
+            }
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FnDispatcher
+// Implements an automatic logarithmic double dispatcher for functions
+// Features automated conversions
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class BaseLhs, class BaseRhs = BaseLhs,
+              typename ResultType = void,
+              template <class, class> class CastingPolicy = DynamicCaster,
+              template <class, class, class, class>
+              class DispatcherBackend = BasicDispatcher>
+    class FnDispatcher
+    {
+        DispatcherBackend<BaseLhs, BaseRhs, ResultType, 
+            ResultType (*)(BaseLhs&, BaseRhs&)> backEnd_;
+        
+    public:
+        template <class SomeLhs, class SomeRhs>
+        void Add(ResultType (*pFun)(BaseLhs&, BaseRhs&))
+        {
+            return backEnd_.Add<SomeLhs, SomeRhs>(pFun);
+        }        
+        
+        template <class SomeLhs, class SomeRhs,
+            ResultType (*callback)(SomeLhs&, SomeRhs&)>
+        void Add()
+        {
+	    typedef Private::FnDispatcherHelper<
+					BaseLhs, BaseRhs, 
+					SomeLhs, SomeRhs,
+					ResultType,
+					CastingPolicy<SomeLhs,BaseLhs>, 
+					CastingPolicy<SomeRhs,BaseRhs>, 
+					callback> Local;
+
+            Add<SomeLhs, SomeRhs>(&Local::Trampoline);
+        }
+        
+        template <class SomeLhs, class SomeRhs,
+            ResultType (*callback)(SomeLhs&, SomeRhs&),
+            bool symmetric>
+        void Add()
+        {
+	    typedef Private::FnDispatcherHelper<
+					BaseLhs, BaseRhs, 
+					SomeLhs, SomeRhs,
+					ResultType,
+					CastingPolicy<SomeLhs,BaseLhs>, 
+					CastingPolicy<SomeRhs,BaseRhs>, 
+					callback> Local;
+
+            Add<SomeLhs, SomeRhs>(&Local::Trampoline);
+            if (symmetric)
+            {
+                Add<SomeRhs, SomeLhs>(&Local::TrampolineR);
+            }
+        }
+        
+        template <class SomeLhs, class SomeRhs>
+        void Remove()
+        {
+            backEnd_.Remove<SomeLhs, SomeRhs>();
+        }
+
+        ResultType Go(BaseLhs& lhs, BaseRhs& rhs)
+        {
+            return backEnd_.Go(lhs, rhs);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorDispatcherAdaptor
+// permits use of FunctorDispatcher under gcc.2.95.2/3
+///////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+	template <class BaseLhs, class BaseRhs,
+		  class SomeLhs, class SomeRhs,
+		  typename ResultType,
+		  class CastLhs, class CastRhs,
+		  class Fun, bool SwapArgs>
+        class FunctorDispatcherHelper 
+        {
+            Fun fun_;
+            ResultType Fire(BaseLhs& lhs, BaseRhs& rhs,Int2Type<false>)
+            {
+                return fun_(CastLhs::Cast(lhs), CastRhs::Cast(rhs));
+            }
+            ResultType Fire(BaseLhs& rhs, BaseRhs& lhs,Int2Type<true>)
+            {
+                return fun_(CastLhs::Cast(lhs), CastRhs::Cast(rhs));
+            }
+        public:
+            FunctorDispatcherHelper(const Fun& fun) : fun_(fun) {}
+
+            ResultType operator()(BaseLhs& lhs, BaseRhs& rhs)
+            {
+                return Fire(lhs,rhs,Int2Type<SwapArgs>());
+            }
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template FunctorDispatcher
+// Implements a logarithmic double dispatcher for functors
+// Features automated casting
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class BaseLhs, class BaseRhs = BaseLhs,
+              typename ResultType = void,
+              template <class, class> class CastingPolicy = DynamicCaster, 
+              template <class, class, class, class>
+              class DispatcherBackend = BasicDispatcher>
+    class FunctorDispatcher
+    {
+        typedef TYPELIST_2(BaseLhs&, BaseRhs&) ArgsList;
+        typedef Functor<ResultType, ArgsList, DEFAULT_THREADING> FunctorType;
+
+        DispatcherBackend<BaseLhs, BaseRhs, ResultType, FunctorType> backEnd_;
+
+    public:
+        template <class SomeLhs, class SomeRhs, class Fun>
+        void Add(const Fun& fun)
+        {
+            typedef Private::FunctorDispatcherHelper<
+					BaseLhs, BaseRhs,
+					SomeLhs, SomeRhs,
+					ResultType,
+					CastingPolicy<SomeLhs, BaseLhs>,
+					CastingPolicy<SomeRhs, BaseRhs>,
+					Fun, false> Adapter;
+
+            backEnd_.Add<SomeLhs, SomeRhs>(FunctorType(Adapter(fun)));
+	}
+        template <class SomeLhs, class SomeRhs, bool symmetric, class Fun>
+        void Add(const Fun& fun)
+        {
+	    Add<SomeLhs,SomeRhs>(fun);
+
+	    if (symmetric)
+	    {
+		// Note: symmetry only makes sense where BaseLhs==BaseRhs
+            	typedef Private::FunctorDispatcherHelper<
+					BaseLhs, BaseLhs,
+					SomeLhs, SomeRhs,
+					ResultType,
+					CastingPolicy<SomeLhs, BaseLhs>,
+					CastingPolicy<SomeRhs, BaseLhs>,
+					Fun, true> AdapterR;
+
+               	backEnd_.Add<SomeRhs, SomeLhs>(FunctorType(AdapterR(fun)));
+	    }
+        }
+        
+        template <class SomeLhs, class SomeRhs>
+        void Remove()
+        {
+            backEnd_.Remove<SomeLhs, SomeRhs>();
+        }
+
+        ResultType Go(BaseLhs& lhs, BaseRhs& rhs)
+        {
+            return backEnd_.Go(lhs, rhs);
+        }
+    };
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: avida/current/source/third-party/Loki/Reference/NullType.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/NullType.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/NullType.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: November 22, 2001
+
+#ifndef NULLTYPE_INC_
+#define NULLTYPE_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class NullType
+// Used as a placeholder for "no type here"
+// Useful as an end marker in typelists 
+////////////////////////////////////////////////////////////////////////////////
+
+    class NullType {};
+    
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// November 22, 2001: minor change to support porting to boost
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // NULLTYPE_INC_
Index: avida/current/source/third-party/Loki/Reference/Singleton.cpp
diff -u /dev/null avida/current/source/third-party/Loki/Reference/Singleton.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/Singleton.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#include "Singleton.h"
+
+using namespace Loki::Private;
+
+Loki::Private::TrackerArray Loki::Private::pTrackerArray = 0;
+unsigned int Loki::Private::elements = 0;
+
+////////////////////////////////////////////////////////////////////////////////
+// function AtExitFn
+// Ensures proper destruction of objects with longevity
+////////////////////////////////////////////////////////////////////////////////
+
+void Loki::Private::AtExitFn()
+{
+    assert(elements > 0 && pTrackerArray != 0);
+    // Pick the element at the top of the stack
+    LifetimeTracker* pTop = pTrackerArray[elements - 1];
+    // Remove that object off the stack
+    // Don't check errors - realloc with less memory 
+    //     can't fail
+    pTrackerArray = static_cast<TrackerArray>(std::realloc(
+        pTrackerArray, sizeof(*pTrackerArray) * --elements));
+    // Destroy the element
+    delete pTop;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// January 10, 2002: Fixed bug in call to realloc - credit due to Nigel Gent and
+//      Eike Petersen
+// May 08, 2002: Refixed bug in call to realloc
+////////////////////////////////////////////////////////////////////////////////
Index: avida/current/source/third-party/Loki/Reference/Singleton.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/Singleton.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/Singleton.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,448 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef SINGLETON_INC_
+#define SINGLETON_INC_
+
+#include "Threads.h"
+#include <algorithm>
+#include <stdexcept>
+#include <cassert>
+#include <cstdlib>
+#include <new>
+
+namespace Loki
+{
+    namespace Private
+    {
+////////////////////////////////////////////////////////////////////////////////
+// class LifetimeTracker
+// Helper class for SetLongevity
+////////////////////////////////////////////////////////////////////////////////
+
+        class LifetimeTracker
+        {
+        public:
+            LifetimeTracker(unsigned int x) : longevity_(x) 
+            {}
+            
+            virtual ~LifetimeTracker() = 0;
+            
+            static bool Compare(const LifetimeTracker* lhs,
+                const LifetimeTracker* rhs)
+            {
+                return lhs->longevity_ > rhs->longevity_;
+            }
+            
+        private:
+            unsigned int longevity_;
+        };
+        
+        // Definition required
+        inline LifetimeTracker::~LifetimeTracker() {} 
+        
+        // Helper data
+        typedef LifetimeTracker** TrackerArray;
+        extern TrackerArray pTrackerArray;
+        extern unsigned int elements;
+
+        // Helper destroyer function
+        template <typename T>
+        struct Deleter
+        {
+            static void Delete(T* pObj)
+            { delete pObj; }
+        };
+
+        // Concrete lifetime tracker for objects of type T
+        template <typename T, typename Destroyer>
+        class ConcreteLifetimeTracker : public LifetimeTracker
+        {
+        public:
+            ConcreteLifetimeTracker(T* p,unsigned int longevity, Destroyer d)
+                : LifetimeTracker(longevity)
+                , pTracked_(p)
+                , destroyer_(d)
+            {}
+            
+            ~ConcreteLifetimeTracker()
+            { destroyer_(pTracked_); }
+            
+        private:
+            T* pTracked_;
+            Destroyer destroyer_;
+        };
+
+        void AtExitFn(); // declaration needed below
+    
+    } // namespace Private
+
+////////////////////////////////////////////////////////////////////////////////
+// function template SetLongevity
+// Assigns an object a longevity; ensures ordered destructions of objects 
+//     registered thusly during the exit sequence of the application
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T, typename Destroyer>
+    void SetLongevity(T* pDynObject, unsigned int longevity,
+        Destroyer d = Private::Deleter<T>::Delete)
+    {
+        using namespace Private;
+        
+        TrackerArray pNewArray = static_cast<TrackerArray>(
+                std::realloc(pTrackerArray, 
+                    sizeof(*pTrackerArray) * (elements + 1)));
+        if (!pNewArray) throw std::bad_alloc();
+        
+        // Delayed assignment for exception safety
+        pTrackerArray = pNewArray;
+        
+        LifetimeTracker* p = new ConcreteLifetimeTracker<T, Destroyer>(
+            pDynObject, longevity, d);
+        
+        // Insert a pointer to the object into the queue
+        TrackerArray pos = std::upper_bound(
+            pTrackerArray, 
+            pTrackerArray + elements, 
+            p, 
+            LifetimeTracker::Compare);
+        std::copy_backward(
+            pos, 
+            pTrackerArray + elements,
+            pTrackerArray + elements + 1);
+        *pos = p;
+        ++elements;
+        
+        // Register a call to AtExitFn
+        std::atexit(Private::AtExitFn);
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template CreateUsingNew
+// Implementation of the CreationPolicy used by SingletonHolder
+// Creates objects using a straight call to the new operator 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T> struct CreateUsingNew
+    {
+        static T* Create()
+        { return new T; }
+        
+        static void Destroy(T* p)
+        { delete p; }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template CreateUsingNew
+// Implementation of the CreationPolicy used by SingletonHolder
+// Creates objects using a call to std::malloc, followed by a call to the 
+//     placement new operator
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T> struct CreateUsingMalloc
+    {
+        static T* Create()
+        {
+            void* p = std::malloc(sizeof(T));
+            if (!p) return 0;
+            return new(p) T;
+        }
+        
+        static void Destroy(T* p)
+        {
+            p->~T();
+            std::free(p);
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template CreateStatic
+// Implementation of the CreationPolicy used by SingletonHolder
+// Creates an object in static memory
+// Implementation is slightly nonportable because it uses the MaxAlign trick 
+//     (an union of all types to ensure proper memory alignment). This trick is 
+//     nonportable in theory but highly portable in practice.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T> struct CreateStatic
+    {
+        union MaxAlign
+        {
+            char t_[sizeof(T)];
+            short int shortInt_;
+            int int_;
+            long int longInt_;
+            float float_;
+            double double_;
+            long double longDouble_;
+            struct Test;
+            int Test::* pMember_;
+            int (Test::*pMemberFn_)(int);
+        };
+        
+        static T* Create()
+        {
+            static MaxAlign staticMemory_;
+            return new(&staticMemory_) T;
+        }
+        
+        static void Destroy(T* p)
+        {
+            p->~T();
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template DefaultLifetime
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Schedules an object's destruction as per C++ rules
+// Forwards to std::atexit
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    struct DefaultLifetime
+    {
+        static void ScheduleDestruction(T*, void (*pFun)())
+        { std::atexit(pFun); }
+        
+        static void OnDeadReference()
+        { throw std::logic_error("Dead Reference Detected"); }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template PhoenixSingleton
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Schedules an object's destruction as per C++ rules, and it allows object 
+//    recreation by not throwing an exception from OnDeadReference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class PhoenixSingleton
+    {
+    public:
+        static void ScheduleDestruction(T*, void (*pFun)())
+        {
+#ifndef ATEXIT_FIXED
+            if (!destroyedOnce_)
+#endif
+                std::atexit(pFun);
+        }
+        
+        static void OnDeadReference()
+        {
+#ifndef ATEXIT_FIXED
+            destroyedOnce_ = true;
+#endif
+        }
+        
+    private:
+#ifndef ATEXIT_FIXED
+        static bool destroyedOnce_;
+#endif
+    };
+    
+#ifndef ATEXIT_FIXED
+    template <class T> bool PhoenixSingleton<T>::destroyedOnce_ = false;
+#endif
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template Adapter
+// Helper for SingletonWithLongevity below
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class T>
+        struct Adapter
+        {
+            void operator()(T*) { return pFun_(); }
+            void (*pFun_)();
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SingletonWithLongevity
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Schedules an object's destruction in order of their longevities
+// Assumes a visible function GetLongevity(T*) that returns the longevity of the
+//     object
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class SingletonWithLongevity
+    {
+    public:
+        static void ScheduleDestruction(T* pObj, void (*pFun)())
+        {
+            Private::Adapter<T> adapter = { pFun };
+            SetLongevity(pObj, GetLongevity(pObj), adapter);
+        }
+        
+        static void OnDeadReference()
+        { throw std::logic_error("Dead Reference Detected"); }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template NoDestroy
+// Implementation of the LifetimePolicy used by SingletonHolder
+// Never destroys the object
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    struct NoDestroy
+    {
+        static void ScheduleDestruction(T*, void (*)())
+        {}
+        
+        static void OnDeadReference()
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SingletonHolder
+// Provides Singleton amenities for a type T
+// To protect that type from spurious instantiations, you have to protect it
+//     yourself.
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class CreationPolicy = CreateUsingNew,
+        template <class> class LifetimePolicy = DefaultLifetime,
+        template <class> class ThreadingModel = SingleThreaded
+    >
+    class SingletonHolder
+    {
+    public:
+        static T& Instance();
+        
+    private:
+        // Helpers
+        static void MakeInstance();
+        static void DestroySingleton();
+        
+        // Protection
+        SingletonHolder();
+        
+        // Data
+        typedef typename ThreadingModel<T*>::VolatileType PtrInstanceType;
+        static PtrInstanceType pInstance_;
+        static bool destroyed_;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// SingletonHolder's data
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class T,
+        template <class> class C,
+        template <class> class L,
+        template <class> class M
+    >
+    typename SingletonHolder<T, C, L, M>::PtrInstanceType
+        SingletonHolder<T, C, L, M>::pInstance_;
+
+    template
+    <
+        class T,
+        template <class> class C,
+        template <class> class L,
+        template <class> class M
+    >
+    bool SingletonHolder<T, C, L, M>::destroyed_;
+
+////////////////////////////////////////////////////////////////////////////////
+// SingletonHolder::Instance
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class T,
+        template <class> class CreationPolicy,
+        template <class> class LifetimePolicy,
+        template <class> class ThreadingModel
+    >
+    inline T& SingletonHolder<T, CreationPolicy, 
+        LifetimePolicy, ThreadingModel>::Instance()
+    {
+        if (!pInstance_)
+        {
+            MakeInstance();
+        }
+        return *pInstance_;
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// SingletonHolder::MakeInstance (helper for Instance)
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        class T,
+        template <class> class CreationPolicy,
+        template <class> class LifetimePolicy,
+        template <class> class ThreadingModel
+    >
+    void SingletonHolder<T, CreationPolicy, 
+        LifetimePolicy, ThreadingModel>::MakeInstance()
+    {
+        typename ThreadingModel<T>::Lock guard;
+        (void)guard;
+        
+        if (!pInstance_)
+        {
+            if (destroyed_)
+            {
+                LifetimePolicy<T>::OnDeadReference();
+                destroyed_ = false;
+            }
+            pInstance_ = CreationPolicy<T>::Create();
+            LifetimePolicy<T>::ScheduleDestruction(pInstance_, 
+                &DestroySingleton);
+        }
+    }
+
+    template
+    <
+        class T,
+        template <class> class CreationPolicy,
+        template <class> class L,
+        template <class> class M
+    >
+    void SingletonHolder<T, CreationPolicy, L, M>::DestroySingleton()
+    {
+        assert(!destroyed_);
+        CreationPolicy<T>::Destroy(pInstance_);
+        pInstance_ = 0;
+        destroyed_ = true;
+    }
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// May 21, 2001: Correct the volatile qualifier - credit due to Darin Adler
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// January 08, 2002: Fixed bug in call to realloc - credit due to Nigel Gent and
+//      Eike Petersen
+// March 08, 2002: moved the assignment to pTrackerArray in SetLongevity to fix
+//      exception safety issue. Credit due to Kari Hoijarvi
+// May 09, 2002: Fixed bug in Compare that caused longevities to act backwards.
+//      Credit due to Scott McDonald.
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // SINGLETON_INC_
Index: avida/current/source/third-party/Loki/Reference/SmallObj.cpp
diff -u /dev/null avida/current/source/third-party/Loki/Reference/SmallObj.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/SmallObj.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,420 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: March 20, 2001
+
+#include "SmallObj.h"
+#include <cassert>
+#include <algorithm>
+
+using namespace Loki;
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Init
+// Initializes a chunk object
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Init(std::size_t blockSize, unsigned char blocks)
+{
+    assert(blockSize > 0);
+    assert(blocks > 0);
+    // Overflow check
+    assert((blockSize * blocks) / blockSize == blocks);
+    
+    pData_ = new unsigned char[blockSize * blocks];
+    Reset(blockSize, blocks);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Reset
+// Clears an already allocated chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Reset(std::size_t blockSize, unsigned char blocks)
+{
+    assert(blockSize > 0);
+    assert(blocks > 0);
+    // Overflow check
+    assert((blockSize * blocks) / blockSize == blocks);
+
+    firstAvailableBlock_ = 0;
+    blocksAvailable_ = blocks;
+
+    unsigned char i = 0;
+    unsigned char* p = pData_;
+    for (; i != blocks; p += blockSize)
+    {
+        *p = ++i;
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Release
+// Releases the data managed by a chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Release()
+{
+    delete[] pData_;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Allocate
+// Allocates a block from a chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void* FixedAllocator::Chunk::Allocate(std::size_t blockSize)
+{
+    if (!blocksAvailable_) return 0;
+    
+    assert((firstAvailableBlock_ * blockSize) / blockSize == 
+        firstAvailableBlock_);
+
+    unsigned char* pResult =
+        pData_ + (firstAvailableBlock_ * blockSize);
+    firstAvailableBlock_ = *pResult;
+    --blocksAvailable_;
+    
+    return pResult;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Chunk::Deallocate
+// Dellocates a block from a chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Chunk::Deallocate(void* p, std::size_t blockSize)
+{
+    assert(p >= pData_);
+
+    unsigned char* toRelease = static_cast<unsigned char*>(p);
+    // Alignment check
+    assert((toRelease - pData_) % blockSize == 0);
+
+    *toRelease = firstAvailableBlock_;
+    firstAvailableBlock_ = static_cast<unsigned char>(
+        (toRelease - pData_) / blockSize);
+    // Truncation check
+    assert(firstAvailableBlock_ == (toRelease - pData_) / blockSize);
+
+    ++blocksAvailable_;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::FixedAllocator
+// Creates a FixedAllocator object of a fixed block size
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::FixedAllocator(std::size_t blockSize)
+    : blockSize_(blockSize)
+    , allocChunk_(0)
+    , deallocChunk_(0)
+{
+    assert(blockSize_ > 0);
+    
+    prev_ = next_ = this;
+
+    std::size_t numBlocks = DEFAULT_CHUNK_SIZE / blockSize;
+    if (numBlocks > UCHAR_MAX) numBlocks = UCHAR_MAX;
+    else if (numBlocks == 0) numBlocks = 8 * blockSize;
+    
+    numBlocks_ = static_cast<unsigned char>(numBlocks);
+    assert(numBlocks_ == numBlocks);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::FixedAllocator(const FixedAllocator&)
+// Creates a FixedAllocator object of a fixed block size
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::FixedAllocator(const FixedAllocator& rhs)
+    : blockSize_(rhs.blockSize_)
+    , numBlocks_(rhs.numBlocks_)
+    , chunks_(rhs.chunks_)
+{
+    prev_ = &rhs;
+    next_ = rhs.next_;
+    rhs.next_->prev_ = this;
+    rhs.next_ = this;
+    
+    allocChunk_ = rhs.allocChunk_
+        ? &chunks_.front() + (rhs.allocChunk_ - &rhs.chunks_.front())
+        : 0;
+
+    deallocChunk_ = rhs.deallocChunk_
+        ? &chunks_.front() + (rhs.deallocChunk_ - &rhs.chunks_.front())
+        : 0;
+}
+
+FixedAllocator& FixedAllocator::operator=(const FixedAllocator& rhs)
+{
+    FixedAllocator copy(rhs);
+    copy.Swap(*this);
+    return *this;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::~FixedAllocator
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::~FixedAllocator()
+{
+    if (prev_ != this)
+    {
+        prev_->next_ = next_;
+        next_->prev_ = prev_;
+        return;
+    }
+    
+    assert(prev_ == next_);
+    Chunks::iterator i = chunks_.begin();
+    for (; i != chunks_.end(); ++i)
+    {
+       assert(i->blocksAvailable_ == numBlocks_);
+       i->Release();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Swap
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Swap(FixedAllocator& rhs)
+{
+    using namespace std;
+    
+    swap(blockSize_, rhs.blockSize_);
+    swap(numBlocks_, rhs.numBlocks_);
+    chunks_.swap(rhs.chunks_);
+    swap(allocChunk_, rhs.allocChunk_);
+    swap(deallocChunk_, rhs.deallocChunk_);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Allocate
+// Allocates a block of fixed size
+////////////////////////////////////////////////////////////////////////////////
+
+void* FixedAllocator::Allocate()
+{
+    if (allocChunk_ == 0 || allocChunk_->blocksAvailable_ == 0)
+    {
+        Chunks::iterator i = chunks_.begin();
+        for (;; ++i)
+        {
+            if (i == chunks_.end())
+            {
+                // Initialize
+                chunks_.reserve(chunks_.size() + 1);
+                Chunk newChunk;
+                newChunk.Init(blockSize_, numBlocks_);
+                chunks_.push_back(newChunk);
+                allocChunk_ = &chunks_.back();
+                deallocChunk_ = &chunks_.front();
+                break;
+            }
+            if (i->blocksAvailable_ > 0)
+            {
+                allocChunk_ = &*i;
+                break;
+            }
+        }
+    }
+    assert(allocChunk_ != 0);
+    assert(allocChunk_->blocksAvailable_ > 0);
+    
+    return allocChunk_->Allocate(blockSize_);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::Deallocate
+// Deallocates a block previously allocated with Allocate
+// (undefined behavior if called with the wrong pointer)
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::Deallocate(void* p)
+{
+    assert(!chunks_.empty());
+    assert(&chunks_.front() <= deallocChunk_);
+    assert(&chunks_.back() >= deallocChunk_);
+    
+    deallocChunk_  = VicinityFind(p);
+    assert(deallocChunk_);
+
+    DoDeallocate(p);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::VicinityFind (internal)
+// Finds the chunk corresponding to a pointer, using an efficient search
+////////////////////////////////////////////////////////////////////////////////
+
+FixedAllocator::Chunk* FixedAllocator::VicinityFind(void* p)
+{
+    assert(!chunks_.empty());
+    assert(deallocChunk_);
+
+    const std::size_t chunkLength = numBlocks_ * blockSize_;
+
+    Chunk* lo = deallocChunk_;
+    Chunk* hi = deallocChunk_ + 1;
+    Chunk* loBound = &chunks_.front();
+    Chunk* hiBound = &chunks_.back() + 1;
+	
+	// Special case: deallocChunk_ is the last in the array
+	if (hi == hiBound) hi = 0;
+
+    for (;;)
+    {
+        if (lo)
+        {
+            if (p >= lo->pData_ && p < lo->pData_ + chunkLength)
+            {
+                return lo;
+            }
+            if (lo == loBound) lo = 0;
+            else --lo;
+        }
+        
+        if (hi)
+        {
+            if (p >= hi->pData_ && p < hi->pData_ + chunkLength)
+            {
+                return hi;
+            }
+            if (++hi == hiBound) hi = 0;
+        }
+    }
+    assert(false);
+    return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FixedAllocator::DoDeallocate (internal)
+// Performs deallocation. Assumes deallocChunk_ points to the correct chunk
+////////////////////////////////////////////////////////////////////////////////
+
+void FixedAllocator::DoDeallocate(void* p)
+{
+    assert(deallocChunk_->pData_ <= p);
+    assert(deallocChunk_->pData_ + numBlocks_ * blockSize_ > p);
+
+    // call into the chunk, will adjust the inner list but won't release memory
+    deallocChunk_->Deallocate(p, blockSize_);
+
+    if (deallocChunk_->blocksAvailable_ == numBlocks_)
+    {
+        // deallocChunk_ is completely free, should we release it? 
+        
+        Chunk& lastChunk = chunks_.back();
+        
+        if (&lastChunk == deallocChunk_)
+        {
+            // check if we have two last chunks empty
+            
+            if (chunks_.size() > 1 && 
+                deallocChunk_[-1].blocksAvailable_ == numBlocks_)
+            {
+                // Two free chunks, discard the last one
+                lastChunk.Release();
+                chunks_.pop_back();
+                allocChunk_ = deallocChunk_ = &chunks_.front();
+            }
+            return;
+        }
+        
+        if (lastChunk.blocksAvailable_ == numBlocks_)
+        {
+            // Two free blocks, discard one
+            lastChunk.Release();
+            chunks_.pop_back();
+            allocChunk_ = deallocChunk_;
+        }
+        else
+        {
+            // move the empty chunk to the end
+            std::swap(*deallocChunk_, lastChunk);
+            allocChunk_ = &chunks_.back();
+        }
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// SmallObjAllocator::SmallObjAllocator
+// Creates an allocator for small objects given chunk size and maximum 'small'
+//     object size
+////////////////////////////////////////////////////////////////////////////////
+
+SmallObjAllocator::SmallObjAllocator(
+        std::size_t chunkSize, 
+        std::size_t maxObjectSize)
+    : pLastAlloc_(0), pLastDealloc_(0)
+    , chunkSize_(chunkSize), maxObjectSize_(maxObjectSize) 
+{   
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// SmallObjAllocator::Allocate
+// Allocates 'numBytes' memory
+// Uses an internal pool of FixedAllocator objects for small objects  
+////////////////////////////////////////////////////////////////////////////////
+
+void* SmallObjAllocator::Allocate(std::size_t numBytes)
+{
+    if (numBytes > maxObjectSize_) return operator new(numBytes);
+    
+    if (pLastAlloc_ && pLastAlloc_->BlockSize() == numBytes)
+    {
+        return pLastAlloc_->Allocate();
+    }
+    Pool::iterator i = std::lower_bound(pool_.begin(), pool_.end(), numBytes);
+    if (i == pool_.end() || i->BlockSize() != numBytes)
+    {
+        i = pool_.insert(i, FixedAllocator(numBytes));
+        pLastDealloc_ = &*pool_.begin();
+    }
+    pLastAlloc_ = &*i;
+    return pLastAlloc_->Allocate();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// SmallObjAllocator::Deallocate
+// Deallocates memory previously allocated with Allocate
+// (undefined behavior if you pass any other pointer)
+////////////////////////////////////////////////////////////////////////////////
+
+void SmallObjAllocator::Deallocate(void* p, std::size_t numBytes)
+{
+    if (numBytes > maxObjectSize_) return operator delete(p);
+
+    if (pLastDealloc_ && pLastDealloc_->BlockSize() == numBytes)
+    {
+        pLastDealloc_->Deallocate(p);
+        return;
+    }
+    Pool::iterator i = std::lower_bound(pool_.begin(), pool_.end(), numBytes);
+    assert(i != pool_.end());
+    assert(i->BlockSize() == numBytes);
+    pLastDealloc_ = &*i;
+    pLastDealloc_->Deallocate(p);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// March 20: fix exception safety issue in FixedAllocator::Allocate 
+//     (thanks to Chris Udazvinis for pointing that out)
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// Aug 02, 2002: Fix in VicinityFind sent by Pavel Vozenilek
+////////////////////////////////////////////////////////////////////////////////
Index: avida/current/source/third-party/Loki/Reference/SmallObj.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/SmallObj.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/SmallObj.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,196 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef SMALLOBJ_INC_
+#define SMALLOBJ_INC_
+
+#include "Threads.h"
+#include "Singleton.h"
+#include <cstddef>
+#include <vector>
+
+#ifndef DEFAULT_CHUNK_SIZE
+#define DEFAULT_CHUNK_SIZE 4096
+#endif
+
+#ifndef MAX_SMALL_OBJECT_SIZE
+#define MAX_SMALL_OBJECT_SIZE 64
+#endif
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class FixedAllocator
+// Offers services for allocating fixed-sized objects
+////////////////////////////////////////////////////////////////////////////////
+
+    class FixedAllocator
+    {
+    private:
+        struct Chunk
+        {
+            void Init(std::size_t blockSize, unsigned char blocks);
+            void* Allocate(std::size_t blockSize);
+            void Deallocate(void* p, std::size_t blockSize);
+            void Reset(std::size_t blockSize, unsigned char blocks);
+            void Release();
+            unsigned char* pData_;
+            unsigned char
+                firstAvailableBlock_,
+                blocksAvailable_;
+        };
+        
+        // Internal functions        
+        void DoDeallocate(void* p);
+        Chunk* VicinityFind(void* p);
+        
+        // Data 
+        std::size_t blockSize_;
+        unsigned char numBlocks_;
+        typedef std::vector<Chunk> Chunks;
+        Chunks chunks_;
+        Chunk* allocChunk_;
+        Chunk* deallocChunk_;
+        // For ensuring proper copy semantics
+        mutable const FixedAllocator* prev_;
+        mutable const FixedAllocator* next_;
+        
+    public:
+        // Create a FixedAllocator able to manage blocks of 'blockSize' size
+        explicit FixedAllocator(std::size_t blockSize = 0);
+        FixedAllocator(const FixedAllocator&);
+        FixedAllocator& operator=(const FixedAllocator&);
+        ~FixedAllocator();
+        
+        void Swap(FixedAllocator& rhs);
+        
+        // Allocate a memory block
+        void* Allocate();
+        // Deallocate a memory block previously allocated with Allocate()
+        // (if that's not the case, the behavior is undefined)
+        void Deallocate(void* p);
+        // Returns the block size with which the FixedAllocator was initialized
+        std::size_t BlockSize() const
+        { return blockSize_; }
+        // Comparison operator for sorting 
+        bool operator<(std::size_t rhs) const
+        { return BlockSize() < rhs; }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class SmallObjAllocator
+// Offers services for allocating small-sized objects
+////////////////////////////////////////////////////////////////////////////////
+
+    class SmallObjAllocator
+    {
+    public:
+        SmallObjAllocator(
+            std::size_t chunkSize, 
+            std::size_t maxObjectSize);
+    
+        void* Allocate(std::size_t numBytes);
+        void Deallocate(void* p, std::size_t size);
+    
+    private:
+        SmallObjAllocator(const SmallObjAllocator&);
+        SmallObjAllocator& operator=(const SmallObjAllocator&);
+        
+        typedef std::vector<FixedAllocator> Pool;
+        Pool pool_;
+        FixedAllocator* pLastAlloc_;
+        FixedAllocator* pLastDealloc_;
+        std::size_t chunkSize_;
+        std::size_t maxObjectSize_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class SmallObject
+// Base class for polymorphic small objects, offers fast
+//     allocations/deallocations
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        template <class> class ThreadingModel = DEFAULT_THREADING,
+        std::size_t chunkSize = DEFAULT_CHUNK_SIZE,
+        std::size_t maxSmallObjectSize = MAX_SMALL_OBJECT_SIZE
+    >
+    class SmallObject : public ThreadingModel< 
+        SmallObject<ThreadingModel, chunkSize, maxSmallObjectSize> >
+    {
+    	typedef ThreadingModel< SmallObject<ThreadingModel, 
+    			chunkSize, maxSmallObjectSize> > MyThreadingModel;
+    			
+        struct MySmallObjAllocator : public SmallObjAllocator
+        {
+            MySmallObjAllocator() 
+            : SmallObjAllocator(chunkSize, maxSmallObjectSize)
+            {}
+        };
+        // The typedef below would make things much simpler, 
+        //     but MWCW won't like it
+        // typedef SingletonHolder<MySmallObjAllocator/*, CreateStatic, 
+        //        DefaultLifetime, ThreadingModel*/> MyAllocator;
+        
+    public:
+        static void* operator new(std::size_t size)
+        {
+#if (MAX_SMALL_OBJECT_SIZE != 0) && (DEFAULT_CHUNK_SIZE != 0)
+            typename MyThreadingModel::Lock lock;
+            (void)lock; // get rid of warning
+            
+            return SingletonHolder<MySmallObjAllocator, CreateStatic, 
+                PhoenixSingleton>::Instance().Allocate(size);
+#else
+            return ::operator new(size);
+#endif
+        }
+        /*
+        XXX changes by kaben; otherwise under OSX10.2.6 we obtain:
+        ../lokitest/Loki/Reference/SmallObj.h:172: no matching function for call to `
+           std::nothrow_t::nothrow_t(size_t&)'
+        /usr/include/gcc/darwin/3.1/g++-v3/new:59: candidates are:
+           std::nothrow_t::nothrow_t()
+        /usr/include/gcc/darwin/3.1/g++-v3/new:59:
+           std::nothrow_t::nothrow_t(const std::nothrow_t&)
+        */
+        //static void operator delete(void* p, std::size_t size)
+        static void operator delete(void* p)
+        {
+#if (MAX_SMALL_OBJECT_SIZE != 0) && (DEFAULT_CHUNK_SIZE != 0)
+            typename MyThreadingModel::Lock lock;
+            (void)lock; // get rid of warning
+            
+            SingletonHolder<MySmallObjAllocator, CreateStatic, 
+                PhoenixSingleton>::Instance().Deallocate(p, size);
+#else
+            //::operator delete(p, size);
+            ::operator delete(p);
+            /* XXX -- kaben */
+#endif
+        }
+        virtual ~SmallObject() {}
+    };
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // SMALLOBJ_INC_
Index: avida/current/source/third-party/Loki/Reference/SmartPtr.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/SmartPtr.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/SmartPtr.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,1195 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef SMARTPTR_INC_
+#define SMARTPTR_INC_
+
+////////////////////////////////////////////////////////////////////////////////
+// IMPORTANT NOTE
+// Due to threading issues, the OwnershipPolicy has been changed as follows:
+//     Release() returns a boolean saying if that was the last release
+//        so the pointer can be deleted by the StoragePolicy
+//     IsUnique() was removed
+////////////////////////////////////////////////////////////////////////////////
+
+
+#include "SmallObj.h"
+#include "TypeManip.h"
+#include "static_check.h"
+#include <functional>
+#include <stdexcept>
+#include <cassert>
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DefaultSPStorage
+// Implementation of the StoragePolicy used by SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class DefaultSPStorage
+    {
+    protected:
+        typedef T* StoredType;    // the type of the pointee_ object
+        typedef T* PointerType;   // type returned by operator->
+        typedef T& ReferenceType; // type returned by operator*
+        
+    public:
+        DefaultSPStorage() : pointee_(Default()) 
+        {}
+
+        // The storage policy doesn't initialize the stored pointer 
+        //     which will be initialized by the OwnershipPolicy's Clone fn
+        DefaultSPStorage(const DefaultSPStorage&)
+        {}
+
+        template <class U>
+        DefaultSPStorage(const DefaultSPStorage<U>&) 
+        {}
+        
+        DefaultSPStorage(const StoredType& p) : pointee_(p) {}
+        
+        PointerType operator->() const { return pointee_; }
+        
+        ReferenceType operator*() const { return *pointee_; }
+        
+        void Swap(DefaultSPStorage& rhs)
+        { std::swap(pointee_, rhs.pointee_); }
+    
+        // Accessors
+        friend inline PointerType GetImpl(const DefaultSPStorage& sp)
+        { return sp.pointee_; }
+        
+    	friend inline const StoredType& GetImplRef(const DefaultSPStorage& sp)
+    	{ return sp.pointee_; }
+
+    	friend inline StoredType& GetImplRef(DefaultSPStorage& sp)
+    	{ return sp.pointee_; }
+
+    protected:
+        // Destroys the data stored
+        // (Destruction might be taken over by the OwnershipPolicy)
+        void Destroy()
+        { delete pointee_; }
+        
+        // Default value to initialize the pointer
+        static StoredType Default()
+        { return 0; }
+    
+    private:
+        // Data
+        StoredType pointee_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template RefCounted
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Provides a classic external reference counting implementation
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class RefCounted
+    {
+    public:
+        RefCounted() 
+        {
+            pCount_ = static_cast<unsigned int*>(
+                SmallObject<>::operator new(sizeof(unsigned int)));
+            assert(pCount_);
+            *pCount_ = 1;
+        }
+        
+        RefCounted(const RefCounted& rhs) 
+        : pCount_(rhs.pCount_)
+        {}
+        
+        // MWCW lacks template friends, hence the following kludge
+        template <typename P1>
+        RefCounted(const RefCounted<P1>& rhs) 
+        : pCount_(reinterpret_cast<const RefCounted&>(rhs).pCount_)
+        {}
+        
+        P Clone(const P& val)
+        {
+            ++*pCount_;
+            return val;
+        }
+        
+        bool Release(const P&)
+        {
+            if (!--*pCount_)
+            {
+                SmallObject<>::operator delete(pCount_, sizeof(unsigned int));
+                return true;
+            }
+            return false;
+        }
+        
+        void Swap(RefCounted& rhs)
+        { std::swap(pCount_, rhs.pCount_); }
+    
+        enum { destructiveCopy = false };
+
+    private:
+        // Data
+        unsigned int* pCount_;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template RefCountedMT
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements external reference counting for multithreaded programs
+////////////////////////////////////////////////////////////////////////////////
+    template <class P,
+        template <class> class ThreadingModel>
+    class RefCountedMT : public ThreadingModel< RefCountedMT<P, ThreadingModel> >
+    {
+    public:
+        RefCountedMT() 
+        {
+            pCount_ = static_cast<unsigned int*>(
+                SmallObject<ThreadingModel>::operator new(
+                    sizeof(unsigned int)));
+            assert(pCount_);
+            *pCount_ = 1;
+        }
+        
+        RefCountedMT(const RefCountedMT& rhs) 
+        : pCount_(rhs.pCount_)
+        {}
+        
+        // MWCW lacks template friends, hence the following kludge
+        template <typename P1>
+        RefCountedMT(const RefCountedMT<P1, ThreadingModel>& rhs) 
+        : pCount_(reinterpret_cast<const RefCounted<P>&>(rhs).pCount_)
+        {}
+        
+        P Clone(const P& val)
+        {
+            ThreadingModel<RefCountedMT>::AtomicIncrement(*pCount_);
+            return val;
+        }
+        
+        bool Release(const P&)
+        {
+            if (!ThreadingModel<RefCountedMT>::AtomicDecrement(*pCount_))
+            {
+                SmallObject<ThreadingModel>::operator delete(pCount_, 
+                    sizeof(unsigned int));
+                return true;
+            }
+            return false;
+        }
+        
+        void Swap(RefCountedMT& rhs)
+        { std::swap(pCount_, rhs.pCount_); }
+    
+        enum { destructiveCopy = false };
+
+    private:
+        // Data
+        volatile unsigned int* pCount_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template COMRefCounted
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Adapts COM intrusive reference counting to OwnershipPolicy-specific syntax
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class COMRefCounted
+    {
+    public:
+        COMRefCounted()
+        {}
+        
+        template <class U>
+        COMRefCounted(const COMRefCounted<U>&)
+        {}
+        
+        static P Clone(const P& val)
+        {
+            val->AddRef();
+            return val;
+        }
+        
+        static bool Release(const P& val)
+        { val->Release(); return false; }
+        
+        enum { destructiveCopy = false };
+        
+        static void Swap(COMRefCounted&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DeepCopy
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements deep copy semantics, assumes existence of a Clone() member 
+//     function of the pointee type
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct DeepCopy
+    {
+        DeepCopy()
+        {}
+        
+        template <class P1>
+        DeepCopy(const DeepCopy<P1>&)
+        {}
+        
+        static P Clone(const P& val)
+        { return val->Clone(); }
+        
+        static bool Release(const P& val)
+        { return true; }
+        
+        static void Swap(DeepCopy&)
+        {}
+        
+        enum { destructiveCopy = false };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template RefLinked
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements reference linking
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        class RefLinkedBase
+        {
+        public:
+            RefLinkedBase() 
+            { prev_ = next_ = this; }
+            
+            RefLinkedBase(const RefLinkedBase& rhs) 
+            {
+                prev_ = &rhs;
+                next_ = rhs.next_;
+                prev_->next_ = this;
+                next_->prev_ = this;
+            }
+            
+            bool Release()
+            {
+                if (next_ == this)
+                {   
+                    assert(prev_ == this);
+                    return true;
+                }
+                prev_->next_ = next_;
+                next_->prev_ = prev_;
+                return false;
+            }
+            
+            void Swap(RefLinkedBase& rhs)
+            {
+                if (next_ == this)
+                {
+                    assert(prev_ == this);
+                    if (rhs.next_ == &rhs)
+                    {
+                        assert(rhs.prev_ == &rhs);
+                        // both lists are empty, nothing 2 do
+                        return;
+                    }
+                    prev_ = rhs.prev_;
+                    next_ = rhs.next_;
+                    prev_->next_ = next_->prev_ = this;
+                    rhs.next_ = rhs.prev_ = &rhs;
+                    return;
+                }
+                if (rhs.next_ == &rhs)
+                {
+                    rhs.Swap(*this);
+                    return;
+                }
+                std::swap(prev_, rhs.prev_);
+                std::swap(next_, rhs.next_);
+                std::swap(prev_->next_, rhs.prev_->next_);
+                std::swap(next_->prev_, rhs.next_->prev_);
+            }
+                
+            enum { destructiveCopy = false };
+
+        private:
+            mutable const RefLinkedBase* prev_;
+            mutable const RefLinkedBase* next_;
+        };
+    }
+    
+    template <class P>
+    class RefLinked : public Private::RefLinkedBase
+    {
+    public:
+        RefLinked()
+        {}
+        
+        template <class P1>
+        RefLinked(const RefLinked<P1>& rhs) 
+        : Private::RefLinkedBase(rhs)
+        {}
+
+        static P Clone(const P& val)
+        { return val; }
+
+        bool Release(const P&)
+        { return Private::RefLinkedBase::Release(); }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template DestructiveCopy
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements destructive copy semantics (a la std::auto_ptr)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class DestructiveCopy
+    {
+    public:
+        DestructiveCopy()
+        {}
+        
+        template <class P1>
+        DestructiveCopy(const DestructiveCopy<P1>&)
+        {}
+        
+        template <class P1>
+        static P Clone(P1& val)
+        {
+            P result(val);
+            val = P1();
+            return result;
+        }
+        
+        static bool Release(const P&)
+        { return true; }
+        
+        static void Swap(DestructiveCopy&)
+        {}
+        
+        enum { destructiveCopy = true };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template NoCopy
+// Implementation of the OwnershipPolicy used by SmartPtr
+// Implements a policy that doesn't allow copying objects
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    class NoCopy
+    {
+    public:
+        NoCopy()
+        {}
+        
+        template <class P1>
+        NoCopy(const NoCopy<P1>&)
+        {}
+        
+        static P Clone(const P&)
+        {
+            CT_ASSERT(false, This_Policy_Disallows_Value_Copying);
+        }
+        
+        static bool Release(const P&)
+        { return true; }
+        
+        static void Swap(NoCopy&)
+        {}
+        
+        enum { destructiveCopy = false };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template AllowConversion
+// Implementation of the ConversionPolicy used by SmartPtr
+// Allows implicit conversion from SmartPtr to the pointee type
+////////////////////////////////////////////////////////////////////////////////
+
+    struct AllowConversion
+    {
+        enum { allow = true };
+
+        void Swap(AllowConversion&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DisallowConversion
+// Implementation of the ConversionPolicy used by SmartPtr
+// Does not allow implicit conversion from SmartPtr to the pointee type
+// You can initialize a DisallowConversion with an AllowConversion
+////////////////////////////////////////////////////////////////////////////////
+
+    struct DisallowConversion
+    {
+        DisallowConversion()
+        {}
+        
+        DisallowConversion(const AllowConversion&)
+        {}
+        
+        enum { allow = false };
+
+        void Swap(DisallowConversion&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template NoCheck
+// Implementation of the CheckingPolicy used by SmartPtr
+// Well, it's clear what it does :o)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct NoCheck
+    {
+        NoCheck()
+        {}
+        
+        template <class P1>
+        NoCheck(const NoCheck<P1>&)
+        {}
+        
+        static void OnDefault(const P&)
+        {}
+
+        static void OnInit(const P&)
+        {}
+
+        static void OnDereference(const P&)
+        {}
+
+        static void Swap(NoCheck&)
+        {}
+    };
+
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AssertCheck
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct AssertCheck
+    {
+        AssertCheck()
+        {}
+        
+        template <class P1>
+        AssertCheck(const AssertCheck<P1>&)
+        {}
+        
+        template <class P1>
+        AssertCheck(const NoCheck<P1>&)
+        {}
+        
+        static void OnDefault(const P&)
+        {}
+
+        static void OnInit(const P&)
+        {}
+
+        static void OnDereference(P val)
+        { assert(val); }
+
+        static void Swap(AssertCheck&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template AssertCheckStrict
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer against zero upon initialization and before dereference
+// You can initialize an AssertCheckStrict with an AssertCheck 
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct AssertCheckStrict
+    {
+        AssertCheckStrict()
+        {}
+        
+        template <class U>
+        AssertCheckStrict(const AssertCheckStrict<U>&)
+        {}
+        
+        template <class U>
+        AssertCheckStrict(const AssertCheck<U>&)
+        {}
+        
+        template <class P1>
+        AssertCheckStrict(const NoCheck<P1>&)
+        {}
+        
+        static void OnDefault(P val)
+        { assert(val); }
+        
+        static void OnInit(P val)
+        { assert(val); }
+        
+        static void OnDereference(P val)
+        { assert(val); }
+        
+        static void Swap(AssertCheckStrict&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class NullPointerException
+// Used by some implementations of the CheckingPolicy used by SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    struct NullPointerException : public std::runtime_error
+    {
+        NullPointerException() : std::runtime_error("")
+        { }
+        const char* what() const throw()
+        { return "Null Pointer Exception"; }
+    };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template RejectNullStatic
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer upon initialization and before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct RejectNullStatic
+    {
+        RejectNullStatic()
+        {}
+        
+        template <class P1>
+        RejectNullStatic(const RejectNullStatic<P1>&)
+        {}
+        
+        template <class P1>
+        RejectNullStatic(const NoCheck<P1>&)
+        {}
+        
+        template <class P1>
+        RejectNullStatic(const AssertCheck<P1>&)
+        {}
+        
+        template <class P1>
+        RejectNullStatic(const AssertCheckStrict<P1>&)
+        {}
+        
+        static void OnDefault(const P&)
+        {
+            CompileTimeError<false>
+                ERROR_This_Policy_Does_Not_Allow_Default_Initialization;
+        }
+        
+        static void OnInit(const P& val)
+        { if (!val) throw NullPointerException(); }
+        
+        static void OnDereference(const P& val)
+        { if (!val) throw NullPointerException(); }
+        
+        static void Swap(RejectNullStatic&)
+        {}
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template RejectNull
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct RejectNull
+    {
+        RejectNull()
+        {}
+        
+        template <class P1>
+        RejectNull(const RejectNull<P1>&)
+        {}
+        
+        static void OnInit(P val)
+        { if (!val) throw NullPointerException(); }
+
+        static void OnDefault(P val)
+        { OnInit(val); }
+        
+        void OnDereference(P val)
+        { OnInit(val); }
+        
+        void Swap(RejectNull&)
+        {}        
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template RejectNullStrict
+// Implementation of the CheckingPolicy used by SmartPtr
+// Checks the pointer upon initialization and before dereference
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class P>
+    struct RejectNullStrict
+    {
+        RejectNullStrict()
+        {}
+        
+        template <class P1>
+        RejectNullStrict(const RejectNullStrict<P1>&)
+        {}
+        
+        template <class P1>
+        RejectNullStrict(const RejectNull<P1>&)
+        {}
+        
+        static void OnInit(P val)
+        { if (!val) throw NullPointerException(); }
+
+        void OnDereference(P val)
+        { OnInit(val); }
+        
+        void Swap(RejectNullStrict&)
+        {}        
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ByRef
+// Transports a reference as a value
+// Serves to implement the Colvin/Gibbons trick for SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T>
+    class ByRef
+    {
+    public:
+        ByRef(T& v) : value_(v) {}
+        operator T&() { return value_; }
+        // gcc doesn't like this:
+        // operator const T&() const { return value_; }
+    private:
+        T& value_;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SmartPtr (declaration)
+// The reason for all the fuss above
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OwnershipPolicy = RefCounted,
+        class ConversionPolicy = DisallowConversion,
+        template <class> class CheckingPolicy = AssertCheck,
+        template <class> class StoragePolicy = DefaultSPStorage
+    >
+    class SmartPtr;
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SmartPtr (definition)
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OwnershipPolicy,
+        class ConversionPolicy,
+        template <class> class CheckingPolicy,
+        template <class> class StoragePolicy
+    >
+    class SmartPtr
+        : public StoragePolicy<T>
+        , public OwnershipPolicy<typename StoragePolicy<T>::PointerType>
+        , public CheckingPolicy<typename StoragePolicy<T>::StoredType>
+        , public ConversionPolicy
+    {
+        typedef StoragePolicy<T> SP;
+        typedef OwnershipPolicy<typename StoragePolicy<T>::PointerType> OP;
+        typedef CheckingPolicy<typename StoragePolicy<T>::StoredType> KP;
+        typedef ConversionPolicy CP;
+        
+    public:
+        typedef typename SP::PointerType PointerType;
+        typedef typename SP::StoredType StoredType;
+        typedef typename SP::ReferenceType ReferenceType;
+        
+        typedef typename Select<OP::destructiveCopy, 
+                SmartPtr, const SmartPtr>::Result
+            CopyArg;
+    
+        SmartPtr()
+        { KP::OnDefault(GetImpl(*this)); }
+    	
+        SmartPtr(const StoredType& p) : SP(p)
+        { KP::OnInit(GetImpl(*this)); }
+    	
+    	SmartPtr(CopyArg& rhs)
+        : SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+        { GetImplRef(*this) = OP::Clone(GetImplRef(rhs)); }
+
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+    	SmartPtr(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+    	: SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+    	{ GetImplRef(*this) = OP::Clone(GetImplRef(rhs)); }
+
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+    	SmartPtr(SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+    	: SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+    	{ GetImplRef(*this) = OP::Clone(GetImplRef(rhs)); }
+
+        SmartPtr(ByRef<SmartPtr> rhs)
+    	: SP(rhs), OP(rhs), KP(rhs), CP(rhs)
+        {}
+        
+        operator ByRef<SmartPtr>()
+        { return ByRef<SmartPtr>(*this); }
+
+    	SmartPtr& operator=(CopyArg& rhs)
+    	{
+    	    SmartPtr temp(rhs);
+    	    temp.Swap(*this);
+    	    return *this;
+    	}
+
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+    	SmartPtr& operator=(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+    	{
+    	    SmartPtr temp(rhs);
+    	    temp.Swap(*this);
+    	    return *this;
+    	}
+    	
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+    	SmartPtr& operator=(SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs)
+    	{
+    	    SmartPtr temp(rhs);
+    	    temp.Swap(*this);
+    	    return *this;
+    	}
+    	
+    	void Swap(SmartPtr& rhs)
+    	{
+    	    OP::Swap(rhs);
+    	    CP::Swap(rhs);
+    	    KP::Swap(rhs);
+    	    SP::Swap(rhs);
+    	}
+    	
+    	~SmartPtr()
+    	{
+    	    if (OP::Release(GetImpl(*static_cast<SP*>(this))))
+    	    {
+    	        SP::Destroy();
+    	    }
+    	}
+    	
+    	friend inline void Release(SmartPtr& sp, typename SP::StoredType& p)
+    	{
+    	    p = GetImplRef(sp);
+    	    GetImplRef(sp) = SP::Default();
+    	}
+    	
+    	friend inline void Reset(SmartPtr& sp, typename SP::StoredType p)
+    	{ SmartPtr(p).Swap(sp); }
+
+        PointerType operator->()
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator->();
+        }
+
+        PointerType operator->() const
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator->();
+        }
+
+        ReferenceType operator*()
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator*();
+        }
+    	
+        ReferenceType operator*() const
+        {
+            KP::OnDereference(GetImplRef(*this));
+            return SP::operator*();
+        }
+    	
+        bool operator!() const // Enables "if (!sp) ..."
+        { return GetImpl(*this) == 0; }
+        
+        inline friend bool operator==(const SmartPtr& lhs,
+            const T* rhs)
+        { return GetImpl(lhs) == rhs; }
+        
+        inline friend bool operator==(const T* lhs,
+            const SmartPtr& rhs)
+        { return rhs == lhs; }
+        
+        inline friend bool operator!=(const SmartPtr& lhs,
+            const T* rhs)
+        { return !(lhs == rhs); }
+        
+        inline friend bool operator!=(const T* lhs,
+            const SmartPtr& rhs)
+        { return rhs != lhs; }
+
+        // Ambiguity buster
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+        bool operator==(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs) const
+        { return *this == GetImpl(rhs); }
+
+        // Ambiguity buster
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+        bool operator!=(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs) const
+        { return !(*this == rhs); }
+
+        // Ambiguity buster
+        template
+        <
+            typename T1,
+            template <class> class OP1,
+            class CP1,
+            template <class> class KP1,
+            template <class> class SP1
+        >
+        bool operator<(const SmartPtr<T1, OP1, CP1, KP1, SP1>& rhs) const
+        { return *this < GetImpl(rhs); }
+
+    private:
+        // Helper for enabling 'if (sp)'
+        struct Tester
+        {
+            Tester() {}
+        private:
+            void operator delete(void*);
+        };
+        
+    public:
+        // enable 'if (sp)'
+        operator Tester*() const
+        {
+            if (!*this) return 0;
+            static Tester t;
+            return &t;
+        }
+
+    private:
+        // Helper for disallowing automatic conversion
+        struct Insipid
+        {
+            Insipid(PointerType) {}
+        };
+        
+        typedef typename Select<CP::allow, PointerType, Insipid>::Result
+            AutomaticConversionResult;
+    
+    public:        
+        operator AutomaticConversionResult() const
+        { return GetImpl(*this); }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// free comparison operators for class template SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////
+// operator== for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator==(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return GetImpl(lhs) == rhs; }
+    
+////////////////////////////////////////////////////////////////////////////////
+// operator== for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator==(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return rhs == lhs; }
+
+////////////////////////////////////////////////////////////////////////////////
+// operator!= for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator!=(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return !(lhs == rhs); }
+    
+////////////////////////////////////////////////////////////////////////////////
+// operator!= for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator!=(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return rhs != lhs; }
+
+////////////////////////////////////////////////////////////////////////////////
+// operator< for lhs = SmartPtr, rhs = raw pointer -- NOT DEFINED
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator<(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs);
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator< for lhs = raw pointer, rhs = SmartPtr -- NOT DEFINED
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator<(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs);
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator> for lhs = SmartPtr, rhs = raw pointer -- NOT DEFINED
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator>(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return rhs < lhs; }
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator> for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator>(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return rhs < lhs; }
+  
+////////////////////////////////////////////////////////////////////////////////
+// operator<= for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator<=(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return !(rhs < lhs); }
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator<= for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator<=(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return !(rhs < lhs); }
+
+////////////////////////////////////////////////////////////////////////////////
+// operator>= for lhs = SmartPtr, rhs = raw pointer
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator>=(const SmartPtr<T, OP, CP, KP, SP>& lhs,
+        const U* rhs)
+    { return !(lhs < rhs); }
+        
+////////////////////////////////////////////////////////////////////////////////
+// operator>= for lhs = raw pointer, rhs = SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP,
+        typename U
+    >
+    inline bool operator>=(const U* lhs,
+        const SmartPtr<T, OP, CP, KP, SP>& rhs)
+    { return !(lhs < rhs); }
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// specialization of std::less for SmartPtr
+////////////////////////////////////////////////////////////////////////////////
+
+namespace std
+{
+    template
+    <
+        typename T,
+        template <class> class OP,
+        class CP,
+        template <class> class KP,
+        template <class> class SP
+    >
+    struct less< Loki::SmartPtr<T, OP, CP, KP, SP> >
+        : public binary_function<Loki::SmartPtr<T, OP, CP, KP, SP>,
+            Loki::SmartPtr<T, OP, CP, KP, SP>, bool>
+    {
+        bool operator()(const Loki::SmartPtr<T, OP, CP, KP, SP>& lhs,
+            const Loki::SmartPtr<T, OP, CP, KP, SP>& rhs) const
+        { return less<T*>()(GetImpl(lhs), GetImpl(rhs)); }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// December 09, 2001: Included <cassert>
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // SMARTPTR_INC_
Index: avida/current/source/third-party/Loki/Reference/Threads.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/Threads.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/Threads.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,204 @@
+#ifndef THREADS_H_
+#define THREADS_H_
+
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFAULT_THREADING
+// Selects the default threading model for certain components of Loki
+// If you don't define it, it defaults to single-threaded
+// All classes in Loki have configurable threading model; DEFAULT_THREADING
+// affects only default template arguments
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef DEFAULT_THREADING
+#define DEFAULT_THREADING /**/ ::Loki::SingleThreaded
+#endif
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template SingleThreaded
+// Implementation of the ThreadingModel policy used by various classes
+// Implements a single-threaded model; no synchronization
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class Host>
+    class SingleThreaded
+    {
+    public:
+        struct Lock
+        {
+            Lock() {}
+            Lock(const Host&) {}
+        };
+        
+        typedef Host VolatileType;
+
+        typedef int IntType; 
+
+        static IntType AtomicAdd(volatile IntType& lval, IntType val)
+        { return lval += val; }
+        
+        static IntType AtomicSubtract(volatile IntType& lval, IntType val)
+        { return lval -= val; }
+
+        static IntType AtomicMultiply(volatile IntType& lval, IntType val)
+        { return lval *= val; }
+        
+        static IntType AtomicDivide(volatile IntType& lval, IntType val)
+        { return lval /= val; }
+        
+        static IntType AtomicIncrement(volatile IntType& lval)
+        { return ++lval; }
+        
+        static IntType AtomicDecrement(volatile IntType& lval)
+        { return lval --= val; }
+        
+        static void AtomicAssign(volatile IntType & lval, IntType val)
+        { lval = val; }
+        
+        static void AtomicAssign(IntType & lval, volatile IntType & val)
+        { lval = val; }
+    };
+    
+#ifdef _WINDOWS_
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ObjectLevelLockable
+// Implementation of the ThreadingModel policy used by various classes
+// Implements a object-level locking scheme
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class Host>
+    class ObjectLevelLockable
+    {
+        CRITICAL_SECTION mtx_;
+
+    public:
+        ObjectLevelLockable()
+        {
+            ::InitializeCriticalSection(&mtx_);
+        }
+
+        ~ObjectLevelLockable()
+        {
+            ::DeleteCriticalSection(&mtx_);
+        }
+
+        class Lock;
+        friend class Lock;
+        
+        class Lock
+        {
+            ObjectLevelLockable& host_;
+            
+            Lock(const Lock&);
+            Lock& operator=(const Lock&);
+        public:
+            Lock(Host& host) : host_(host)
+            {
+                ::EnterCriticalSection(&host_.mtx_);
+            }
+            ~Lock()
+            {
+                ::LeaveCriticalSection(&host_.mtx_);
+            }
+        };
+
+        typedef volatile Host VolatileType;
+
+        typedef LONG IntType; 
+
+        static IntType AtomicIncrement(volatile IntType& lval)
+        { return InterlockedIncrement(&const_cast<IntType&>(lval)); }
+        
+        static IntType AtomicDecrement(volatile IntType& lval)
+        { return InterlockedDecrement(&const_cast<IntType&>(lval)); }
+        
+        static void AtomicAssign(volatile IntType& lval, IntType val)
+        { InterlockedExchange(&const_cast<IntType&>(lval), val); }
+        
+        static void AtomicAssign(IntType& lval, volatile IntType& val)
+        { InterlockedExchange(&lval, val); }
+    };
+    
+    template <class Host>
+    class ClassLevelLockable
+    {
+        static CRITICAL_SECTION mtx_;
+
+        struct Initializer;
+        friend struct Initializer;
+        struct Initializer
+        {
+            Initializer()
+            {
+                ::InitializeCriticalSection(&mtx_);
+            }
+            ~Initializer()
+            {
+                ::DeleteCriticalSection(&mtx_);
+            }
+        };
+        
+        static Initializer initializer_;
+
+    public:
+        class Lock;
+        friend class Lock;
+        
+        class Lock
+        {
+            Lock(const Lock&);
+            Lock& operator=(const Lock&);
+        public:
+            Lock()
+            {
+                ::EnterCriticalSection(&mtx_);
+            }
+            Lock(Host&)
+            {
+                ::EnterCriticalSection(&mtx_);
+            }
+            ~Lock()
+            {
+                ::LeaveCriticalSection(&mtx_);
+            }
+        };
+
+        typedef volatile Host VolatileType;
+
+        typedef LONG IntType; 
+
+        static IntType AtomicIncrement(volatile IntType& lval)
+        { return InterlockedIncrement(&const_cast<IntType&>(lval)); }
+        
+        static IntType AtomicDecrement(volatile IntType& lval)
+        { return InterlockedDecrement(&const_cast<IntType&>(lval)); }
+        
+        static void AtomicAssign(volatile IntType& lval, IntType val)
+        { InterlockedExchange(&const_cast<IntType&>(lval), val); }
+        
+        static void AtomicAssign(IntType& lval, volatile IntType& val)
+        { InterlockedExchange(&lval, val); }
+    };
+    
+    template <class Host>
+    CRITICAL_SECTION ClassLevelLockable<Host>::mtx_;
+    
+    template <class Host>
+    typename ClassLevelLockable<Host>::Initializer 
+    ClassLevelLockable<Host>::initializer_;
+    
+#endif    
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// January 10, 2002: Fixed bug in AtomicDivide - credit due to Jordi Guerrero
+// August 14, 2002: Changed some AtomicDivide's to AtomicDecrement's MKH
+////////////////////////////////////////////////////////////////////////////////
+
+#endif
Index: avida/current/source/third-party/Loki/Reference/Tuple.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/Tuple.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/Tuple.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,22 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+////////////////////////////////////////////////////////////////////////////////
+// This file is intentionally left empty
+// Due to compiler limitations, its contents has been moved to
+//     HierarchyGenerators.h 
+////////////////////////////////////////////////////////////////////////////////
Index: avida/current/source/third-party/Loki/Reference/TypeInfo.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/TypeInfo.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/TypeInfo.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,106 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef TYPEINFO_INC_
+#define TYPEINFO_INC_
+
+#include <typeinfo>
+#include <cassert>
+#include "Typelist.h"
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class TypeInfo
+// Purpose: offer a first-class, comparable wrapper over std::type_info
+////////////////////////////////////////////////////////////////////////////////
+
+    class TypeInfo
+    {
+    public:
+        // Constructors
+        TypeInfo(); // needed for containers
+        TypeInfo(const std::type_info&); // non-explicit
+
+        // Access for the wrapped std::type_info
+        const std::type_info& Get() const;
+        // Compatibility functions
+        bool before(const TypeInfo& rhs) const;
+        const char* name() const;
+
+    private:
+        const std::type_info* pInfo_;
+    };
+    
+// Implementation
+    
+    inline TypeInfo::TypeInfo()
+    {
+        class Nil {};
+        pInfo_ = &typeid(Nil);
+        assert(pInfo_);
+    }
+    
+    inline TypeInfo::TypeInfo(const std::type_info& ti)
+    : pInfo_(&ti)
+    { assert(pInfo_); }
+    
+    inline bool TypeInfo::before(const TypeInfo& rhs) const
+    {
+        assert(pInfo_);
+        return pInfo_->before(*rhs.pInfo_);
+    }
+
+    inline const std::type_info& TypeInfo::Get() const
+    {
+        assert(pInfo_);
+        return *pInfo_;
+    }
+    
+    inline const char* TypeInfo::name() const
+    {
+        assert(pInfo_);
+        return pInfo_->name();
+    }
+
+// Comparison operators
+    
+    inline bool operator==(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return lhs.Get() == rhs.Get(); }
+
+    inline bool operator<(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return lhs.before(rhs); }
+
+    inline bool operator!=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs == rhs); }    
+    
+    inline bool operator>(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return rhs < lhs; }
+    
+    inline bool operator<=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs > rhs); }
+     
+    inline bool operator>=(const TypeInfo& lhs, const TypeInfo& rhs)
+    { return !(lhs < rhs); }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPEINFO_INC_
Index: avida/current/source/third-party/Loki/Reference/TypeManip.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/TypeManip.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/TypeManip.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,217 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: November 22, 2001
+
+#ifndef TYPEMANIP_INC_
+#define TYPEMANIP_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template Int2Type
+// Converts each integral constant into a unique type
+// Invocation: Int2Type<v> where v is a compile-time constant integral
+// Defines 'value', an enum that evaluates to v
+////////////////////////////////////////////////////////////////////////////////
+
+    template <int v>
+    struct Int2Type
+    {
+        enum { value = v };
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template Type2Type
+// Converts each type into a unique, insipid type
+// Invocation Type2Type<T> where T is a type
+// Defines the type OriginalType which maps back to T
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct Type2Type
+    {
+        typedef T OriginalType;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template Select
+// Selects one of two types based upon a boolean constant
+// Invocation: Select<flag, T, U>::Result
+// where:
+// flag is a compile-time boolean constant
+// T and U are types
+// Result evaluates to T if flag is true, and to U otherwise.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <bool flag, typename T, typename U>
+    struct Select
+    {
+        typedef T Result;
+    };
+    template <typename T, typename U>
+    struct Select<false, T, U>
+    {
+        typedef U Result;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// Helper types Small and Big - guarantee that sizeof(Small) < sizeof(Big)
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        template <class T, class U>
+        struct ConversionHelper
+        {
+            typedef char Small;
+            struct Big { char dummy[2]; };
+            static Big   Test(...);
+            static Small Test(U);
+            static T MakeT();
+        };
+    }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Conversion
+// Figures out the conversion relationships between two types
+// Invocations (T and U are types):
+// a) Conversion<T, U>::exists
+// returns (at compile time) true if there is an implicit conversion from T
+// to U (example: Derived to Base)
+// b) Conversion<T, U>::exists2Way
+// returns (at compile time) true if there are both conversions from T
+// to U and from U to T (example: int to char and back)
+// c) Conversion<T, U>::sameType
+// returns (at compile time) true if T and U represent the same type
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, class U>
+    struct Conversion
+    {
+        typedef Private::ConversionHelper<T, U> H;
+#ifndef __MWERKS__
+        enum { exists = sizeof(typename H::Small) == sizeof((H::Test(H::MakeT()))) };
+#else
+        enum { exists = false };
+#endif
+        enum { exists2Way = exists && Conversion<U, T>::exists };
+        enum { sameType = false };
+    };
+    
+    template <class T>
+    struct Conversion<T, T>    
+    {
+        enum { exists = 1, exists2Way = 1, sameType = 1 };
+    };
+    
+    template <class T>
+    struct Conversion<void, T>    
+    {
+        enum { exists = 0, exists2Way = 0, sameType = 0 };
+    };
+    
+    template <class T>
+    struct Conversion<T, void>    
+    {
+        enum { exists = 1, exists2Way = 0, sameType = 0 };
+    };
+    
+    template <>
+    class Conversion<void, void>    
+    {
+    public:
+        enum { exists = 1, exists2Way = 1, sameType = 1 };
+    };
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SuperSubclass
+// Invocation: SuperSubclass<B, D>::value where B and D are types. 
+// Returns true if B is a public base of D, or if B and D are aliases of the 
+// same type.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+template <class T, class U>
+struct SuperSubclass
+{
+  enum { value = (::Loki::Conversion<const volatile U*, const volatile T*>::exists &&
+                  !::Loki::Conversion<const volatile T*, const volatile void*>::sameType) };
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// macro SUPERSUBCLASS
+// Invocation: SUPERSUBCLASS(B, D) where B and D are types. 
+// Returns true if B is a public base of D, or if B and D are aliases of the 
+// same type.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+// Deprecated: Use SuperSubclass class template instead.
+////////////////////////////////////////////////////////////////////////////////
+
+#define SUPERSUBCLASS(T, U) \
+    (::Loki::Conversion<const volatile U*, const volatile T*>::exists && \
+    !::Loki::Conversion<const volatile T*, const volatile void*>::sameType)
+
+////////////////////////////////////////////////////////////////////////////////
+// class template SuperSubclassStrict
+// Invocation: SuperSubclassStrict<B, D>::value where B and D are types. 
+// Returns true if B is a public base of D.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+////////////////////////////////////////////////////////////////////////////////
+
+template<class T,class U>
+struct SuperSubclassStrict
+{
+  enum { value = (::Loki::Conversion<const volatile U*, const volatile T*>::exists &&
+                 !::Loki::Conversion<const volatile T*, const volatile void*>::sameType &&
+                 !::Loki::Conversion<const volatile T*, const volatile U*>::sameType) };
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// macro SUPERSUBCLASS_STRICT
+// Invocation: SUPERSUBCLASS(B, D) where B and D are types. 
+// Returns true if B is a public base of D.
+//
+// Caveat: might not work if T and U are in a private inheritance hierarchy.
+// Deprecated: Use SuperSubclassStrict class template instead.
+////////////////////////////////////////////////////////////////////////////////
+
+#define SUPERSUBCLASS_STRICT(T, U) \
+    (SUPERSUBCLASS(T, U) && \
+    !::Loki::Conversion<const volatile T*, const volatile U*>::sameType)
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// November 22, 2001: minor change to support porting to boost
+// November 22, 2001: fixed bug in Conversion<void, T>
+//      (credit due to Brad Town)
+// November 23, 2001: (well it's 12:01 am) fixed bug in SUPERSUBCLASS - added
+//      the volatile qualifier to be 100% politically correct
+// September 16, 2002: Changed "const volatile" to "const volatile *", to enable
+//     conversion to succeed. Done earlier by MKH.
+//     Added SuperSubclass and SuperSubclassStrict templates. The corresponding
+//     macros are deprecated.
+//     Added extra parenthesis in sizeof in Conversion, to disambiguate function
+//     call from function declaration. T.S.
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPEMANIP_INC_
Index: avida/current/source/third-party/Loki/Reference/TypeTraits.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/TypeTraits.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/TypeTraits.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,252 @@
+#ifndef TYPETRAITS_INC_
+#define TYPETRAITS_INC_
+
+#include "Typelist.h"
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomUnsignedInt
+// Offers a means to integrate nonstandard built-in unsigned integral types
+// (such as unsigned __int64 or unsigned long long int) with the TypeTraits 
+//     class template defined below.
+// Invocation: IsCustomUnsignedInt<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in unsigned
+//     integral type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomUnsignedInt
+    {
+        enum { value = 0 };
+    };        
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomSignedInt
+// Offers a means to integrate nonstandard built-in unsigned integral types
+// (such as unsigned __int64 or unsigned long long int) with the TypeTraits 
+//     class template defined below.
+// Invocation: IsCustomSignedInt<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in signed
+//     integral type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomSignedInt
+    {
+        enum { value = 0 };
+    };        
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IsCustomFloat
+// Offers a means to integrate nonstandard floating point types with the
+//     TypeTraits class template defined below.
+// Invocation: IsCustomFloat<T> where T is any type
+// Defines 'value', an enum that is 1 iff T is a custom built-in
+//     floating point type
+// Specialize this class template for nonstandard unsigned integral types
+//     and define value = 1 in those specializations
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    struct IsCustomFloat
+    {
+        enum { value = 0 };
+    };        
+
+////////////////////////////////////////////////////////////////////////////////
+// Helper types for class template TypeTraits defined below
+////////////////////////////////////////////////////////////////////////////////
+
+    namespace Private
+    {
+        typedef TYPELIST_4(unsigned char, unsigned short int,
+           unsigned int, unsigned long int) StdUnsignedInts;
+        typedef TYPELIST_4(signed char, short int,
+           int, long int) StdSignedInts;
+        typedef TYPELIST_3(bool, char, wchar_t) StdOtherInts;
+        typedef TYPELIST_3(float, double, long double) StdFloats;
+
+        template <class U> struct AddReference
+        {
+            typedef U & Result;
+        };
+
+        template <class U> struct AddReference<U &>
+        {
+            typedef U & Result;
+        };
+
+        template <> struct AddReference<void>
+        {
+            typedef NullType Result;
+        };
+    }
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeTraits
+// Figures out various properties of any given type
+// Invocations (T is a type):
+// a) TypeTraits<T>::isPointer
+// returns (at compile time) true if T is a pointer type
+// b) TypeTraits<T>::PointeeType
+// returns the type to which T points is T is a pointer type, NullType otherwise
+// a) TypeTraits<T>::isReference
+// returns (at compile time) true if T is a reference type
+// b) TypeTraits<T>::ReferredType
+// returns the type to which T refers is T is a reference type, NullType
+// otherwise
+// c) TypeTraits<T>::isMemberPointer
+// returns (at compile time) true if T is a pointer to member type
+// d) TypeTraits<T>::isStdUnsignedInt
+// returns (at compile time) true if T is a standard unsigned integral type
+// e) TypeTraits<T>::isStdSignedInt
+// returns (at compile time) true if T is a standard signed integral type
+// f) TypeTraits<T>::isStdIntegral
+// returns (at compile time) true if T is a standard integral type
+// g) TypeTraits<T>::isStdFloat
+// returns (at compile time) true if T is a standard floating-point type
+// h) TypeTraits<T>::isStdArith
+// returns (at compile time) true if T is a standard arithmetic type
+// i) TypeTraits<T>::isStdFundamental
+// returns (at compile time) true if T is a standard fundamental type
+// j) TypeTraits<T>::isUnsignedInt
+// returns (at compile time) true if T is a unsigned integral type
+// k) TypeTraits<T>::isSignedInt
+// returns (at compile time) true if T is a signed integral type
+// l) TypeTraits<T>::isIntegral
+// returns (at compile time) true if T is a integral type
+// m) TypeTraits<T>::isFloat
+// returns (at compile time) true if T is a floating-point type
+// n) TypeTraits<T>::isArith
+// returns (at compile time) true if T is a arithmetic type
+// o) TypeTraits<T>::isFundamental
+// returns (at compile time) true if T is a fundamental type
+// p) TypeTraits<T>::ParameterType
+// returns the optimal type to be used as a parameter for functions that take Ts
+// q) TypeTraits<T>::isConst
+// returns (at compile time) true if T is a const-qualified type
+// r) TypeTraits<T>::NonConstType
+// removes the 'const' qualifier from T, if any
+// s) TypeTraits<T>::isVolatile
+// returns (at compile time) true if T is a volatile-qualified type
+// t) TypeTraits<T>::NonVolatileType
+// removes the 'volatile' qualifier from T, if any
+// u) TypeTraits<T>::UnqualifiedType
+// removes both the 'const' and 'volatile' qualifiers from T, if any
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename T>
+    class TypeTraits
+    {
+    private:
+        template <class U> struct PointerTraits
+        {
+            enum { result = false };
+            typedef NullType PointeeType;
+        };
+        
+        template <class U> struct PointerTraits<U*>
+        {
+            enum { result = true };
+            typedef U PointeeType;
+        };
+        
+        template <class U> struct ReferenceTraits
+        {
+            enum { result = false };
+            typedef U ReferredType;
+        };
+        
+        template <class U> struct ReferenceTraits<U&>
+        {
+            enum { result = true };
+            typedef U ReferredType;
+        };
+        
+        template <class U> struct PToMTraits
+        {
+            enum { result = false };
+        };
+        
+        template <class U, class V>
+        struct PToMTraits<U V::*>
+        {
+            enum { result = true };
+        };
+
+        template <class U> struct UnConst
+        {
+            typedef U Result;
+            enum { isConst = 0 };
+        };
+        
+        template <class U> struct UnConst<const U>
+        {
+            typedef U Result;
+            enum { isConst = 1 };
+        };
+
+        template <class U> struct UnVolatile
+        {
+            typedef U Result;
+            enum { isVolatile = 0 };
+        };
+        
+        template <class U> struct UnVolatile<volatile U>
+        {
+            typedef U Result;
+            enum { isVolatile = 1 };
+        };
+
+    public:
+        enum { isPointer = PointerTraits<T>::result };
+        typedef typename PointerTraits<T>::PointeeType PointeeType;
+
+        enum { isReference = ReferenceTraits<T>::result };
+        typedef typename ReferenceTraits<T>::ReferredType ReferredType;
+        
+        enum { isMemberPointer = PToMTraits<T>::result };
+    
+        enum { isStdUnsignedInt = 
+            TL::IndexOf<Private::StdUnsignedInts, T>::value >= 0 };
+        enum { isStdSignedInt = 
+            TL::IndexOf<Private::StdSignedInts, T>::value >= 0 };
+        enum { isStdIntegral = isStdUnsignedInt || isStdSignedInt ||
+            TL::IndexOf<Private::StdOtherInts, T>::value >= 0 };
+        enum { isStdFloat = TL::IndexOf<Private::StdFloats, T>::value >= 0 };
+        enum { isStdArith = isStdIntegral || isStdFloat };
+        enum { isStdFundamental = isStdArith || isStdFloat || 
+            Conversion<T, void>::sameType };
+            
+        enum { isUnsignedInt = isStdUnsignedInt || IsCustomUnsignedInt<T>::value };
+        enum { isSignedInt = isStdSignedInt || IsCustomSignedInt<T>::value };
+        enum { isIntegral = isStdIntegral || isUnsignedInt || isSignedInt };
+        enum { isFloat = isStdFloat || IsCustomFloat<T>::value };
+        enum { isArith = isIntegral || isFloat };
+        enum { isFundamental = isStdFundamental || isArith || isFloat };
+        
+        typedef typename Select<isStdArith || isPointer || isMemberPointer,
+            T, typename Private::AddReference<T>::Result>::Result ParameterType;
+        
+        enum { isConst = UnConst<T>::isConst };
+        typedef typename UnConst<T>::Result NonConstType;
+        enum { isVolatile = UnVolatile<T>::isVolatile };
+        typedef typename UnVolatile<T>::Result NonVolatileType;
+        typedef typename UnVolatile<typename UnConst<T>::Result>::Result 
+            UnqualifiedType;
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// September 16, 2002: ParameterType fixed, as TypeTraits<void> made
+//     ParameterType give error about reference to void. T.S.
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPETRAITS_INC_
Index: avida/current/source/third-party/Loki/Reference/Typelist.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/Typelist.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/Typelist.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,757 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Welsey Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: November 22, 2001
+
+#ifndef TYPELIST_INC_
+#define TYPELIST_INC_
+
+#include "NullType.h"
+#include "TypeManip.h"
+
+////////////////////////////////////////////////////////////////////////////////
+// macros TYPELIST_1, TYPELIST_2, ... TYPELIST_50
+// Each takes a number of arguments equal to its numeric suffix
+// The arguments are type names. TYPELIST_NN generates a typelist containing 
+//     all types passed as arguments, in that order.
+// Example: TYPELIST_2(char, int) generates a type containing char and int.
+////////////////////////////////////////////////////////////////////////////////
+
+#define TYPELIST_1(T1) ::Loki::Typelist<T1, ::Loki::NullType>
+
+#define TYPELIST_2(T1, T2) ::Loki::Typelist<T1, TYPELIST_1(T2) >
+
+#define TYPELIST_3(T1, T2, T3) ::Loki::Typelist<T1, TYPELIST_2(T2, T3) >
+
+#define TYPELIST_4(T1, T2, T3, T4) \
+    ::Loki::Typelist<T1, TYPELIST_3(T2, T3, T4) >
+
+#define TYPELIST_5(T1, T2, T3, T4, T5) \
+    ::Loki::Typelist<T1, TYPELIST_4(T2, T3, T4, T5) >
+
+#define TYPELIST_6(T1, T2, T3, T4, T5, T6) \
+    ::Loki::Typelist<T1, TYPELIST_5(T2, T3, T4, T5, T6) >
+
+#define TYPELIST_7(T1, T2, T3, T4, T5, T6, T7) \
+    ::Loki::Typelist<T1, TYPELIST_6(T2, T3, T4, T5, T6, T7) >
+
+#define TYPELIST_8(T1, T2, T3, T4, T5, T6, T7, T8) \
+    ::Loki::Typelist<T1, TYPELIST_7(T2, T3, T4, T5, T6, T7, T8) >
+
+#define TYPELIST_9(T1, T2, T3, T4, T5, T6, T7, T8, T9) \
+    ::Loki::Typelist<T1, TYPELIST_8(T2, T3, T4, T5, T6, T7, T8, T9) >
+
+#define TYPELIST_10(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) \
+    ::Loki::Typelist<T1, TYPELIST_9(T2, T3, T4, T5, T6, T7, T8, T9, T10) >
+
+#define TYPELIST_11(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) \
+    ::Loki::Typelist<T1, TYPELIST_10(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) >
+
+#define TYPELIST_12(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) \
+    ::Loki::Typelist<T1, TYPELIST_11(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12) >
+
+#define TYPELIST_13(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \
+    ::Loki::Typelist<T1, TYPELIST_12(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13) >
+
+#define TYPELIST_14(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14) \
+    ::Loki::Typelist<T1, TYPELIST_13(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14) >
+
+#define TYPELIST_15(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15) \
+    ::Loki::Typelist<T1, TYPELIST_14(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15) >
+
+#define TYPELIST_16(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16) \
+    ::Loki::Typelist<T1, TYPELIST_15(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16) >
+
+#define TYPELIST_17(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17) \
+    ::Loki::Typelist<T1, TYPELIST_16(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17) >
+
+#define TYPELIST_18(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18) \
+    ::Loki::Typelist<T1, TYPELIST_17(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18) >
+
+#define TYPELIST_19(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19) \
+    ::Loki::Typelist<T1, TYPELIST_18(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19) >
+
+#define TYPELIST_20(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) \
+    ::Loki::Typelist<T1, TYPELIST_19(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) >
+
+#define TYPELIST_21(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) \
+    ::Loki::Typelist<T1, TYPELIST_20(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) >
+
+#define TYPELIST_22(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) \
+    ::Loki::Typelist<T1, TYPELIST_21(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) >
+
+#define TYPELIST_23(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) \
+    ::Loki::Typelist<T1, TYPELIST_22(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) >
+
+#define TYPELIST_24(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) \
+    ::Loki::Typelist<T1, TYPELIST_23(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) >
+
+#define TYPELIST_25(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25) \
+    ::Loki::Typelist<T1, TYPELIST_24(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25) >
+
+#define TYPELIST_26(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26) \
+    ::Loki::Typelist<T1, TYPELIST_25(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26) >
+
+#define TYPELIST_27(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27) \
+    ::Loki::Typelist<T1, TYPELIST_26(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27) >
+
+#define TYPELIST_28(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28) \
+    ::Loki::Typelist<T1, TYPELIST_27(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28) >
+
+#define TYPELIST_29(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29) \
+    ::Loki::Typelist<T1, TYPELIST_28(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29) >
+
+#define TYPELIST_30(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) \
+    ::Loki::Typelist<T1, TYPELIST_29(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) >
+
+#define TYPELIST_31(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) \
+    ::Loki::Typelist<T1, TYPELIST_30(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) >
+
+#define TYPELIST_32(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) \
+    ::Loki::Typelist<T1, TYPELIST_31(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) >
+
+#define TYPELIST_33(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) \
+    ::Loki::Typelist<T1, TYPELIST_32(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) >
+
+#define TYPELIST_34(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) \
+    ::Loki::Typelist<T1, TYPELIST_33(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) >
+
+#define TYPELIST_35(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35) \
+    ::Loki::Typelist<T1, TYPELIST_34(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35) >
+
+#define TYPELIST_36(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36) \
+    ::Loki::Typelist<T1, TYPELIST_35(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36) >
+
+#define TYPELIST_37(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37) \
+    ::Loki::Typelist<T1, TYPELIST_36(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37) >
+
+#define TYPELIST_38(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38) \
+    ::Loki::Typelist<T1, TYPELIST_37(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38) >
+
+#define TYPELIST_39(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39) \
+    ::Loki::Typelist<T1, TYPELIST_38(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39) >
+
+#define TYPELIST_40(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) \
+    ::Loki::Typelist<T1, TYPELIST_39(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) >
+
+#define TYPELIST_41(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) \
+    ::Loki::Typelist<T1, TYPELIST_40(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) >
+
+#define TYPELIST_42(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) \
+    ::Loki::Typelist<T1, TYPELIST_41(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) >
+
+#define TYPELIST_43(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) \
+    ::Loki::Typelist<T1, TYPELIST_42(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) >
+
+#define TYPELIST_44(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) \
+    ::Loki::Typelist<T1, TYPELIST_43(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) >
+
+#define TYPELIST_45(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45) \
+    ::Loki::Typelist<T1, TYPELIST_44(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45) >
+
+#define TYPELIST_46(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46) \
+    ::Loki::Typelist<T1, TYPELIST_45(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46) >
+
+#define TYPELIST_47(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47) \
+    ::Loki::Typelist<T1, TYPELIST_46(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47) >
+
+#define TYPELIST_48(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48) \
+    ::Loki::Typelist<T1, TYPELIST_47(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48) >
+
+#define TYPELIST_49(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49) \
+    ::Loki::Typelist<T1, TYPELIST_48(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49) >
+
+#define TYPELIST_50(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) \
+    ::Loki::Typelist<T1, TYPELIST_49(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
+        T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
+        T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
+        T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
+        T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) >
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// class template Typelist
+// The building block of typelists of any length
+// Use it through the TYPELIST_NN macros
+// Defines nested types:
+//     Head (first element, a non-typelist type by convention)
+//     Tail (second element, can be another typelist)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, class U>
+    struct Typelist
+    {
+       typedef T Head;
+       typedef U Tail;
+    };
+
+// Typelist utility algorithms
+
+    namespace TL
+    {
+////////////////////////////////////////////////////////////////////////////////
+// class template Length
+// Computes the length of a typelist
+// Invocation (TList is a typelist):
+// Length<TList>::value
+// returns a compile-time constant containing the length of TList, not counting
+//     the end terminator (which by convention is NullType)
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList> struct Length;
+        template <> struct Length<NullType>
+        {
+            enum { value = 0 };
+        };
+        
+        template <class T, class U>
+        struct Length< Typelist<T, U> >
+        {
+            enum { value = 1 + Length<U>::value };
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeAt
+// Finds the type at a given index in a typelist
+// Invocation (TList is a typelist and index is a compile-time integral 
+//     constant):
+// TypeAt<TList, index>::Result
+// returns the type in position 'index' in TList
+// If you pass an out-of-bounds index, the result is a compile-time error
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, unsigned int index> struct TypeAt;
+        
+        template <class Head, class Tail>
+        struct TypeAt<Typelist<Head, Tail>, 0>
+        {
+            typedef Head Result;
+        };
+
+        template <class Head, class Tail, unsigned int i>
+        struct TypeAt<Typelist<Head, Tail>, i>
+        {
+            typedef typename TypeAt<Tail, i - 1>::Result Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template TypeAtNonStrict
+// Finds the type at a given index in a typelist
+// Invocations (TList is a typelist and index is a compile-time integral 
+//     constant):
+// a) TypeAt<TList, index>::Result
+// returns the type in position 'index' in TList, or NullType if index is 
+//     out-of-bounds
+// b) TypeAt<TList, index, D>::Result
+// returns the type in position 'index' in TList, or D if index is out-of-bounds
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, unsigned int index,
+            typename DefaultType = NullType>
+        struct TypeAtNonStrict
+        {
+            typedef DefaultType Result;
+        };
+        
+        template <class Head, class Tail, typename DefaultType>
+        struct TypeAtNonStrict<Typelist<Head, Tail>, 0, DefaultType>
+        {
+            typedef Head Result;
+        };
+        
+        template <class Head, class Tail, unsigned int i, typename DefaultType>
+        struct TypeAtNonStrict<Typelist<Head, Tail>, i, DefaultType>
+        {
+            typedef typename 
+                TypeAtNonStrict<Tail, i - 1, DefaultType>::Result Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template IndexOf
+// Finds the index of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// IndexOf<TList, T>::value
+// returns the position of T in TList, or NullType if T is not found in TList
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T> struct IndexOf;
+        
+        template <class T>
+        struct IndexOf<NullType, T>
+        {
+            enum { value = -1 };
+        };
+        
+        template <class T, class Tail>
+        struct IndexOf<Typelist<T, Tail>, T>
+        {
+            enum { value = 0 };
+        };
+        
+        template <class Head, class Tail, class T>
+        struct IndexOf<Typelist<Head, Tail>, T>
+        {
+        private:
+            enum { temp = IndexOf<Tail, T>::value };
+        public:
+            enum { value = (temp == -1 ? -1 : 1 + temp) };
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Append
+// Appends a type or a typelist to another
+// Invocation (TList is a typelist and T is either a type or a typelist):
+// Append<TList, T>::Result
+// returns a typelist that is TList followed by T and NullType-terminated
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T> struct Append;
+        
+        template <> struct Append<NullType, NullType>
+        {
+            typedef NullType Result;
+        };
+        
+        template <class T> struct Append<NullType, T>
+        {
+            typedef TYPELIST_1(T) Result;
+        };
+        
+        template <class Head, class Tail>
+        struct Append<NullType, Typelist<Head, Tail> >
+        {
+            typedef Typelist<Head, Tail> Result;
+        };
+        
+        template <class Head, class Tail, class T>
+        struct Append<Typelist<Head, Tail>, T>
+        {
+            typedef Typelist<Head, 
+                    typename Append<Tail, T>::Result>
+                Result;
+        };
+        
+////////////////////////////////////////////////////////////////////////////////
+// class template Erase
+// Erases the first occurence, if any, of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// Erase<TList, T>::Result
+// returns a typelist that is TList without the first occurence of T
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T> struct Erase;
+        
+        template <class T>                         // Specialization 1
+        struct Erase<NullType, T>
+        {
+            typedef NullType Result;
+        };
+
+        template <class T, class Tail>             // Specialization 2
+        struct Erase<Typelist<T, Tail>, T>
+        {
+            typedef Tail Result;
+        };
+
+        template <class Head, class Tail, class T> // Specialization 3
+        struct Erase<Typelist<Head, Tail>, T>
+        {
+            typedef Typelist<Head, 
+                    typename Erase<Tail, T>::Result>
+                Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template EraseAll
+// Erases all first occurences, if any, of a type in a typelist
+// Invocation (TList is a typelist and T is a type):
+// EraseAll<TList, T>::Result
+// returns a typelist that is TList without any occurence of T
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T> struct EraseAll;
+        template <class T>
+        struct EraseAll<NullType, T>
+        {
+            typedef NullType Result;
+        };
+        template <class T, class Tail>
+        struct EraseAll<Typelist<T, Tail>, T>
+        {
+            // Go all the way down the list removing the type
+            typedef typename EraseAll<Tail, T>::Result Result;
+        };
+        template <class Head, class Tail, class T>
+        struct EraseAll<Typelist<Head, Tail>, T>
+        {
+            // Go all the way down the list removing the type
+            typedef Typelist<Head, 
+                    typename EraseAll<Tail, T>::Result>
+                Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template NoDuplicates
+// Removes all duplicate types in a typelist
+// Invocation (TList is a typelist):
+// NoDuplicates<TList, T>::Result
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList> struct NoDuplicates;
+        
+        template <> struct NoDuplicates<NullType>
+        {
+            typedef NullType Result;
+        };
+
+        template <class Head, class Tail>
+        struct NoDuplicates< Typelist<Head, Tail> >
+        {
+        private:
+            typedef typename NoDuplicates<Tail>::Result L1;
+            typedef typename Erase<L1, Head>::Result L2;
+        public:
+            typedef Typelist<Head, L2> Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Replace
+// Replaces the first occurence of a type in a typelist, with another type
+// Invocation (TList is a typelist, T, U are types):
+// Replace<TList, T, U>::Result
+// returns a typelist in which the first occurence of T is replaced with U
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T, class U> struct Replace;
+        
+        template <class T, class U>
+        struct Replace<NullType, T, U>
+        {
+            typedef NullType Result;
+        };
+
+        template <class T, class Tail, class U>
+        struct Replace<Typelist<T, Tail>, T, U>
+        {
+            typedef Typelist<U, Tail> Result;
+        };
+
+        template <class Head, class Tail, class T, class U>
+        struct Replace<Typelist<Head, Tail>, T, U>
+        {
+            typedef Typelist<Head,
+                    typename Replace<Tail, T, U>::Result>
+                Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template ReplaceAll
+// Replaces all occurences of a type in a typelist, with another type
+// Invocation (TList is a typelist, T, U are types):
+// Replace<TList, T, U>::Result
+// returns a typelist in which all occurences of T is replaced with U
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T, class U> struct ReplaceAll;
+        
+        template <class T, class U>
+        struct ReplaceAll<NullType, T, U>
+        {
+            typedef NullType Result;
+        };
+        
+        template <class T, class Tail, class U>
+        struct ReplaceAll<Typelist<T, Tail>, T, U>
+        {
+            typedef Typelist<U, typename ReplaceAll<Tail, T, U>::Result> Result;
+        };
+        
+        template <class Head, class Tail, class T, class U>
+        struct ReplaceAll<Typelist<Head, Tail>, T, U>
+        {
+            typedef Typelist<Head,
+                    typename ReplaceAll<Tail, T, U>::Result>
+                Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template Reverse
+// Reverses a typelist
+// Invocation (TList is a typelist):
+// Reverse<TList>::Result
+// returns a typelist that is TList reversed
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList> struct Reverse;
+        
+        template <>
+        struct Reverse<NullType>
+        {
+            typedef NullType Result;
+        };
+        
+        template <class Head, class Tail>
+        struct Reverse< Typelist<Head, Tail> >
+        {
+            typedef typename Append<
+                typename Reverse<Tail>::Result, Head>::Result Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template MostDerived
+// Finds the type in a typelist that is the most derived from a given type
+// Invocation (TList is a typelist, T is a type):
+// MostDerived<TList, T>::Result
+// returns the type in TList that's the most derived from T
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList, class T> struct MostDerived;
+        
+        template <class T>
+        struct MostDerived<NullType, T>
+        {
+            typedef T Result;
+        };
+        
+        template <class Head, class Tail, class T>
+        struct MostDerived<Typelist<Head, Tail>, T>
+        {
+        private:
+            typedef typename MostDerived<Tail, T>::Result Candidate;
+        public:
+            typedef typename Select<
+                SuperSubclass<Candidate,Head>::value,
+                    Head, Candidate>::Result Result;
+        };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template DerivedToFront
+// Arranges the types in a typelist so that the most derived types appear first
+// Invocation (TList is a typelist):
+// DerivedToFront<TList>::Result
+// returns the reordered TList 
+////////////////////////////////////////////////////////////////////////////////
+
+        template <class TList> struct DerivedToFront;
+        
+        template <>
+        struct DerivedToFront<NullType>
+        {
+            typedef NullType Result;
+        };
+        
+        template <class Head, class Tail>
+        struct DerivedToFront< Typelist<Head, Tail> >
+        {
+        private:
+            typedef typename MostDerived<Tail, Head>::Result
+                TheMostDerived;
+            typedef typename ReplaceAll<Tail, 
+                TheMostDerived, Head>::Result Temp;
+            typedef typename DerivedToFront<Temp>::Result L;
+        public:
+            typedef Typelist<TheMostDerived, L> Result;
+        };
+        
+    }   // namespace TL
+}   // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 09, 2001: Fix bug in parameter list of macros TYPELIST_23 to TYPELIST_27
+//      (credit due to Dave Taylor)
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+// November 22, 2001: fixed bug in DerivedToFront
+//      (credit due to Gianni Luciani who noticed the bug first;
+//          Adam Wilkshire;
+//          Friedrik Hedman who fixed the bug but didn't send the fix;
+//          Kevin Cline who sent the first actual fix)
+// May 13, 2002: TYPELIST_46 called TYPELIST_45 with only 44 parameters.
+//      Credit due to Robert Minsk     
+// September 16, 2002: Changed MostDerived to use the new SuperSubclass template
+//     (rather than the SUPERSUBCLASS macro).
+//     Minor fix in Reverse, adding support for empty lists, like all the other
+//     algorithms. T.S.
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // TYPELIST_INC_
Index: avida/current/source/third-party/Loki/Reference/Visitor.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/Visitor.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/Visitor.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,203 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef VISITOR_INC_
+#define VISITOR_INC_
+
+#include "Typelist.h"
+#include "HierarchyGenerators.h"
+
+namespace Loki
+{
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitor
+// The base class of any Acyclic Visitor
+////////////////////////////////////////////////////////////////////////////////
+
+    class BaseVisitor
+    {
+    public:
+        virtual ~BaseVisitor() {}
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template Visitor
+// The building block of Acyclic Visitor
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class T, typename R = void>
+    class Visitor
+    {
+    public:
+        typedef R ReturnType;
+        virtual ReturnType Visit(T&) = 0;
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template Visitor (specialization)
+// This specialization is not present in the book. It makes it easier to define
+// Visitors for multiple types in a shot by using a typelist. Example:
+//
+// class SomeVisitor : 
+//     public BaseVisitor // required
+//     public Visitor<TYPELIST_2(RasterBitmap, Paragraph)>, 
+//     public Visitor<Paragraph>
+// {
+// public:
+//     void Visit(RasterBitmap&); // visit a RasterBitmap
+//     void Visit(Paragraph &);   // visit a Paragraph
+// };
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class Head, class Tail, typename R>
+    class Visitor<Typelist<Head, Tail>, R>
+        : public Visitor<Head, R>, public Visitor<Tail, R>
+    {
+    public:
+        typedef R ReturnType;
+       // using Visitor<Head, R>::Visit;
+       // using Visitor<Tail, R>::Visit;
+    };
+    
+    template <class Head, typename R>
+    class Visitor<Typelist<Head, NullType>, R> : public Visitor<Head, R>
+    {
+    public:
+        typedef R ReturnType;
+        using Visitor<Head, R>::Visit;
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitorImpl
+// Implements non-strict visitation (you can implement only part of the Visit
+//     functions)
+////////////////////////////////////////////////////////////////////////////////
+
+    template <class TList, typename R = void> class BaseVisitorImpl;
+
+    template <class Head, class Tail, typename R>
+    class BaseVisitorImpl<Typelist<Head, Tail>, R>
+        : public Visitor<Head, R>
+        , public BaseVisitorImpl<Tail, R>
+    {
+    public:
+       // using BaseVisitorImpl<Tail, R>::Visit;
+
+        virtual R Visit(Head&)
+        { return R(); }
+    };
+    
+    template <class Head, typename R>
+    class BaseVisitorImpl<Typelist<Head, NullType>, R>
+        : public Visitor<Head, R>
+    {
+    public:
+        virtual R Visit(Head&)
+        { return R(); }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitable
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename R, typename Visited>
+struct DefaultCatchAll
+{
+    static R OnUnknownVisitor(Visited&, BaseVisitor&)
+    { return R(); }
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// class template BaseVisitable
+////////////////////////////////////////////////////////////////////////////////
+
+    template 
+    <
+        typename R = void, 
+        template <typename, class> class CatchAll = DefaultCatchAll
+    >
+    class BaseVisitable
+    {
+    public:
+        typedef R ReturnType;
+        virtual ~BaseVisitable() {}
+        virtual ReturnType Accept(BaseVisitor&) = 0;
+        
+    protected: // give access only to the hierarchy
+        template <class T>
+        static ReturnType AcceptImpl(T& visited, BaseVisitor& guest)
+        {
+            // Apply the Acyclic Visitor
+            if (Visitor<T>* p = dynamic_cast<Visitor<T>*>(&guest))
+            {
+                return p->Visit(visited);
+            }
+            return CatchAll<R, T>::OnUnknownVisitor(visited, guest);
+        }
+    };
+
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFINE_VISITABLE
+// Put it in every class that you want to make visitable (in addition to 
+//     deriving it from BaseVisitable<R>
+////////////////////////////////////////////////////////////////////////////////
+
+#define DEFINE_VISITABLE() \
+    virtual ReturnType Accept(BaseVisitor& guest) \
+    { return AcceptImpl(*this, guest); }
+
+////////////////////////////////////////////////////////////////////////////////
+// class template CyclicVisitor
+// Put it in every class that you want to make visitable (in addition to 
+//     deriving it from BaseVisitable<R>
+////////////////////////////////////////////////////////////////////////////////
+
+    template <typename R, class TList>
+    class CyclicVisitor : public Visitor<TList, R>
+    {
+    public:
+        typedef R ReturnType;
+        // using Visitor<TList, R>::Visit;
+        
+        template <class Visited>
+        ReturnType GenericVisit(Visited& host)
+        {
+            Visitor<Visited, ReturnType>& subObj = *this;
+            return subObj.Visit(host);
+        }
+    };
+    
+////////////////////////////////////////////////////////////////////////////////
+// macro DEFINE_CYCLIC_VISITABLE
+// Put it in every class that you want to make visitable by a cyclic visitor
+////////////////////////////////////////////////////////////////////////////////
+
+#define DEFINE_CYCLIC_VISITABLE(SomeVisitor) \
+    virtual SomeVisitor::ReturnType Accept(SomeVisitor& guest) \
+    { return guest.GenericVisit(*this); }
+
+} // namespace Loki
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// March 20: add default argument DefaultCatchAll to BaseVisitable
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // VISITOR_INC_
+
Index: avida/current/source/third-party/Loki/Reference/readme.txt
diff -u /dev/null avida/current/source/third-party/Loki/Reference/readme.txt:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/readme.txt	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,8 @@
+The Golden Code
+KEEPEN DER DAMDDEN FUGGERMUTTENS OTTEN DIS CODDEN FIL
+
+A compliant C++ compiler will compile all of this code as is.
+See the respective vendor directories for code that actually compiles & runs.
+
+Note: Right now, this code contains CodeWarrior & gcc modifications, which may be removed at a future point in time (by moving them to a vendor specific implementation).
+MKH
\ No newline at end of file
Index: avida/current/source/third-party/Loki/Reference/static_check.h
diff -u /dev/null avida/current/source/third-party/Loki/Reference/static_check.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/Reference/static_check.h	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any 
+//     purpose is hereby granted without fee, provided that the above copyright 
+//     notice appear in all copies and that both that copyright notice and this 
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the 
+//     suitability of this software for any purpose. It is provided "as is" 
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef STATIC_CHECK_INC_
+#define STATIC_CHECK_INC_
+
+namespace Loki
+{
+////////////////////////////////////////////////////////////////////////////////
+// Helper structure for the STATIC_CHECK macro
+////////////////////////////////////////////////////////////////////////////////
+
+    template<int> struct CompileTimeError;
+    template<> struct CompileTimeError<true> {};
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// macro STATIC_CHECK
+// Invocation: STATIC_CHECK(expr, id)
+// where:
+// expr is a compile-time integral or pointer expression
+// id is a C++ identifier that does not need to be defined
+// If expr is zero, id will appear in a compile-time error message.
+////////////////////////////////////////////////////////////////////////////////
+
+#define STATIC_CHECK(expr, msg) \
+    { Loki::CompileTimeError<((expr) != 0)> ERROR_##msg; (void)ERROR_##msg; } 
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// March 20, 2001: add extra parens to STATIC_CHECK - it looked like a fun 
+//     definition
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif // STATIC_CHECK_INC_
Index: avida/current/source/third-party/Loki/tools/HeaderGen/HeaderGen.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/HeaderGen/HeaderGen.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/HeaderGen/HeaderGen.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,139 @@
+////////////////////////////////////////////////////////////////////////////////
+// Generates forwarding headers using the information
+// in the header.lst & vendor.lst files
+//
+// To create a header list from an existing directory of headers
+// dir *.h /b > headers.lst
+//
+// Copyright Shannon Barber 2002.
+//
+// Permission to use, copy, modify, distribute and sell this software for any 
+// purpose is hereby granted without fee, provided that the above copyright 
+// notice appear in all copies and that both that copyright notice and this 
+// permission notice appear in supporting documentation. It is provided "as is" 
+// without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <sstream>
+#include <vector>
+#include <ctime>
+
+using namespace std;
+
+struct Compiler
+	{
+	Compiler() {}
+	Compiler(const string& VersionTest, const string& SubDir) : 
+	 version_test(VersionTest), subdir(SubDir)
+		{}
+	string version_test;
+	string subdir;
+	};
+	
+int main(int argc, char* argv[])
+	{
+	if(argc != 3)
+		{
+		cout <<"Usage: <Header List> <Version/Vendor List>"<<endl;
+		return -1;
+		}
+
+	typedef vector<Compiler> cv_type;
+	
+	cv_type vendors;
+	char buf[1024];
+	string check;
+	string subdir;
+	fstream vendor_file;
+
+	vendor_file.open(argv[2], ios::in);
+	if(!vendor_file.is_open())
+		{
+		cout << "Unable to open vendor file: " << argv[2] << endl;
+		return -2;
+		}
+	else
+		{
+		vendors.reserve(10);
+		while(!vendor_file.eof())
+			{
+			vendor_file.getline(buf, 1024, '\n');
+			check = buf;
+			vendor_file.getline(buf, 1024, '\n');
+			subdir = buf;
+			vendor_file.getline(buf, 1024, '\n');
+			if(!(check.empty() || subdir.empty()))
+				vendors.push_back(Compiler(check, subdir));
+			else
+				{
+				cout << "Error parsing vendors, check:" << check << "\tsubdir:" << subdir << endl;
+				}
+			}
+		}
+	
+	fstream header_list(argv[1]);
+	string header;
+	
+	if(!header_list.is_open())
+		{
+		cout << "Invalid header list file, " << argv[1] << endl;
+		return -3;
+		}
+	while(!header_list.eof())
+		{
+		header_list >> header;
+		cout << header << endl;
+		fstream header_file(header.c_str(), ios::out);
+		if(!header_file.is_open())
+			{
+			cout << "Unable to open header file for output: " << header << endl;
+			}
+		else
+			{
+			string start(string("// Generated header: ")+header+'\n');
+			string line(start.size(),'/');
+
+			header_file << line << '\n';
+			header_file << start;
+			header_file << "// Forwards to the appropriate code\n";
+			header_file << "// that works on the detected compiler\n";
+			time_t rawtime;
+			time(&rawtime);
+			header_file << "// Generated on " << ctime(&rawtime);
+			header_file << line << "\n\n";
+						
+			cv_type::iterator it=vendors.begin(), itEnd = vendors.end();
+			
+			header_file << "#ifdef LOKI_USE_REFERENCE\n";
+			header_file << "#\tinclude \"Reference/" << header << "\"\n";
+			header_file << "#else\n";
+
+			header_file << "#\tif " << it->version_test << endl;
+			header_file << "#\t\tinclude \"" << it->subdir << "/" << header << "\"\n";
+			++it;
+			for(; it!=itEnd; ++it)
+				{
+				header_file << "#\telif " << it->version_test << endl;
+				header_file << "#\t\tinclude \"" << it->subdir;
+				header_file << "/" << header << "\"\n";
+				}
+			header_file << "#\telse\n";
+			header_file << "#\t\tinclude \"Reference/" << header << "\"\n";
+			header_file << "#\tendif\n";
+			header_file << "#endif\n";
+			}
+		}
+	return 0;
+	}
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// September 16, 2002: Changed it to only test for compilers where ports exist,
+// else use the Reference version. It used to give an error if used on a
+// compiler that wasn't tested for. Also removed "./".
+// It still needs to test for Intel and Metrowerks, as these define _MSC_VER,
+// too. T.S.
+////////////////////////////////////////////////////////////////////////////////
Index: avida/current/source/third-party/Loki/tools/HeaderGen/HeaderGen.sln
diff -u /dev/null avida/current/source/third-party/Loki/tools/HeaderGen/HeaderGen.sln:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/HeaderGen/HeaderGen.sln	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HeaderGen", "HeaderGen.vcproj", "{402B97D0-B8F8-4B89-97AC-F031849FD94E}"
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		ConfigName.0 = Debug
+		ConfigName.1 = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{402B97D0-B8F8-4B89-97AC-F031849FD94E}.Debug.ActiveCfg = Debug|Win32
+		{402B97D0-B8F8-4B89-97AC-F031849FD94E}.Debug.Build.0 = Debug|Win32
+		{402B97D0-B8F8-4B89-97AC-F031849FD94E}.Release.ActiveCfg = Release|Win32
+		{402B97D0-B8F8-4B89-97AC-F031849FD94E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
Index: avida/current/source/third-party/Loki/tools/HeaderGen/HeaderGen.vcproj
diff -u /dev/null avida/current/source/third-party/Loki/tools/HeaderGen/HeaderGen.vcproj:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/HeaderGen/HeaderGen.vcproj	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="HeaderGen"
+	ProjectGUID="{402B97D0-B8F8-4B89-97AC-F031849FD94E}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="5"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/HeaderGen.exe"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/HeaderGen.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="TRUE"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="4"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/HeaderGen.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+			<File
+				RelativePath="HeaderGen.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc">
+			<File
+				RelativePath="C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\fstream">
+			</File>
+			<File
+				RelativePath="C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\iostream">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+		<File
+			RelativePath="ReadMe.txt">
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: avida/current/source/third-party/Loki/tools/HeaderGen/Headers.lst
diff -u /dev/null avida/current/source/third-party/Loki/tools/HeaderGen/Headers.lst:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/HeaderGen/Headers.lst	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,21 @@
+AbstractFactory.h
+AssocVector.h
+EmptyType.h
+Factory.h
+Functor.h
+HierarchyGenerators.h
+MultiMethods.h
+NullType.h
+Singleton.h
+SmallObj.h
+SmartPtr.h
+static_check.h
+Threads.h
+Tuple.h
+TypeInfo.h
+Typelist.h
+TypeManip.h
+TypeTraits.h
+Visitor.h
+Singleton.cpp
+SmallObj.cpp
\ No newline at end of file
Index: avida/current/source/third-party/Loki/tools/HeaderGen/readme.txt
diff -u /dev/null avida/current/source/third-party/Loki/tools/HeaderGen/readme.txt:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/HeaderGen/readme.txt	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,3 @@
+Cheesy vector-header generation tool
+Yes, I'm that lazy
+MKH
\ No newline at end of file
Index: avida/current/source/third-party/Loki/tools/HeaderGen/vendors.lst
diff -u /dev/null avida/current/source/third-party/Loki/tools/HeaderGen/vendors.lst:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/HeaderGen/vendors.lst	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,14 @@
+(__INTEL_COMPILER)
+Reference
+
+(__MWERKS__)
+Reference
+
+(__BORLANDC__ >= 0x560)
+Borland
+
+(_MSC_VER >= 1300)
+MSVC/1300
+
+(_MSC_VER >= 1200)
+MSVC/1200
Index: avida/current/source/third-party/Loki/tools/RegressionTest/RegressionTest.sln
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/RegressionTest.sln:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/RegressionTest.sln	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AllTest", "AllTest\AllTest.vcproj", "{59800972-3512-4147-9E8F-F5239C241F77}"
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		ConfigName.0 = Debug
+		ConfigName.1 = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{59800972-3512-4147-9E8F-F5239C241F77}.Debug.ActiveCfg = Debug|Win32
+		{59800972-3512-4147-9E8F-F5239C241F77}.Debug.Build.0 = Debug|Win32
+		{59800972-3512-4147-9E8F-F5239C241F77}.Release.ActiveCfg = Release|Win32
+		{59800972-3512-4147-9E8F-F5239C241F77}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Simulate_PS.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Simulate_PS.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Simulate_PS.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,235 @@
+//
+// in this source code I will demonstrate via example the "canonical" and compliant way of
+// simulating class template partial specialization and function templates partial ordering
+// both are not implemented in VC7 and from the simulation you will see that they are closely related
+// in the example I will simulate the Append class template which have 4 specializations
+// Part of the sample was also tested with Comeau C/C++ 4.3.0 online
+// although the code is perfectly compliant many compilers (like bcc 5.6 and gcc 3.03 which support partial stuff) can't
+// handle it (maybe some workaround can help).
+//
+
+#include <stdlib.h>
+#include <cstdio>
+#include <typeinfo>
+#include <Loki\Typelist.h>
+#include <Loki\static_check.h>
+
+using namespace ::Loki;
+
+//
+// Simulating function templates partial ordering (14.5.5.2):
+// The following simple example demonstrate the whole idea
+// template<typename T> void f(T);
+// template<typename T> void f(T*);
+// the functions are partial ordered and T* is more specialized then T
+// compiler which is not supporting partial ordering will decide that f((int*)0) 
+// is ambiguous. We must resolve the ambiguity our self.
+// There is more then one way of doing it but I like the following:
+// struct A{}; 
+// struct B : A{};
+// template<typename T> void f(T, A);
+// template<typename T> void f(T*, B);
+// template<typename T> void f(T x) { f(x, B()); }
+// for pointers f(T*, B) is better then f(T, A) when the call is f(ptr, B());
+//
+
+//
+// This template will help us to "order" the function templates.
+//
+template<unsigned I>
+struct Order : Order<I - 1> {};
+
+template<>
+struct Order<0> {};
+
+template<unsigned I>
+struct TypeTag
+{
+    typedef char (&X)[I];
+};
+
+//
+// This template class simulate the detection of the best specialization
+//
+template<class TList, class T>
+class AppendPattern
+{
+    // you can call me insane but VC7 fails without the following typedefs
+    typedef TypeTag<2>::X X2;
+    typedef TypeTag<3>::X X3;
+    typedef TypeTag<4>::X X4;
+
+    // Match Append<NullType, NullType>
+    static TypeTag<1>::X Match(Type2Type<NullType>, Type2Type<NullType>, Order<1>);
+    
+    // Match Append<NullType, T>
+    template<typename T1>
+    static TypeTag<2>::X Match(Type2Type<NullType>, Type2Type<T1>, Order<0>);
+
+    // Match Append<NullType, Typelist<Head, Tail>>
+    template <class Head, class Tail>
+    static TypeTag<3>::X Match(Type2Type<NullType>, Type2Type<Typelist<Head, Tail> >, Order<1>);
+
+    // Match Append<Typelist<Head, Tail>, T>
+    template <class Head, class Tail, typename T1>
+    static TypeTag<4>::X Match(Type2Type<Typelist<Head, Tail> >, Type2Type<T1>, Order<0>);
+    
+    static Type2Type<TList> Get1();
+    static Type2Type<T>     Get2();
+    
+    // VC will fail if the sizeof is written directly to the TypeTag
+    enum { value = sizeof(Match( Get1(), Get2(), Order<1>() )) };
+
+public:
+    typedef TypeTag<value> Result;    
+};
+
+template <class TList, class T> class  Append2;
+
+//
+// This template class simulate the detection of the partial specialization
+// The append helper simulate the partial specialized class templates with 
+// explicit specialization that represent the selected specialization and 
+// nested class template which implement the specialization 
+//
+template<typename Tag> struct AppendHelper;
+
+template<> 
+struct AppendHelper< TypeTag<1> >
+{ // Append<NullType, NullType>
+    template <class, class> 
+    struct In
+    {
+        typedef NullType Result;
+    };
+};
+
+template<>
+struct AppendHelper< TypeTag<2> >
+{ // Append<NullType, T>
+    template <class, class T> 
+    struct In 
+    {
+        typedef TYPELIST_1(T) Result;
+    };
+};
+
+template<>
+struct AppendHelper< TypeTag<3> >
+{ // Append<NullType, Typelist<Head, Tail> >
+    template <class, class TList> 
+    struct In 
+    {  
+        typedef typename TList::Head Head;
+        typedef typename TList::Tail Tail;
+
+        typedef Typelist<Head, Tail> Result;
+        //typedef TList Result;
+    };
+};
+
+template<>
+struct AppendHelper< TypeTag<4> >
+{ // Append<Typelist<Head, Tail>, T>
+    template <class TList, class T> 
+    struct In 
+    {
+        typedef typename TList::Head Head;
+        typedef typename TList::Tail Tail;
+
+        typedef Typelist<Head, typename Append2<Tail, T>::Result> Result;
+    };
+};
+
+
+template <class TList, class T> 
+class Append2
+{
+    // First we detect the best specialization
+    typedef typename AppendPattern<TList, T>::Result Pattern;
+
+public:
+
+    // Insatiate the best specialization
+    typedef typename AppendHelper<Pattern>::
+        template In<TList, T>::Result 
+        Result;
+};
+
+//
+// Lets toy with the simulated Append
+//
+
+typedef struct IncompType *IncompPtr;
+
+struct A1 {};
+struct B1 : A1 {};
+
+struct A2 {};
+struct B2 : A2 {};
+
+struct C1 : B1 {};
+struct C2 : B2 {};
+struct D1 : C1, C2 {};
+
+namespace 
+{
+
+template<typename TList>
+struct PrintTypelist
+{
+    PrintTypelist()
+    {
+        typedef typename TList::Head Head;
+        typedef typename TList::Tail Tail;
+
+        printf("%s ,", typeid(Head).name());
+
+        PrintTypelist<Tail>();
+    }
+};
+
+template<>
+struct PrintTypelist<NullType>
+{
+    PrintTypelist()
+    {
+        printf("\n");
+    }
+};
+
+template<class TList, typename T>
+void Test_Append2()
+{
+    typedef typename TL::Append<TList, T>::Result typelist1_t;
+    typedef typename Append2<TList, T>::Result    typelist2_t;
+
+    // Assert (compile time) that typelist1_t and typelist2_t are the same type
+    STATIC_CHECK((Conversion<typelist1_t, typelist2_t>::sameType), Append2_Failed);
+
+    PrintTypelist<typelist1_t>();
+    PrintTypelist<typelist2_t>();
+}
+
+void Test_Append()
+{
+    typedef TL::MakeTypeList<int, A1, A2>::Result typelist1_t;
+    typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**>::Result typelist2_t;
+
+    Test_Append2<NullType, NullType>();
+    Test_Append2<NullType, typelist2_t>();
+    Test_Append2<typelist1_t, NullType>();
+    Test_Append2<NullType, int>();
+    Test_Append2<typelist1_t, int[10]>();
+    Test_Append2<typelist1_t, typelist2_t>();
+}
+
+} // anonymous namespace
+
+
+int main()
+{
+    Test_Append();
+    system("pause");
+}
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_AbstractFactory.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_AbstractFactory.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_AbstractFactory.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,148 @@
+#include <iostream>
+#include <memory>
+#include "AbstractFactory.h"
+
+using namespace ::Loki;
+
+
+struct Enemy
+{
+    virtual Enemy* Clone() = 0;
+    virtual ~Enemy() {};
+};
+
+struct Soldier : Enemy
+{
+    virtual Soldier* Clone() = 0;
+    virtual const char *SoldierName() const = 0;
+};
+
+struct Monster : Enemy
+{
+    virtual Monster* Clone() = 0;
+    virtual const char *MonsterName() const = 0;
+};
+
+struct SuperMonster : Enemy
+{
+    virtual SuperMonster* Clone() = 0;
+    virtual const char *SuperMonsterName() const = 0;
+};
+
+typedef AbstractFactory
+<
+    TYPELIST_3(Soldier, Monster, SuperMonster)
+>
+AbstractEnemyFactory;
+
+class SillySoldier 
+    : public Soldier
+{
+public:
+    explicit SillySoldier(const char *name = "Anonymous Silly Soldier")
+        : name_(name)
+    {}
+
+    virtual SillySoldier* Clone()
+    {
+        return new SillySoldier("Cloned Silly Soldier");
+    }
+
+    virtual const char *SoldierName() const { return name_; }
+
+private:
+    const char *name_;
+};
+
+class SillyMonster 
+    : public Monster
+{
+public:
+    explicit SillyMonster(const char *name = "Anonymous Silly Monster")
+        : name_(name)
+    {}
+
+    virtual SillyMonster* Clone()
+    {
+        return new SillyMonster("Cloned Silly Moster");
+    }
+
+    virtual const char *MonsterName() const { return name_; }
+
+private:
+    const char *name_;
+};
+
+class SillySuperMonster 
+    : public SuperMonster
+{
+public:
+    explicit SillySuperMonster(const char *name = "Anonymous Silly SuperMonster")
+        : name_(name)
+    {}
+
+    virtual SillySuperMonster* Clone()
+    {
+        return new SillySuperMonster("Cloned Silly SuperMoster");
+    }
+
+    virtual const char *SuperMonsterName() const { return name_; }
+
+private:
+    const char *name_;
+};
+
+typedef ConcreteFactory
+<
+    AbstractEnemyFactory,
+    OpNewFactoryUnit,
+    TYPELIST_3(SillySoldier, SillyMonster, SillySuperMonster)
+>
+EasyLevelEnemyFactory;
+
+typedef ConcreteFactory
+<
+    AbstractEnemyFactory,
+    PrototypeFactoryUnit
+>
+EnemyFactory;
+
+void print_names(AbstractEnemyFactory &abstEnemyFactory)
+{
+    using std::auto_ptr;
+
+    auto_ptr<Soldier>       apSoldier(abstEnemyFactory.Create<Soldier>());
+    
+    std::cout << apSoldier->SoldierName() << std::endl;
+
+    
+    auto_ptr<Monster>       apMonster(abstEnemyFactory.Create<Monster>());
+
+    std::cout << apMonster->MonsterName() << std::endl;
+
+
+    auto_ptr<SuperMonster>  apSuperMonster(abstEnemyFactory.Create<SuperMonster>());
+
+    std::cout << apSuperMonster->SuperMonsterName() << std::endl;
+}
+
+int main()
+{
+    EasyLevelEnemyFactory   testEasyLevelEnemyFactory;
+
+    print_names(testEasyLevelEnemyFactory);
+
+    EnemyFactory testEnemyFactory;
+
+    SillySoldier        testSillySoldier;
+    testEnemyFactory.SetPrototype(&testSillySoldier);
+
+    SillyMonster        testSillyMonster;
+    testEnemyFactory.SetPrototype(&testSillyMonster);
+
+    SillySuperMonster   testSillySuperMonster;
+    testEnemyFactory.SetPrototype(&testSillySuperMonster);
+
+    print_names(testEnemyFactory);
+}
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_Factory.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_Factory.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_Factory.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,35 @@
+#include <cstdio>
+#include <typeinfo>
+#include "Factory.h"
+#include "AbstractFactory.h"
+
+template<typename T>
+void print_type()
+{
+    printf("%s\n", typeid(T).name());
+}
+
+using namespace ::Loki;
+
+struct A1 {}; struct A2 {}; struct A3 {}; struct A4 {};
+struct A5 {}; struct A6 {}; struct A7 {}; struct A8 {};
+
+typedef TL::MakeTypeList<A1, A2, A3, A4, A5, A6, A7, A8>::Result typelist1_t;
+
+struct Abst : AbstractFactory<typelist1_t> {};
+
+int main()
+{
+    Factory<A1, int>     a;
+    CloneFactory<A1>     b;
+
+    typedef AbstractFactory<typelist1_t> abst_t;
+    
+    struct AA1 : ConcreteFactory<abst_t, OpNewFactoryUnit> {};
+    AA1 a1;
+
+    struct AA2 : ConcreteFactory<Abst, OpNewFactoryUnit> {};
+
+    AA2 a2;
+}
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_Functor.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_Functor.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_Functor.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,44 @@
+#include <cstdio>
+#include "Functor.h"
+
+using namespace Loki;
+
+class A
+{
+public:
+    explicit A(int number)
+        : number_(number)
+    {}
+
+    int Get() const { return number_; }
+
+private:
+    int number_;
+};
+
+int foo(int a1, A a2, const A &a3)
+{
+    return a1 + a2.Get() + a3.Get();
+}
+
+int
+main()
+{
+    typedef Functor< int, TYPELIST_3(int, A, const A &) > func1_t;
+     
+    func1_t fun1(foo);
+    func1_t fun2(fun1);
+
+    A   num1(10);
+    printf("%d\n", fun1(1, num1, A(100)));
+
+#if defined(_MSC_VER) && _MSC_VER == 1300
+    // will not compile with the original Loki although its fine
+    printf("%d\n", BindFirst(fun2, 15)(A(24), num1)); 
+#else
+    A   num2(24);
+    printf("%d\n", BindFirst(fun2, 15)(num2, num1)); // will not compile with the original loki
+#endif
+}
+
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators1.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators1.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators1.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,69 @@
+#include <cstdio>
+#include <typeinfo>
+#include "HierarchyGenerators.h"
+
+using namespace ::Loki;
+
+//
+// Helper class for simulating (ranking) partial ordering
+//
+template<unsigned I>
+struct Order : Order<I - 1> {};
+
+template<>
+struct Order<0> {};
+
+template<template<typename> class Unit>
+class PrintGenScatterHierarchy
+{
+    template<typename Head, typename Tail>
+    PrintGenScatterHierarchy(GenScatterHierarchy<Typelist<Head, Tail>, Unit> *a, Order<1>)
+    {
+        printf("%s\n", typeid(*a).name());
+
+        GenScatterHierarchy<Head, Unit> *left = a;
+        PrintGenScatterHierarchy<Unit> X1(left);
+    
+        GenScatterHierarchy<Tail, Unit> *right = a;
+        PrintGenScatterHierarchy<Unit> X2(right);
+    }
+
+    template<typename T>
+    PrintGenScatterHierarchy(GenScatterHierarchy<T, Unit> *a, Order<0>)
+    {
+        printf("%s\n", typeid(*a).name());
+
+        Unit<T> *left = a;
+        (void)left;
+
+        printf("%s\n", typeid(*left).name());
+    }
+
+    PrintGenScatterHierarchy(GenScatterHierarchy<NullType, Unit> *a, Order<1>)
+    {
+        (void)a;
+        printf("%s\n", typeid(*a).name());
+    }
+
+public:
+    template<typename T>
+    explicit PrintGenScatterHierarchy(GenScatterHierarchy<T, Unit> *a)
+    {
+        PrintGenScatterHierarchy<Unit>(a, Order<1>());                
+    }
+};
+
+template<typename> class TestUnit {};
+template<int> struct A {};
+
+int
+main()
+{
+    typedef TYPELIST_10(A<1>, A<2>, A<3>, A<4>, A<5>, A<6>, A<7>, A<8>, A<9>, A<10>) TestList_t;
+
+    GenScatterHierarchy<TestList_t, TestUnit> TestGenScatterHierarchy;
+
+    PrintGenScatterHierarchy<TestUnit> X(&TestGenScatterHierarchy);
+}
+
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators2.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators2.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators2.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,70 @@
+#include <cstdio>
+#include <typeinfo>
+#include "HierarchyGenerators.h"
+
+using namespace ::Loki;
+
+//
+// Helper class for simulating (ranking) partial ordering
+//
+template<unsigned I>
+struct Order : Order<I - 1> {};
+
+template<>
+struct Order<0> {};
+
+template<template<typename, typename> class Unit, class Root>
+class PrintGenLinearHierarchy
+{
+    template<typename Head>
+    PrintGenLinearHierarchy(GenLinearHierarchy<Typelist<Head, NullType>, Unit, Root> *a, Order<1>)
+    {
+        printf("%s\n", typeid(*a).name());
+
+        Unit<Head, Root> *base1 = a;
+
+        printf("%s\n", typeid(*base1).name());
+    
+        Root *base2 = base1; (void)base2;
+
+        printf("%s\n", typeid(*base2).name());
+    }
+
+    template<typename Head, typename Tail>
+    PrintGenLinearHierarchy(GenLinearHierarchy<Typelist<Head, Tail>, Unit, Root> *a, Order<0>)
+    {
+        printf("%s\n", typeid(*a).name());
+
+        Unit<Head, GenLinearHierarchy<Tail, Unit, Root> > *base1 = a;
+        printf("%s\n", typeid(*base1).name());
+    
+        GenLinearHierarchy<Tail, Unit, Root> *base2 = base1;
+        PrintGenLinearHierarchy<Unit, Root> X(base2);
+    }
+
+public:
+    template<typename Head, typename Tail>
+    explicit PrintGenLinearHierarchy(GenLinearHierarchy<Typelist<Head, Tail>, Unit, Root> *a)
+    {
+        PrintGenLinearHierarchy<Unit, Root>(a, Order<1>());
+    }
+};
+
+template<typename, class Base> 
+class TestUnit : public Base {};
+
+class TestRoot {};
+
+template<int> struct A {};
+
+int
+main()
+{
+    typedef TYPELIST_10(A<1>, A<2>, A<3>, A<4>, A<5>, A<6>, A<7>, A<8>, A<9>, A<10>) TestList_t;
+
+    GenLinearHierarchy<TestList_t, TestUnit, TestRoot> TestGenLinearHierarchy;
+
+    PrintGenLinearHierarchy<TestUnit, TestRoot> X(&TestGenLinearHierarchy);
+}
+
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators3.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators3.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators3.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,76 @@
+#include <cstdio>
+#include <typeinfo>
+#include "HierarchyGenerators.h"
+
+using namespace ::Loki;
+
+//
+// Helper class for simulating (ranking) partial ordering
+//
+template<unsigned I>
+struct Order : Order<I - 1> {};
+
+template<>
+struct Order<0> {};
+
+template<template<typename> class Unit>
+class PrintGenScatterHierarchy
+{    
+    //
+    // The second parameter is not needed when using compilers that support partial ordering
+    // VC7 doesn't support that feature - this is an example of simulating that feature in VC7
+    //
+    template<typename Head, typename Tail>
+    static void Print(GenScatterHierarchy<Typelist<Head, Tail>, Unit> &a, Order<1>)
+    {
+        printf("%s\n", typeid(a).name());
+
+        GenScatterHierarchy<Head, Unit> &left = a;
+        Print(left);
+
+        GenScatterHierarchy<Tail, Unit> &right = a;
+        Print(right);
+    }
+
+    template<typename T>
+    static void Print(GenScatterHierarchy<T, Unit> &a, Order<0>)
+    {
+        printf("%s\n", typeid(a).name());
+
+        Unit<T> &left = a;
+        (void)left;
+
+        printf("%s\n", typeid(left).name());
+    }
+
+    static void Print(GenScatterHierarchy<NullType, Unit> &a, Order<1>)
+    {
+        (void)a;
+        printf("%s\n", typeid(a).name());
+    }
+
+public:
+    template<typename T>
+    static void Print(GenScatterHierarchy<T, Unit> &a)
+    {
+        Print(a, Order<1>());
+    }
+    
+};
+
+template<typename> class TestUnit {};
+template<int> struct A {};
+template<int> struct B {};
+
+int
+main()
+{
+    typedef TYPELIST_20(A<1>, A<2>, A<3>, A<4>, A<5>, A<6>, A<7>, A<8>, A<9>, A<10>,
+                        B<1>, B<2>, B<3>, B<4>, B<5>, B<6>, B<7>, B<8>, B<9>, B<10>) TestList_t;
+
+    GenScatterHierarchy<TestList_t, TestUnit> TestGenScatterHierarchy;
+
+    PrintGenScatterHierarchy<TestUnit>::Print(TestGenScatterHierarchy);
+}
+
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators4.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators4.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_HierarchyGenerators4.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,72 @@
+#include <cstdio>
+#include <typeinfo>
+#include "HierarchyGenerators.h"
+
+using namespace ::Loki;
+
+//
+// Helper class for simulating (ranking) partial ordering
+//
+template<unsigned I>
+struct Order : Order<I - 1> {};
+
+template<>
+struct Order<0> {};
+
+template<template<typename, typename> class Unit, class Root>
+class PrintGenLinearHierarchy
+{    
+    template<typename Head, typename Tail>
+    static void Print(GenLinearHierarchy<Typelist<Head, Tail>, Unit, Root> &a, Order<0>)
+    {
+        printf("%s\n", typeid(a).name());
+
+        Unit<Head, GenLinearHierarchy<Tail, Unit, Root> > &base1 = a;
+        printf("%s\n", typeid(base1).name());
+    
+        GenLinearHierarchy<Tail, Unit, Root> &base2 = base1;
+        Print(base2);
+    }
+
+    template<typename Head>
+    static void Print(GenLinearHierarchy<Typelist<Head, NullType>, Unit, Root> &a, Order<1>)
+    {
+        printf("%s\n", typeid(a).name());
+
+        Unit<Head, Root> &base1 = a;
+
+        printf("%s\n", typeid(base1).name());
+    
+        Root &base2 = base1; (void)base2;
+
+        printf("%s\n", typeid(base2).name());
+    }
+
+public:
+    template<typename Head, typename Tail>
+    static void Print(GenLinearHierarchy<Typelist<Head, Tail>, Unit, Root> &a)
+    {
+        Print(a, Order<1>());
+    }
+};
+
+template<typename, class Base> 
+class TestUnit : public Base {};
+
+class TestRoot {};
+
+template<int> struct A {};
+template<int> struct B {};
+
+int
+main()
+{
+    typedef TYPELIST_20(A<1>, A<2>, A<3>, A<4>, A<5>, A<6>, A<7>, A<8>, A<9>, A<10>,
+                        B<1>, B<2>, B<3>, B<4>, B<5>, B<6>, B<7>, B<8>, B<9>, B<10>) TestList_t;
+
+    GenLinearHierarchy<TestList_t, TestUnit, TestRoot> TestGenLinearHierarchy;
+
+    PrintGenLinearHierarchy<TestUnit, TestRoot>::Print(TestGenLinearHierarchy);
+}
+
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_MultiMethods.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_MultiMethods.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_MultiMethods.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,220 @@
+#include <iostream>
+#include <typeinfo>
+#include <memory>
+#include <cassert>
+#include "MultiMethods.h"
+
+using ::std::cout;
+
+struct Shape 
+{
+    virtual ~Shape() = 0;
+};
+
+Shape::~Shape() {}
+
+class Rectangle : public Shape {};
+class Poly      : public Shape {};
+class Ellipse   : public Shape {};
+class Cycloid   : public Shape {};
+
+class SymHachingExecutor
+{
+public:
+    typedef void ResultType;
+
+    ResultType Fire(Rectangle&, Rectangle&)
+    { cout << "Fire(Rectangle&, Rectangle&)" << '\n'; }
+
+    ResultType Fire(Rectangle&, Poly&)
+    { cout << "Fire(Rectangle&, Poly&)" << '\n'; }
+
+    ResultType Fire(Rectangle&, Ellipse&)
+    { cout << "Fire(Rectangle&, Ellipse&)" << '\n'; }
+
+    ResultType Fire(Poly&, Poly&)
+    { cout << "Fire(Poly&, Poly&)" << '\n'; }
+
+    ResultType Fire(Poly&, Ellipse&)
+    { cout << "Fire(Poly&, Ellipse&)" << '\n'; }
+    
+    ResultType Fire(Ellipse&, Ellipse&)
+    { cout << "Fire(Ellipse&, Ellipse&)" << '\n'; }
+
+    void OnError(Shape& x, Shape& y)
+    { 
+        cout << "OnError: " 
+             << typeid(x).name() << ", "
+             << typeid(y).name() << '\n';
+    }
+};
+
+typedef ::Loki::StaticDispatcher
+<
+    SymHachingExecutor,
+    Shape,
+    TYPELIST_3(Rectangle, Poly, Ellipse)
+>
+SymHachingDispatcher;
+
+
+class HachingExecutor : SymHachingExecutor
+{
+public:
+    typedef SymHachingExecutor::ResultType ResultType;
+
+    using SymHachingExecutor::Fire;
+
+    ResultType Fire(Poly&, Rectangle&)
+    { cout << "Fire(Poly&, Rectangle&)" << '\n'; }
+
+    ResultType Fire(Ellipse&, Rectangle&)
+    { cout << "Fire(Ellipse&, Rectangle&)" << '\n'; }
+
+    ResultType Fire(Ellipse&, Poly&)
+    { cout << "Fire(Ellipse&, Poly&)" << '\n'; }
+    
+    using SymHachingExecutor::OnError;
+};
+
+typedef ::Loki::StaticDispatcher
+<
+    HachingExecutor,
+    Shape,
+    TYPELIST_3(Rectangle, Poly, Ellipse),
+    false
+>
+HachingDispatcher;
+
+template<class TestedHachingDispatcher, class TestedHachingExecutor>
+void Test_HachingDispatcher(TestedHachingExecutor Exec)
+{
+    using ::std::auto_ptr;
+
+    auto_ptr<Shape>   shape1(new Rectangle);
+    auto_ptr<Shape>   shape2(new Ellipse);
+    auto_ptr<Shape>   shape3(new Poly);
+    auto_ptr<Shape>   shape4(new Cycloid);
+
+    static const std::size_t number_of_shapes = 4;
+    
+    Shape * const shapes[number_of_shapes] = 
+    {
+        shape1.get(), shape2.get(),
+        shape3.get(), shape4.get(),
+    };
+
+    for (std::size_t i = 0 ; i < number_of_shapes ; ++i)
+        for (std::size_t j = 0 ; j < number_of_shapes ; ++j)
+        {
+            TestedHachingDispatcher::Go(*shapes[i], *shapes[j], Exec);
+        }
+}
+
+typedef ::Loki::BasicDispatcher<Shape>   ShapeBasicDispatcher;
+typedef ::Loki::FnDispatcher<Shape>      ShapeFnDispatcher;
+typedef ::Loki::FunctorDispatcher<Shape> ShapeFunctorDispatcher;
+            
+namespace // anonymous
+{
+    template<class Shape1, class Shape2>
+    void HatchShapesDo(Shape1 &, Shape2 &)
+    {
+        cout << "HatchShapes: " 
+             << typeid(Shape1).name() << ", "
+             << typeid(Shape2).name() << '\n';
+    }
+
+    template<class Shape1, class Shape2>
+    void HatchShapes(Shape &lhs, Shape &rhs)
+    {
+        assert(dynamic_cast<Shape1*>(&lhs) != 0);
+        assert(dynamic_cast<Shape2*>(&rhs) != 0);
+
+        HatchShapesDo(static_cast<Shape1&>(lhs),
+                      static_cast<Shape2&>(rhs));
+    }
+
+    template<class Shape1, class Shape2>
+    struct HatchShapesFunctor
+    {
+        void operator()(Shape1 &lhs, Shape2 &rhs)
+        {
+            HatchShapesDo(lhs, rhs);
+        }
+    };
+
+} // anonymous namespace
+
+template<class Shape1, class Shape2>
+void ShapeDispatcherAdd(ShapeBasicDispatcher &x)
+{
+    x.Add<Shape1, Shape2>(HatchShapes<Shape1, Shape2>);
+}
+
+template<class Shape1, class Shape2>
+void ShapeDispatcherAdd(ShapeFnDispatcher &x)
+{
+    x.Add<Shape1, Shape2>(HatchShapes<Shape1, Shape2>);
+}
+
+template<class Shape1, class Shape2>
+void ShapeDispatcherAdd(ShapeFunctorDispatcher &x)
+{
+    x.Add<Shape1, Shape2>(HatchShapesFunctor<Shape1, Shape2>());
+}
+
+template<class Dispacher>
+void Test_LogDispacher()
+{
+    Dispacher    testedBasicDispatcher;
+
+    ShapeDispatcherAdd<Rectangle, Poly>(testedBasicDispatcher);
+    ShapeDispatcherAdd<Poly, Rectangle>(testedBasicDispatcher);
+    ShapeDispatcherAdd<Rectangle, Ellipse>(testedBasicDispatcher);
+    ShapeDispatcherAdd<Ellipse, Poly>(testedBasicDispatcher);
+    ShapeDispatcherAdd<Poly, Poly>(testedBasicDispatcher);
+
+
+    using ::std::auto_ptr;
+
+    auto_ptr<Shape>   shape1(new Rectangle);
+    auto_ptr<Shape>   shape2(new Ellipse);
+    auto_ptr<Shape>   shape3(new Poly);
+
+    static const std::size_t number_of_shapes = 3;
+    
+    Shape * const shapes[number_of_shapes] = 
+    {
+        shape1.get(), shape2.get(), shape3.get(),
+    };
+
+    for (std::size_t i = 0 ; i < number_of_shapes ; ++i)
+        for (std::size_t j = 0 ; j < number_of_shapes ; ++j)
+        {
+            try
+            {
+                testedBasicDispatcher.Go(*shapes[i], *shapes[j]);
+            }
+            catch(::std::runtime_error &exp)
+            {
+                cout << exp.what() << ": "
+                     << typeid(*shapes[i]).name() << ", "
+                     << typeid(*shapes[j]).name() << '\n';
+            }
+        }
+}
+
+int main()
+{
+    SymHachingExecutor  SymExec;
+    Test_HachingDispatcher<SymHachingDispatcher>(SymExec);
+
+    HachingExecutor     Exec;
+    Test_HachingDispatcher<HachingDispatcher>(Exec);
+
+    Test_LogDispacher<ShapeBasicDispatcher>();
+    Test_LogDispacher<ShapeFnDispatcher>();
+    Test_LogDispacher<ShapeFunctorDispatcher>();
+}
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_Singleton.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_Singleton.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_Singleton.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,34 @@
+#include <Loki\Singleton.h>
+
+#include <iostream>
+using std::cout;
+using std::endl;
+
+using namespace ::Loki;
+
+
+namespace
+{
+	struct A { ~A(){} };
+	struct B { ~B(){} };
+	struct C { ~C(){} };
+
+	unsigned int GetLongevity(C*)
+	{
+		return 1;
+	}
+}//ns anon
+
+extern void Test_Singleton()
+{
+    cout << "Testing Loki\\Singleton" << endl;
+    typedef SingletonHolder<A> SingletonHolder1_t;
+    typedef SingletonHolder<B, CreateStatic> SingletonHolder2_t;
+    typedef SingletonHolder<C, CreateUsingNew, SingletonWithLongevity> SingletonHolder3_t;
+
+    A& p = SingletonHolder1_t::Instance();
+    SingletonHolder2_t::Instance();
+    SingletonHolder3_t::Instance();
+    cout << endl << endl;
+}
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_SmallObj.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_SmallObj.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_SmallObj.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,22 @@
+//
+//Test the Small Object Allocator
+// MKH
+//
+
+#include <Loki\SmallObj.h>
+
+namespace
+{
+	struct Test : Loki::SmallObj
+	{
+	};
+	void Test_SmallObject()
+	{
+		Test;
+	}
+}//ns anon
+
+extern void Test_SmallObj()
+{
+	Test_SmallObject();
+}
\ No newline at end of file
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_SmartPtr.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_SmartPtr.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_SmartPtr.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,286 @@
+#include <vector>
+#include <algorithm>
+#include <cassert>
+#include <Loki\SmartPtr.h>
+
+#include <iostream>
+using std::cout;
+using std::endl;
+
+#if defined(TEST_LOKI_ORIG)
+namespace Loki
+{
+    template
+    <
+        typename T,
+        template <class> class OwnershipPolicy = RefCounted,
+        class ConversionPolicy = DisallowConversion,
+        template <class> class CheckingPolicy = AssertCheck,
+        template <class> class StoragePolicy = DefaultSPStorage
+    >
+    struct SmartPtrDef
+    {
+        typedef SmartPtr
+        <
+            T,
+            OwnershipPolicy,
+            ConversionPolicy,
+            CheckingPolicy,
+            StoragePolicy
+        >
+        type;
+    };
+} // namespace Loki
+#endif // defined(TEST_LOKI_ORIG)
+
+using namespace ::Loki;
+
+namespace
+{
+	struct A 
+	{ 
+		A()          { ++s_instCount; }
+		A(const A &) { ++s_instCount; }
+		virtual ~A() { --s_instCount; } 
+	    
+		virtual const char *name() const = 0;
+
+		static void AssertInstCount()
+		{
+			assert(s_instCount == 0);
+		}
+
+	private:
+		static int s_instCount;
+	};
+
+	int A::s_instCount = 0;
+
+	struct B : A 
+	{
+		virtual const char *name() const
+		{
+			return "B";
+		}
+	};
+
+	struct C : A 
+	{
+		virtual const char *name() const
+		{
+			return "C";
+		}
+	};
+
+	template<class SmartPtr_A>
+	struct PrintA
+	{
+		void operator()(const SmartPtr_A &spA) const
+		{
+			std::cout << spA->name() << ", ";
+		}
+	};
+
+	void Test_SmartPointer()
+	{
+		typedef SmartPtrDef<A, RefCounted>::type SmartPtr_A;
+		typedef SmartPtrDef<B, RefCounted>::type SmartPtr_B;
+		typedef SmartPtrDef<C, RefCounted>::type SmartPtr_C;
+
+		SmartPtr_B     spB(new B);
+		SmartPtr_C     spC(new C);
+
+		SmartPtr_A     spA1(spB);
+		SmartPtr_A     spA2(spC);
+
+		std::cout << spA1->name() << std::endl;
+		std::cout << spA2->name() << std::endl;
+
+		spA1 = spA2;
+		spA2 = spB;
+
+		std::cout << spA1->name() << std::endl;
+	    
+		if (spA2 == spA1)
+		{
+			std::cout << spA2->name() << std::endl;
+		}
+
+		Reset(spA2, new C);
+	    
+		if (spA2)
+		{
+			std::cout << spA2->name() << std::endl;
+		}
+
+		std::vector<SmartPtr_A> vectorA;
+
+		for (unsigned i = 0 ; i < 10 ; ++i)
+		{
+			if ((i % 3) == 0)
+			{
+					vectorA.push_back(new B);
+			}
+			else
+			{
+					vectorA.push_back(new C);
+			}
+		}
+	    
+		for (unsigned i = 0 ; i < 10 ; ++i)
+		{
+			vectorA.push_back(vectorA[i]);
+		}
+
+		std::for_each(vectorA.begin(), vectorA.end(), PrintA<SmartPtr_A>());
+
+		std::cout << std::endl;
+	}
+
+	// I know it's ugly code duplication but the template version kills VC7
+	void Test_SmartPtrRL()
+	{
+		typedef SmartPtrDef<A, RefLinked>::type SmartPtr_A;
+		typedef SmartPtrDef<B, RefLinked>::type SmartPtr_B;
+		typedef SmartPtrDef<C, RefLinked>::type SmartPtr_C;
+
+		SmartPtr_B     spB(new B);
+		SmartPtr_C     spC(new C);
+
+		SmartPtr_A     spA1(spB);
+		SmartPtr_A     spA2(spC);
+
+		std::cout << spA1->name() << std::endl;
+		std::cout << spA2->name() << std::endl;
+
+		spA1 = spA2;
+		spA2 = spB;
+
+		std::cout << spA1->name() << std::endl;
+	    
+		if (spA2 == spA1)
+		{
+			std::cout << spA2->name() << std::endl;
+		}
+
+		Reset(spA2, new C);
+	    
+		if (spA2)
+		{
+			std::cout << spA2->name() << std::endl;
+		}
+
+		std::vector<SmartPtr_A> vectorA;
+
+		for (unsigned i = 0 ; i < 10 ; ++i)
+		{
+			if ((i % 3) == 0)
+			{
+					vectorA.push_back(new B);
+			}
+			else
+			{
+					vectorA.push_back(new C);
+			}
+		}
+
+		for (unsigned i = 0 ; i < 10 ; ++i)
+		{
+			vectorA.push_back(vectorA[i]);
+		}
+
+		std::for_each(vectorA.begin(), vectorA.end(), PrintA<SmartPtr_A>());
+
+		std::cout << std::endl;
+	}
+
+	void Test_SmartPtrMT()
+	{
+	#define MyRefCountedMT RefCountedMTAdj<SingleThreaded>::RefCountedMT
+
+		typedef SmartPtrDef<A, MyRefCountedMT>::type SmartPtr_A;
+		typedef SmartPtrDef<B, MyRefCountedMT>::type SmartPtr_B;
+		typedef SmartPtrDef<C, MyRefCountedMT>::type SmartPtr_C;
+
+	#undef MyRefCountedMT
+
+		SmartPtr_B     spB(new B);
+		SmartPtr_C     spC(new C);
+
+		SmartPtr_A     spA1(spB);
+		SmartPtr_A     spA2(spC);
+
+		std::cout << spA1->name() << std::endl;
+		std::cout << spA2->name() << std::endl;
+
+		spA1 = spA2;
+		spA2 = spB;
+
+		std::cout << spA1->name() << std::endl;
+	    
+		if (spA2 == spA1)
+		{
+			std::cout << spA2->name() << std::endl;
+		}
+
+		Reset(spA2, new C);
+	    
+		if (spA2)
+		{
+			std::cout << spA2->name() << std::endl;
+		}
+
+		std::vector<SmartPtr_A> vectorA;
+
+		for (unsigned i = 0 ; i < 10 ; ++i)
+		{
+			if ((i % 3) == 0)
+			{
+					vectorA.push_back(new B);
+			}
+			else
+			{
+					vectorA.push_back(new C);
+			}
+		}
+
+		for (unsigned i = 0 ; i < 10 ; ++i)
+		{
+			vectorA.push_back(vectorA[i]);
+		}
+
+		std::for_each(vectorA.begin(), vectorA.end(), PrintA<SmartPtr_A>());
+
+		std::cout << std::endl;
+	}
+
+	void Test_RejectNull()
+	{
+		typedef SmartPtrDef<A, RefCounted, DisallowConversion, RejectNull>::type SmartPtr_A;
+
+		try {
+			SmartPtr_A     spA;
+		} catch (std::exception &ex) {
+			std::cout << "Reject Default: " << ex.what() << std::endl;
+		}
+
+		try {
+			SmartPtr_A     spA(0);
+		} catch (std::exception &ex) {
+			std::cout << "Reject Null: " << ex.what() << std::endl;
+		}
+	}
+
+}// anonymous namespace
+
+extern void Test_SmartPtr()
+{
+	cout << "Testing Loki\\SmartPtr" << endl;
+	Test_SmartPointer();
+	Test_SmartPtrRL();
+	Test_SmartPtrMT();
+	Test_RejectNull();
+	A::AssertInstCount();
+	cout << endl << endl;
+}
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_SmartPtrWin.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_SmartPtrWin.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_SmartPtrWin.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,145 @@
+#include <windows.h>
+#include <iostream>
+#include <vector>
+#include <algorithm>
+#include "SmartPtr.h"
+
+#if defined(TEST_LOKI_ORIG)
+namespace Loki
+{
+    template
+    <
+        typename T,
+        template <class> class OwnershipPolicy = RefCounted,
+        class ConversionPolicy = DisallowConversion,
+        template <class> class CheckingPolicy = AssertCheck,
+        template <class> class StoragePolicy = DefaultSPStorage
+    >
+    struct SmartPtrDef
+    {
+        typedef SmartPtr
+        <
+            T,
+            OwnershipPolicy,
+            ConversionPolicy,
+            CheckingPolicy,
+            StoragePolicy
+        >
+        type;
+    };
+} // namespace Loki
+#endif // defined(TEST_LOKI_ORIG)
+
+using namespace ::Loki;
+
+struct A 
+{ 
+    A()          { ++s_instCount; }
+    A(const A &) { ++s_instCount; }
+    virtual ~A() { --s_instCount; } 
+    
+    virtual const char *name() const = 0;
+
+    static void AssertInstCount()
+    {
+        assert(s_instCount == 0);
+    }
+
+private:
+    static int s_instCount;
+};
+
+int A::s_instCount = 0;
+
+struct B : A 
+{
+    virtual const char *name() const
+    {
+        return "B";
+    }
+};
+
+struct C : A 
+{
+    virtual const char *name() const
+    {
+        return "C";
+    }
+};
+
+template<class SmartPtr_A>
+struct PrintA
+{
+    void operator()(const SmartPtr_A &spA) const
+    {
+        std::cout << spA->name() << ", ";
+    }
+};
+
+void Test_SmartPtr()
+{
+#define MyRefCountedMT RefCountedMTAdj<ObjectLevelLockable>::RefCountedMT
+//#define MyRefCountedMT RefCountedMTAdj<ClassLevelLockable>::RefCountedMT
+
+    typedef SmartPtrDef<A, MyRefCountedMT>::type SmartPtr_A;
+    typedef SmartPtrDef<B, MyRefCountedMT>::type SmartPtr_B;
+    typedef SmartPtrDef<C, MyRefCountedMT>::type SmartPtr_C;
+
+#undef MyRefCountedMT
+
+    SmartPtr_B     spB(new B);
+    SmartPtr_C     spC(new C);
+
+    SmartPtr_A     spA1(spB);
+    SmartPtr_A     spA2(spC);
+
+    std::cout << spA1->name() << std::endl;
+    std::cout << spA2->name() << std::endl;
+
+    spA1 = spA2;
+    spA2 = spB;
+
+    std::cout << spA1->name() << std::endl;
+    
+    if (spA2 == spA1)
+    {
+        std::cout << spA2->name() << std::endl;
+    }
+
+    Reset(spA2, new C);
+    
+    if (spA2)
+    {
+        std::cout << spA2->name() << std::endl;
+    }
+
+    std::vector<SmartPtr_A> vectorA;
+
+    for (unsigned i = 0 ; i < 10 ; ++i)
+    {
+        if ((i % 3) == 0)
+        {
+            vectorA.push_back(new B);
+        }
+        else
+        {
+            vectorA.push_back(new C);
+        }
+    }
+
+    for (unsigned i = 0 ; i < 10 ; ++i)
+    {
+        vectorA.push_back(vectorA[i]);
+    }
+
+    std::for_each(vectorA.begin(), vectorA.end(), PrintA<SmartPtr_A>());
+
+    std::cout << std::endl;
+}
+
+int main()
+{
+    Test_SmartPtr();
+    A::AssertInstCount();
+}
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_Threads.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_Threads.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_Threads.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,21 @@
+//
+//Test the Thread components
+// MKH
+
+#include <Loki\Threads.h>
+using namespace ::Loki;
+
+#include <iostream>
+using std::cout;
+using std::endl;
+
+namespace
+{
+}
+
+extern void Test_Threads()
+{
+	cout << "Testing Loki\\Threads" << endl;
+	SingleThreaded<void>();
+	cout << endl << endl;
+}
\ No newline at end of file
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_Tuple.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_Tuple.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_Tuple.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,70 @@
+#include <cstdio>
+#include <typeinfo>
+#include "HierarchyGenerators.h"
+
+using namespace Loki;
+
+template<typename T>
+void PrintType(T &)
+{
+    printf("%s\n", typeid(T).name());
+}
+
+template<unsigned I>
+class PrintTuple
+{
+public:
+
+    template<typename T>
+    explicit PrintTuple(const T &x)
+    {
+        PrintTuple<I - 1> X(x);
+        PrintType(Field<I>(x));
+    }
+};
+
+template<>
+class PrintTuple<0>
+{
+public:
+
+    template<typename T>
+    explicit PrintTuple(const T &x)
+    {
+        PrintType(Field<0>(x));
+    }
+};
+
+
+template<typename T>
+void PrintTupleFunc()
+{
+    T   x;
+
+    PrintTuple<TL::Length<typename T::TList>::value - 1> X(x);
+}
+
+template<int> struct A {};
+
+int
+main()
+{
+    typedef TYPELIST_11(A<1>, A<1>, int, int, A<1>, A<2>, int[10], int, int *, A<2>, A<3>) typelist_t; 
+    typedef Tuple<typelist_t> tuple_t;
+    
+    PrintTupleFunc<tuple_t>();
+
+    tuple_t X;
+    A<3> Y = Field< A<3> >(X);
+    
+    // without -Za warning C4239: nonstandard extension used
+    // this is because VC sometimes binds temporary to non-const reference
+    // which leads to selecting the wrong Field function (non-const version)
+    // fixed in VC7.1
+    Y = Field< A<3> >(tuple_t());
+
+    A<3> &Y1 = Field< A<3> >(X);
+    Y1 = Y;
+}
+
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_TypeList.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_TypeList.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_TypeList.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,223 @@
+#include <cstdio>
+#include <typeinfo>
+#include <Loki\Typelist.h>
+#include <iostream>
+using std::cout;
+using std::endl;
+
+using namespace ::Loki;
+
+namespace
+{
+	typedef struct IncompType *IncompPtr;
+
+	struct A1 {};
+	struct B1 : A1 {};
+
+	struct A2 {};
+	struct B2 : A2 {};
+
+	struct C1 : B1 {};
+	struct C2 : B2 {};
+	struct D1 : C1, C2 {};
+
+	template<typename TList>
+	struct PrintTypelist
+	{
+		PrintTypelist()
+		{
+			typedef typename TList::Head Head;
+			typedef typename TList::Tail Tail;
+
+			printf("%s ,", typeid(Head).name());
+
+			PrintTypelist<Tail>();
+		}
+	};
+
+	template<>
+	struct PrintTypelist<NullType>
+	{
+		PrintTypelist()
+		{
+			printf("\n");
+		}
+	};
+
+
+	void Test_Length()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**, int, B2*, B2 const *, B1>::Result typelist_t;
+
+		printf("%u\n", TL::Length<typelist_t>::value);
+	}
+
+
+	void Test_TypeAt()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**, int>::Result typelist_t;
+
+		printf("%s, ", typeid(TL::TypeAt<typelist_t, 0>::Result).name());
+		printf("%s, ", typeid(TL::TypeAt<typelist_t, 1>::Result).name());
+		printf("%s, ", typeid(TL::TypeAt<typelist_t, 2>::Result).name());
+		printf("%s, ", typeid(TL::TypeAt<typelist_t, 3>::Result).name());
+		printf("%s, ", typeid(TL::TypeAt<typelist_t, 4>::Result).name());
+	    
+		printf("\n");
+	}
+
+	void Test_IndexOf()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**, int, B2*, B2 const *, B1>::Result typelist_t;
+
+		printf("%u, ", TL::IndexOf<typelist_t, IncompPtr>::value);
+		printf("%u, ", TL::IndexOf<typelist_t, B1>::value);
+		printf("%u, ", TL::IndexOf<typelist_t, B2*>::value);
+		printf("%u, ", TL::IndexOf<typelist_t, A2**>::value);
+		printf("%u, ", TL::IndexOf<typelist_t, int>::value);
+		printf("%u, ", TL::IndexOf<typelist_t, B2 const *>::value);
+		printf("%u, ", TL::IndexOf<typelist_t, const B1>::value);
+		printf("%u, ", TL::IndexOf<typelist_t, B1&>::value);
+		printf("%u, ", TL::IndexOf<typelist_t, int const &>::value);
+
+		printf("\n");
+	}
+
+	void Test_TypeAtNonStrict()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**, int>::Result typelist_t;
+
+		printf("%s, ", typeid(TL::TypeAtNonStrict<typelist_t, 0>::Result).name());
+		printf("%s, ", typeid(TL::TypeAtNonStrict<typelist_t, 1>::Result).name());
+		printf("%s, ", typeid(TL::TypeAtNonStrict<typelist_t, 2, double>::Result).name());
+		printf("%s, ", typeid(TL::TypeAtNonStrict<typelist_t, 3>::Result).name());
+		printf("%s, ", typeid(TL::TypeAtNonStrict<typelist_t, 4>::Result).name());
+		printf("%s, ", typeid(TL::TypeAtNonStrict<typelist_t, 5>::Result).name());
+		printf("%s, ", typeid(TL::TypeAtNonStrict<typelist_t, 9, void>::Result).name());
+	    
+		printf("\n");
+	}
+
+	void Test_Append()
+	{
+		typedef TL::MakeTypeList<int, A1, A2>::Result typelist1_t;
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**>::Result typelist2_t;
+
+		PrintTypelist<TL::Append<NullType, NullType>::Result>();
+		PrintTypelist<TL::Append<NullType, typelist2_t>::Result>();
+		PrintTypelist<TL::Append<typelist1_t, NullType>::Result>();
+		PrintTypelist<TL::Append<NullType, int>::Result>();
+		PrintTypelist<TL::Append<typelist1_t, int[10]>::Result>();
+		PrintTypelist<TL::Append<typelist1_t, typelist2_t>::Result>();
+	}
+
+	void Test_Erase()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**, B1>::Result typelist_t;
+
+		PrintTypelist<TL::Erase<typelist_t, int>::Result>();
+		PrintTypelist<TL::Erase<typelist_t, B1>::Result>();
+		PrintTypelist<TL::Erase<typelist_t, B2>::Result>();
+		PrintTypelist<TL::Erase<typelist_t, const B1>::Result>();
+		PrintTypelist<TL::Erase<typelist_t, B2 const *>::Result>();
+		PrintTypelist<TL::Erase<typelist_t, A2**>::Result>();
+		PrintTypelist<TL::Erase<typelist_t, NullType>::Result>();
+	}
+
+	void Test_EraseAll()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**, B1, B2*, B2 const *, B1>::Result typelist_t;
+
+		PrintTypelist<TL::EraseAll<typelist_t, int>::Result>();
+		PrintTypelist<TL::EraseAll<typelist_t, B1>::Result>();
+		PrintTypelist<TL::EraseAll<typelist_t, B2*>::Result>();
+		PrintTypelist<TL::EraseAll<typelist_t, B2 const *>::Result>();
+		PrintTypelist<TL::EraseAll<typelist_t, NullType>::Result>();
+	}
+
+	void Test_NoDuplicates()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**, B1, B2*, B2 const *, B1>::Result typelist1_t;
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**, B2 const *>::Result              typelist2_t;
+
+		PrintTypelist<TL::NoDuplicates<typelist1_t>::Result>();
+		PrintTypelist<TL::NoDuplicates<typelist2_t>::Result>();
+	}
+
+	void Test_Replace()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**, B1, B2*, B2 const *, B1>::Result typelist1_t;
+
+		PrintTypelist<TL::Replace<typelist1_t, int, A1>::Result>();
+		PrintTypelist<TL::Replace<typelist1_t, B1, int>::Result>();
+		PrintTypelist<TL::Replace<typelist1_t, B2*, B2[1]>::Result>();
+	}
+
+	void Test_ReplaceAll()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**, B1, B2*, B2 const *, B1>::Result typelist1_t;
+
+		PrintTypelist<TL::ReplaceAll<typelist1_t, int, A1>::Result>();
+		PrintTypelist<TL::ReplaceAll<typelist1_t, B1, int>::Result>();
+		PrintTypelist<TL::ReplaceAll<typelist1_t, B2*, B2[1]>::Result>();
+	}
+
+	void Test_Reverse()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2**, B1, B2*, B2 const *, B1>::Result typelist1_t;
+
+		PrintTypelist<TL::Reverse<typelist1_t>::Result>();
+	}
+
+	void Test_MostDerived()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2*, A2, C1, B1, B2*, B2 const *, B1>::Result typelist1_t;
+
+		printf("%s, ", typeid(TL::MostDerived<typelist1_t, A2>::Result).name());
+		printf("%s, ", typeid(TL::MostDerived<typelist1_t, A1>::Result).name());
+		printf("%s, ", typeid(TL::MostDerived<typelist1_t, B1>::Result).name());
+	    
+		printf("\n");
+	}
+
+	void Test_DerivedToFront()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2, A2, C1, B1, C2, D1, B2, A1, B1, A1>::Result typelist1_t;
+		typedef TL::MakeTypeList<B1, A1, C1>::Result typelist2_t;
+
+		PrintTypelist<TL::DerivedToFront<typelist1_t>::Result>();
+		PrintTypelist<TL::DerivedToFront<typelist2_t>::Result>();
+	}
+
+	void Test_DerivedToFrontAll()
+	{
+		typedef TL::MakeTypeList<IncompPtr, B1, B2, A2, C1, B1, C2, D1, B2, A1, B1, A1>::Result typelist1_t;
+		typedef TL::MakeTypeList<B1, A1, C1>::Result typelist2_t;
+
+		PrintTypelist<TL::DerivedToFrontAll<typelist1_t>::Result>();
+		PrintTypelist<TL::DerivedToFrontAll<typelist2_t>::Result>();
+	}
+
+}// anon namespace
+
+extern void Test_TypeList()
+{
+	cout << "Testing Loki::TypeList" << endl;
+	Test_Length();
+	Test_TypeAt();
+	Test_TypeAtNonStrict();
+	Test_IndexOf();
+	Test_Append();    
+	Test_Erase();
+	Test_EraseAll();
+	Test_NoDuplicates();
+	Test_Replace();
+	Test_ReplaceAll();
+	Test_Reverse();
+	Test_MostDerived();
+	Test_DerivedToFront();
+	Test_DerivedToFrontAll();
+	cout << endl << endl;
+}
+
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_Variant.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_Variant.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_Variant.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,95 @@
+#if defined(_MSC_VER) && _MSC_VER >= 1300
+#pragma warning (disable : 4503 4244)
+#endif
+
+// 4503:  decorated name length exceeded, name was truncated
+// 4244: 'argument' : conversion from '<tyep1>' to '<type2>', possible loss of data
+
+#include <string>
+#include <cassert>
+#include <iostream>
+#include "Variant.h"
+
+using namespace std;
+
+int main()
+{
+    try 
+    {
+        typedef Variant<TYPELIST_3(string, int, double)> DBField;
+                
+        DBField fld1(string("Hello, world"));
+        DBField fld2(25);
+        DBField fld3(3.14);
+    
+        assert(fld1.TypeId() == typeid(string));
+        assert(fld2.TypeId() == typeid(int));
+    
+        string* p = fld1.GetPtr<string>();
+        assert(p != 0);
+        *p += '!';
+        assert(fld1.Get<std::string>() == "Hello, world!");
+
+        fld3 = fld1;
+        assert(fld1.Get<std::string>() == "Hello, world!");
+        assert(fld3.Get<std::string>() == "Hello, world!");
+
+        fld3 = std::string("Assignment");
+        assert(fld3.Get<std::string>() == "Assignment");
+
+        DBField fld5;
+
+        assert(fld5.TypeId() == typeid(string));
+        assert(fld5.GetPtr<string>()->empty());
+
+        DBField fld4 = fld1;
+        assert(fld4.TypeId() == typeid(string));
+        assert(fld4.Get<std::string>() == "Hello, world!");
+
+        DBField fld(45);
+        float f = fld.ConvertTo<float>();
+        assert(f == 45);
+        (void)f;
+
+        fld2.ChangeType<double>();
+        assert(fld2.Get<double>() == 25);
+
+        typedef Variant<TYPELIST_3(string, int, float)> AlternateDBField;    
+        AlternateDBField fld6(fld1);
+        assert(fld6.Get<std::string>() == "Hello, world!");
+        
+        fld6 = fld3;
+        assert(fld6.Get<std::string>() == "Assignment");
+    
+#if defined(_MSC_VER) && _MSC_VER >= 1300
+        //
+        // Variant with VC non-standard alignment support
+        //
+        typedef TYPELIST_3(string, double, int) DBField2Typelist;
+        typedef Variant<DBField2Typelist, VC_AlignedPOD<DBField2Typelist> > AlternateDBField2;
+
+        AlternateDBField2 fld7(fld6);
+        assert(fld7.Get<std::string>() == "Assignment");
+        
+        fld7 = fld2;
+        assert(fld7.Get<double>() == 25.0);
+
+        enum {
+            OrigAlign = __alignof(fld1),
+            VCExAlign = __alignof(fld7)
+        };
+
+        STATIC_CHECK(OrigAlign == VCExAlign, WrongAlignment);
+
+#endif // def _MSC_VER
+    }
+    catch (const std::exception& e)
+    {
+        cout << "Something weird happened: " << e.what();
+    }
+    catch (...)
+    {
+        cout << "Something really weird happened.";
+    }
+}
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/Test_Visitor.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/Test_Visitor.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/Test_Visitor.cpp	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,158 @@
+#include <iostream>
+#include "Visitor.h"
+
+using namespace ::Loki;
+
+class RasterBitmap 
+    : public BaseVisitable<>
+{
+public:
+    DEFINE_VISITABLE()
+};
+
+class Paragraph
+    : public BaseVisitable<>
+{
+public:
+    DEFINE_VISITABLE()
+};
+
+
+class ParagraphEx 
+    : public Paragraph
+{
+public:
+    DEFINE_VISITABLE()
+};
+
+class DummyParagraph
+    : public Paragraph
+{
+public:
+    DEFINE_VISITABLE()
+};
+
+class DummyRasterBitmap
+    : public RasterBitmap
+{
+public:
+    DEFINE_VISITABLE()
+};
+
+class SomeVisitor 
+    : public BaseVisitor
+    , public Visitor<TYPELIST_3(RasterBitmap, Paragraph, ParagraphEx)>
+    , public BaseVisitorImpl<TYPELIST_2(DummyParagraph, DummyRasterBitmap)>
+{
+public:
+     void Visit(RasterBitmap&)
+     {
+         std::cout << "SomeVisitor::Visit(RasterBitmap&)" << '\n';
+     }
+
+     void Visit(Paragraph &)
+     {
+         std::cout << "SomeVisitor::Visit(Paragraph&)" << '\n';
+     }
+
+     void Visit(ParagraphEx &)
+     {
+         std::cout << "SomeVisitor::Visit(ParagraphEx&)" << '\n';
+     }
+};
+
+
+void Test_Visitor()
+{
+    SomeVisitor     someVisit;
+    BaseVisitor    &baseVisit = someVisit;
+
+    RasterBitmap    rast;
+    rast.Accept(baseVisit);
+    
+    Paragraph       par;
+    par.Accept(baseVisit);
+
+    ParagraphEx     parEx;
+    parEx.Accept(baseVisit);
+
+    DummyRasterBitmap dummyRast;
+    dummyRast.Accept(baseVisit);
+
+    DummyParagraph    dummyPar;
+    dummyPar.Accept(baseVisit);
+}
+
+typedef CyclicVisitor
+<
+    void,
+    TYPELIST_3(class DocElement, class RasterBitmap2, class Paragraph2)
+>
+MyCyclicVisitor;
+
+
+class DocElement
+{
+public:
+    virtual void Accept(MyCyclicVisitor &) = 0;
+    virtual ~DocElement() {}
+};
+
+class RasterBitmap2
+    : public DocElement
+{
+public:
+    DEFINE_CYCLIC_VISITABLE(MyCyclicVisitor)
+};
+
+class Paragraph2 
+    : public DocElement
+{
+public:
+    DEFINE_CYCLIC_VISITABLE(MyCyclicVisitor)
+};
+
+class SomeVisitor2
+    : public MyCyclicVisitor
+{
+public:
+     void Visit(DocElement &)
+     {
+         std::cout << "SomeVisitor::Visit(DocElement&)" << '\n';
+     }
+
+     void Visit(Paragraph2 &)
+     {
+         std::cout << "SomeVisitor::Visit(Paragraph2&)" << '\n';
+     }
+
+     void Visit(RasterBitmap2 &)
+     {
+         std::cout << "SomeVisitor::Visit(RasterBitmap2&)" << '\n';
+     }
+};
+
+void Test_CyclicVisitor()
+{
+    SomeVisitor2     someVisit;
+    MyCyclicVisitor  &baseVisit = someVisit;
+
+    RasterBitmap2   rast;
+    rast.Accept(baseVisit);
+    
+    Paragraph2      par;
+    par.Accept(baseVisit);
+
+    DocElement     &docElem1 = par;
+    docElem1.Accept(baseVisit);
+
+    DocElement     &docElem2 = rast;
+    docElem2.Accept(baseVisit);
+}
+
+int main()
+{
+    Test_Visitor();
+    Test_CyclicVisitor();
+}
+
Index: avida/current/source/third-party/Loki/tools/RegressionTest/readme.txt
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/readme.txt:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/readme.txt	Wed Sep 24 01:12:09 2003
@@ -0,0 +1,5 @@
+Incomplete, needs work
+Output should be purged, and the results automatically verified.
+
+
+MKH
\ No newline at end of file
Index: avida/current/source/third-party/Loki/tools/RegressionTest/AllTest/AllTest.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/AllTest/AllTest.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/AllTest/AllTest.cpp	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,31 @@
+
+extern void Test_TypeList();
+extern void Test_SmallObj();
+extern void Test_Functor();
+extern void Test_Singleton();
+extern void Test_SmartPtr();
+extern void Test_ObjectFactory();
+extern void Test_AbstractFactory();
+extern void Test_Vistor();
+extern void Test_MultiMethods();
+extern void Test_Threads();
+
+#include <stdlib.h>
+
+int main()
+	{
+	Test_TypeList();
+	Test_SmartPtr();
+	Test_Singleton();
+	Test_Threads();
+	/*Test_SmallObj();
+	Test_Functor();
+	*/
+	
+	/*Test_ObjectFactory();
+	Test_AbstractFactory();
+	Test_Vistor();
+	Test_MultiMethods();
+	*/
+	system("pause");
+	};
\ No newline at end of file
Index: avida/current/source/third-party/Loki/tools/RegressionTest/AllTest/AllTest.vcproj
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest/AllTest/AllTest.vcproj:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest/AllTest/AllTest.vcproj	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="AllTest"
+	ProjectGUID="{59800972-3512-4147-9E8F-F5239C241F77}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="5"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/AllTest.exe"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/AllTest.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="TRUE"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="4"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/AllTest.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Test"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+			<File
+				RelativePath="AllTest.cpp">
+			</File>
+			<File
+				RelativePath="..\Test_Singleton.cpp">
+			</File>
+			<File
+				RelativePath="..\Test_SmartPtr.cpp">
+			</File>
+			<File
+				RelativePath="..\Test_Threads.cpp">
+			</File>
+			<File
+				RelativePath="..\Test_TypeList.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Loki"
+			Filter="">
+			<File
+				RelativePath="..\..\..\Singleton.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\SmallObj.cpp">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/AbstractFactoryTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/AbstractFactoryTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/AbstractFactoryTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef ABSTRACTFACTORYTEST_H
+#define ABSTRACTFACTORYTEST_H
+
+#include <memory>
+#include <typeinfo>
+#include <loki/AbstractFactory.h>
+#include "UnitTest.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// AbstractFactoryTest
+///////////////////////////////////////////////////////////////////////////////
+
+class Soldier { public: virtual ~Soldier() {} };
+class Monster { public: virtual ~Monster() {} };
+class SuperMonster { public: virtual ~SuperMonster() {} };
+
+class SillySoldier : public Soldier {};
+class SillyMonster : public Monster {};
+class SillySuperMonster : public SuperMonster {};
+
+class BadSoldier : public Soldier {};
+class BadMonster : public Monster {};
+class BadSuperMonster : public SuperMonster {};
+
+typedef Loki::AbstractFactory<TYPELIST_3(Soldier, Monster, SuperMonster)> AbstractEnemyFactory; 
+
+typedef Loki::ConcreteFactory<AbstractEnemyFactory, Loki::OpNewFactoryUnit,
+	TYPELIST_3(SillySoldier, SillyMonster, SillySuperMonster)> EasyLevelEnemyFactory;
+
+typedef Loki::ConcreteFactory<AbstractEnemyFactory, Loki::OpNewFactoryUnit,
+	TYPELIST_3(BadSoldier, BadMonster, BadSuperMonster)> HardLevelEnemyFactory;
+
+class AbstractFactoryTest : public Test
+{
+public:
+	AbstractFactoryTest() : Test("AbstractFactory.h") {}
+
+	virtual void execute(TestResult &result)
+		{
+		printName(result);
+
+		using namespace Loki;
+
+		bool r;
+
+		std::auto_ptr<AbstractEnemyFactory> easyFactory(new EasyLevelEnemyFactory);
+		std::auto_ptr<AbstractEnemyFactory> hardFactory(new HardLevelEnemyFactory);
+
+		Soldier *s;
+
+		s = easyFactory->Create<Soldier>();
+
+		r=typeid(*s)==typeid(SillySoldier);
+
+		delete s;
+
+#ifndef __BORLANDC__
+
+		s = hardFactory->Create<Soldier>(); //BCB bug!!! - always creates SillySoldier
+
+		r=r && typeid(*s)==typeid(BadSoldier);
+
+		delete s;
+
+#endif
+
+		testAssert("AbstractFactory",r,result);
+
+		std::cout << '\n';
+		}
+};
+
+#endif
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/AssocVectorTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/AssocVectorTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/AssocVectorTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,358 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef ASSOCVECTORTEST_H
+#define ASSOCVECTORTEST_H
+
+#include <cstdio>
+#include <cstdlib>
+#include <loki/AssocVector.h>
+#include "UnitTest.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// AssocVectorTest
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+// STL compatible allocator
+///////////////////////////////////////////////////////////////////////////////
+
+template <class T> class TestAllocator : public std::allocator<T>
+{
+public:
+	typedef T 								value_type;
+	typedef value_type* 			pointer;
+	typedef const value_type* const_pointer;
+	typedef value_type& 			reference;
+	typedef const value_type& const_reference;
+	typedef std::size_t 			size_type;
+	typedef std::ptrdiff_t		difference_type;
+
+	template <class U>
+	struct rebind { typedef TestAllocator<U> other; };
+
+	TestAllocator() {}
+	TestAllocator(const TestAllocator&) {}
+	template <class U>
+	TestAllocator(const TestAllocator<U>&) {}
+	~TestAllocator() {}
+
+	pointer address(reference x) const { return &x; }
+	const_pointer address(const_reference x) const {
+		return x;
+	}
+
+	pointer allocate(size_type n, const_pointer = 0) {
+		return static_cast<pointer>(::operator new(n * sizeof(T)));
+	}
+
+	void deallocate(pointer p, size_type size) {
+		::operator delete(p);
+	}
+
+	size_type max_size() const {
+		return static_cast<size_type>(-1) / sizeof(T);
+	}
+
+	void construct(pointer p, const value_type& x) {
+		new(p) value_type(x);
+	}
+	void destroy(pointer p) {
+#ifndef _USE_OLD_RW_STL  // ?? failed to compile when RogueWave is enabled !?!
+		p->~value_type();
+#endif
+	}
+
+private:
+	void operator=(const TestAllocator&);
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// AVTestClass
+///////////////////////////////////////////////////////////////////////////////
+
+class AVTestClass
+{
+public:
+		AVTestClass(int value) : value_(value) {}
+		AVTestClass(const AVTestClass& other) : value_(other.value_) {}
+		AVTestClass& operator=(const AVTestClass& other) {
+				value_ = other.value_;
+				return *this;
+		}
+
+		int value_;
+};
+
+bool operator<(const AVTestClass& lhs, const AVTestClass& rhs)
+{
+		return lhs.value_ < rhs.value_;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// str_less
+///////////////////////////////////////////////////////////////////////////////
+
+struct str_less : public std::binary_function<const char*, const char*, bool> {
+		bool operator()(const char* x, const char* y) const {
+				return strcmp(x, y) < 0;
+		}
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// int_less
+///////////////////////////////////////////////////////////////////////////////
+
+unsigned int_test_count = 0; // to verify usage
+struct int_less : public std::less<int>
+{
+		bool operator()(int x, int y) const {
+				++int_test_count;
+				return x < y;
+		}
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// is_sorted
+///////////////////////////////////////////////////////////////////////////////
+
+template<class Vect>
+bool is_sorted(const Vect& v) {
+		if (v.size() < 2) return true;
+		typename Vect::const_iterator it = v.begin();
+		typename Vect::key_type previous = it->first;
+		++it;
+		while (it != v.end()) {
+				typename Vect::key_type current = it->first;
+				if (!(Vect::key_compare()(previous, current))) return false;
+				previous = current;
+				++it;
+		}
+		return true;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+typedef Loki::AssocVector<int, int, std::less<int>, TestAllocator<std::pair<int, int> > > test_vect1_t;
+typedef Loki::AssocVector<const char*, int, str_less, TestAllocator<std::pair<const char*, int> > > test_vect2_t;
+typedef Loki::AssocVector<std::string, std::string> test_vect3_t;
+typedef Loki::AssocVector<AVTestClass, AVTestClass, std::less<AVTestClass>, TestAllocator<std::pair<AVTestClass, AVTestClass> > > test_vect4_t;
+typedef Loki::AssocVector<int, const char*> test_vect5_t;
+
+///////////////////////////////////////////////////////////////////////////////
+
+void check_insert1(test_vect1_t& v)
+{
+		std::srand(10);
+		for (unsigned i = 0; i < 100; ++i) {
+				int x = std::rand();
+				v.insert(std::make_pair(x, x));
+				assert(is_sorted(v));
+		}
+		assert(v.size() == 100);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// check_swap
+///////////////////////////////////////////////////////////////////////////////
+
+template <class Vect>
+void check_swap(Vect& v1, Vect& v2)
+{
+		unsigned size1 = v1.size();
+		unsigned size2 = v2.size();
+		v1.swap(v2);
+		assert(v1.size() == size2);
+		assert(v2.size() == size1);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// test_vect1
+///////////////////////////////////////////////////////////////////////////////
+
+void test_vect1()
+{
+		test_vect1_t vec11;
+		assert(vec11.size() == 0);
+
+		check_insert1(vec11);
+		unsigned size1 = vec11.size();
+		assert(size1);
+
+		test_vect1_t vec12(vec11.begin(), vec11.end());
+		assert(vec12.size() == vec11.size());
+		assert(vec11.size() == size1);
+
+		test_vect1_t vec13;
+		vec13 = vec11;
+		assert(vec13.size() == vec11.size());
+		assert(vec11.size() == size1);
+
+		// this doesn't compile on Borland C++ 6.0 !?!
+		//test_vect1_t vec99(test_vect1_t::key_compare(), TestAllocator<test_vect1_t::value_type>());
+		//assert(vec99.size() == 0); //- here ir cries
+
+		test_vect1_t::key_compare comp = test_vect1_t::key_compare();
+		test_vect1_t vec14(comp, TestAllocator<test_vect1_t::value_type>());
+		assert(vec14.size() == 0);
+
+		check_swap(vec11, vec14);
+		assert(vec14.size() == size1);
+		assert(vec11.size() == 0);
+
+		// this compiles, unlike object on stack
+		test_vect1_t* vec15 = new test_vect1_t(test_vect1_t::key_compare(), TestAllocator<test_vect1_t::value_type>());
+		assert(vec15->size() == 0);
+		check_insert1(*vec15);
+		delete vec15;
+
+		// different comparator test - doesn't work for Loki
+		//comp = int_less();
+		//test_vect1_t vec16(comp);
+		//assert(vec16.size() == 0);
+		//assert(int_test_count == 0);
+		//check_insert1(vec16);
+		//assert(int_test_count != 0);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// test_vect2
+///////////////////////////////////////////////////////////////////////////////
+
+void test_vect2()
+{
+		test_vect2_t vec21;
+		vec21.insert(std::make_pair("abc", 1));
+		vec21.insert(std::make_pair("xyz", 3));
+		vec21.insert(std::make_pair("def", 2));
+		assert(vec21.size() == 3);
+		assert(is_sorted(vec21));
+
+		test_vect2_t::iterator it = vec21.find("xyz");
+		assert(it != vec21.end());
+		assert(it->second == 3);
+
+		std::pair<test_vect2_t::iterator, bool> aux = vec21.insert(std::make_pair("xyz", 99));
+		assert(aux.first);
+		it = vec21.find("xyz");
+		assert(it->second == 3);
+
+		vec21.erase(it);
+		assert(vec21.size() == 2);
+		it = vec21.find("xyz");
+		assert(it == vec21.end());
+		vec21.erase("xyz");
+		vec21.erase("abc");
+		assert(vec21.size() == 1);
+
+		vec21.clear();
+		assert(vec21.size() == 0);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// test_vect3
+///////////////////////////////////////////////////////////////////////////////
+
+void test_vect3()
+{
+		// To use string, you need:
+		// 1) enable _STLP_USE_NEWALLOC in include\stl\_site_config.h
+		// 2) either disable use of any dynamic RTL (menu Project | Options | Linker)
+		// 3) or recompile STLPort DLL.
+		// This all is related to bug in STLPort allocator.
+		test_vect3_t vec31;
+		std::srand(111);
+		// a stress test
+		for (unsigned i = 0; i < 2 * 1000; ++i) {
+				char buffer[16];
+				std::sprintf(buffer, "string%d", std::rand());
+				std::string s(buffer);
+				vec31.insert(std::make_pair(s, s));
+		}
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// test_vect4
+///////////////////////////////////////////////////////////////////////////////
+
+void test_vect4()
+{
+		test_vect4_t vec41;
+		for (int i = 0; i < 100; ++i) {
+				vec41.insert(std::make_pair(AVTestClass(i), AVTestClass(i)));
+		}
+		assert(vec41.size() == 100);
+
+		vec41.insert(std::make_pair(AVTestClass(300), AVTestClass(300)));
+		vec41.insert(std::make_pair(AVTestClass(200), AVTestClass(200)));
+		assert(vec41.size() == 102);
+
+		test_vect4_t::iterator it = vec41.find(AVTestClass(22));
+		assert(it != vec41.end());
+		assert(it->second.value_ == 22);
+
+		test_vect4_t vec42;
+		vec42.swap(vec41);
+		assert(vec41.size() == 0);
+		assert(vec42.size() == 102);
+
+		vec42.erase(vec42.begin(), vec42.end());
+		assert(vec42.size() == 0);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// test_vect5
+///////////////////////////////////////////////////////////////////////////////
+
+void test_vect5()
+{
+		test_vect5_t vec51;
+		vec51.insert(test_vect5_t::value_type(3, "XXX"));
+		vec51.insert(std::make_pair(1, "X"));
+		vec51.insert(std::make_pair(2, "XX"));
+
+		test_vect5_t::const_iterator it = vec51.begin();
+		int count=1;
+
+		while (it != vec51.end()) {
+				assert(std::string(it->second).length()==count);
+
+				++count;
+
+				it++; // intentionally
+		}
+}
+
+class AssocVectorTest : public Test
+{
+public:
+	AssocVectorTest() : Test("AssocVector.h") {}
+
+	virtual void execute(TestResult &result)
+		{
+		printName(result);
+
+		test_vect1();
+		test_vect2();
+		test_vect3();
+		test_vect4();
+		test_vect5();
+
+		testAssert("AssocVector",true,result),
+
+		std::cout << '\n';
+		}
+};
+
+#endif
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/FactoryTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/FactoryTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/FactoryTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,147 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef FACTORYTEST_H
+#define FACTORYTEST_H
+
+#include <loki/Factory.h>
+#include "UnitTest.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// FactoryTest
+///////////////////////////////////////////////////////////////////////////////
+
+namespace FactoryTestPrivate
+{
+	class Shape
+	{
+	public:
+		virtual ~Shape() = 0;
+	};
+
+	inline Shape::~Shape() {}
+
+	class Polygon : public Shape
+	{
+	};
+
+	class Line : public Shape
+	{
+	};
+
+	class Circle : public Shape
+	{
+	};
+
+	Polygon *createPolygon() { return new Polygon; }
+	Line *createLine() { return new Line; }
+	Circle *createCircle() { return new Circle; }
+
+	Polygon *clonePolygon(Polygon *) { return new Polygon; }
+	Line *cloneLine(Line *) { return new Line; }
+	Circle *cloneCircle(Circle *) { return new Circle; }
+
+	typedef Loki::Factory<Shape, int> FactoryType;
+
+	bool testFactory()
+	{
+		FactoryType factory;
+
+		factory.Register(1, (Shape * (*)()) createPolygon);
+		factory.Register(2, (Shape * (*)()) createCircle);
+		factory.Register(3, (Shape * (*)()) createLine);
+
+		Shape *s;
+
+		s = factory.CreateObject(1);
+		delete s;
+		bool test1=s!=NULL;
+
+		s = factory.CreateObject(2);
+		delete s;
+		bool test2=s!=NULL;
+
+		s = factory.CreateObject(3);
+		delete s;
+		bool test3=s!=NULL;
+
+		bool test4=true;
+
+//		try
+//		{
+//			factory.CreateObject(4);
+//
+//			test4=false;
+//		}
+//		catch (std::exception&)
+//		{
+//		}
+
+		return test1 && test2 && test3 && test4;
+	}
+
+	typedef Loki::CloneFactory<Shape> CloneFactoryType;
+
+	bool testCloneFactory()
+	{
+		CloneFactoryType factory;
+
+		factory.Register(Loki::TypeInfo(typeid(Polygon)), (Shape * (*)(const Shape *)) clonePolygon);
+		factory.Register(Loki::TypeInfo(typeid(Circle)), (Shape * (*)(const Shape *)) cloneCircle);
+		factory.Register(Loki::TypeInfo(typeid(Line)), (Shape * (*)(const Shape *)) cloneLine);
+
+		Polygon p;
+		Circle c;
+		Line l;
+
+		Shape *s;
+
+		s = factory.CreateObject(&p);
+		delete s;
+		bool test1=s!=NULL;
+
+		s = factory.CreateObject(&c);
+		delete s;
+		bool test2=s!=NULL;
+
+		s = factory.CreateObject(&l);
+		delete s;
+		bool test3=s!=NULL;
+
+		return test1 && test2 && test3;
+	}
+}
+
+class FactoryTest : public Test
+{
+public:
+	FactoryTest() : Test("Factory.h") {}
+
+	virtual void execute(TestResult &result)
+		{
+		printName(result);
+
+		bool test1=FactoryTestPrivate::testFactory();
+
+		bool test2=FactoryTestPrivate::testCloneFactory();
+
+		bool r=test1 && test2;
+
+		testAssert("Factory",r,result);
+
+		std::cout << '\n';
+		}
+};
+
+#endif
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/FunctorTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/FunctorTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/FunctorTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,109 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef FUNCTORTEST_H
+#define FUNCTORTEST_H
+
+#include <loki/Functor.h>
+#include "UnitTest.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// FunctorTest
+///////////////////////////////////////////////////////////////////////////////
+
+class FunctorTest : public Test
+{
+public:
+	FunctorTest() : Test("Functor.h") {}
+
+	virtual void execute(TestResult &result)
+		{
+		printName(result);
+
+		using namespace Loki;
+
+		bool r;
+
+		TestFunctor testFunctor;
+		TestClass testClass;
+
+		Functor<void,TYPELIST_1(bool &)> function(testFunction);
+		Functor<void,TYPELIST_1(bool &)> functor(testFunctor);
+		Functor<void,TYPELIST_1(bool &)> classFunctor(&testClass,&TestClass::member);
+		Functor<void,TYPELIST_1(bool &)> functorCopy(function);
+		Functor<void,NullType> bindFunctor(BindFirst(function,testResult));
+		Functor<void> chainFunctor(Chain(bindFunctor,bindFunctor));
+
+		testResult=false;
+		function(testResult);
+		bool functionResult=testResult;
+
+		testResult=false;
+		functor(testResult);
+		bool functorResult=testResult;
+
+		testResult=false;
+		classFunctor(testResult);
+		bool classFunctorResult=testResult;
+
+		testResult=false;
+		functorCopy(testResult);
+		bool functorCopyResult=testResult;
+
+		testResult=false;
+		bindFunctor();
+		bool bindFunctorResult=testResult;
+
+		testResult=false;
+		chainFunctor();
+		bool chainFunctorResult=testResult;
+
+		r=functionResult && functorResult && classFunctorResult && functorCopyResult && bindFunctorResult &&
+			chainFunctorResult;
+
+		testAssert("Functor",r,result);
+
+		std::cout << '\n';
+		}
+
+private:
+	static bool testResult;
+
+	static void testFunction(bool &result)
+		{
+		result=true;
+		}
+
+	class TestFunctor
+	{
+	public:
+		void operator()(bool &result)
+			{
+			result=true;
+			}
+	};
+
+	class TestClass
+	{
+	public:
+		void member(bool &result)
+			{
+			result=true;
+			}
+	};
+};
+
+bool FunctorTest::testResult;
+
+#endif
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/LokiTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/LokiTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/LokiTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,77 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LOKITEST_H
+#define LOKITEST_H
+
+#include "TypelistTest.h"
+#include "TypeManipTest.h"
+#include "TypeTraitsTest.h"
+#include "SmallObjectTest.h"
+#include "SingletonTest.h"
+#include "SmartPtrTest.h"
+#include "FactoryTest.h"
+#include "AbstractFactoryTest.h"
+#include "AssocVectorTest.h"
+#include "FunctorTest.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// LokiTest
+///////////////////////////////////////////////////////////////////////////////
+
+class LokiTest
+{
+public:
+	LokiTest()
+		{
+		addTests();
+		}
+
+	int result()
+		{
+		return unitTest.run("Unit Test",tests);
+		}
+
+private:
+	void addTests()
+		{
+		tests.add(typelistTest);
+		tests.add(typeManipTest);
+		tests.add(typeTraitsTest);
+		tests.add(smallObjectTest);
+		tests.add(singletonTest);
+		tests.add(smartPtrTest);
+		tests.add(factoryTest);
+		tests.add(abstractFactoryTest);
+		tests.add(assocVectorTest);
+		tests.add(functorTest);
+		}
+
+private:
+	UnitTest unitTest;
+	TestSuite tests;
+
+	TypelistTest typelistTest;
+	TypeManipTest typeManipTest;
+	TypeTraitsTest typeTraitsTest;
+	SmallObjectTest smallObjectTest;
+	SingletonTest singletonTest;
+	SmartPtrTest smartPtrTest;
+	FactoryTest factoryTest;
+	AbstractFactoryTest abstractFactoryTest;
+	AssocVectorTest assocVectorTest;
+	FunctorTest functorTest;
+};
+
+#endif
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/SingletonTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/SingletonTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/SingletonTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,157 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef SINGLETONTEST_H
+#define SINGLETONTEST_H
+
+#include <cassert>
+#include <loki/Singleton.h>
+#include "UnitTest.h"
+
+#define MAKE_TEST(name)\
+		if(singletonTest && name::Instance().a != 99)\
+			singletonTest=false;\
+		++name::Instance().a;\
+		if(singletonTest && name::Instance().a != 100)\
+			singletonTest=false;
+
+///////////////////////////////////////////////////////////////////////////////
+// SingletonTest
+///////////////////////////////////////////////////////////////////////////////
+
+template<int N>
+class MyClass
+{
+public:
+	MyClass() : a(99), wasDestroyed(false) {}
+
+	virtual ~MyClass()
+	{
+		assert(!wasDestroyed);
+
+		wasDestroyed = true;
+	}
+
+public:
+	int a;
+	bool wasDestroyed;
+};
+
+inline unsigned GetLongevity(MyClass<3> *) { return 6; }
+inline unsigned GetLongevity(MyClass<7> *) { return 5; }
+inline unsigned GetLongevity(MyClass<11> *) { return 4; }
+inline unsigned GetLongevity(MyClass<15> *) { return 1; }
+inline unsigned GetLongevity(MyClass<19> *) { return 2; }
+inline unsigned GetLongevity(MyClass<23> *) { return 3; }
+
+namespace
+{
+	using namespace Loki;
+
+	typedef SingletonHolder<MyClass<0> > t0;
+
+	typedef SingletonHolder<MyClass<1>, CreateUsingNew, DefaultLifetime, SingleThreaded> t1;
+	typedef SingletonHolder<MyClass<2>, CreateUsingNew, PhoenixSingleton, SingleThreaded> t2;
+	typedef SingletonHolder<MyClass<3>, CreateUsingNew, SingletonWithLongevity, SingleThreaded> t3;
+	typedef SingletonHolder<MyClass<4>, CreateUsingNew, NoDestroy, SingleThreaded> t4;
+
+	typedef SingletonHolder<MyClass<9>, CreateUsingMalloc, DefaultLifetime, SingleThreaded> t9;
+	typedef SingletonHolder<MyClass<10>, CreateUsingMalloc, PhoenixSingleton, SingleThreaded> t10;
+	typedef SingletonHolder<MyClass<11>, CreateUsingMalloc, SingletonWithLongevity, SingleThreaded> t11;
+	typedef SingletonHolder<MyClass<12>, CreateUsingMalloc, NoDestroy, SingleThreaded> t12;
+
+	typedef SingletonHolder<MyClass<17>, CreateStatic, DefaultLifetime, SingleThreaded> t17;
+	typedef SingletonHolder<MyClass<18>, CreateStatic, PhoenixSingleton, SingleThreaded> t18;
+	typedef SingletonHolder<MyClass<19>, CreateStatic, SingletonWithLongevity, SingleThreaded> t19;
+	typedef SingletonHolder<MyClass<20>, CreateStatic, NoDestroy, SingleThreaded> t20;
+
+#if !__INTEL_COMPILER && !__GNUC__
+
+	typedef SingletonHolder<MyClass<5>, CreateUsingNew, DefaultLifetime, ClassLevelLockable> t5;
+	typedef SingletonHolder<MyClass<6>, CreateUsingNew, PhoenixSingleton, ClassLevelLockable> t6;
+	typedef SingletonHolder<MyClass<7>, CreateUsingNew, SingletonWithLongevity, ClassLevelLockable> t7;
+	typedef SingletonHolder<MyClass<8>, CreateUsingNew, NoDestroy, ClassLevelLockable> t8;
+
+	typedef SingletonHolder<MyClass<13>, CreateUsingMalloc, DefaultLifetime, ClassLevelLockable> t13;
+	typedef SingletonHolder<MyClass<14>, CreateUsingMalloc, PhoenixSingleton, ClassLevelLockable> t14;
+	typedef SingletonHolder<MyClass<15>, CreateUsingMalloc, SingletonWithLongevity, ClassLevelLockable> t15;
+	typedef SingletonHolder<MyClass<16>, CreateUsingMalloc, NoDestroy, ClassLevelLockable> t16;
+
+	typedef SingletonHolder<MyClass<21>, CreateStatic, DefaultLifetime, ClassLevelLockable> t21;
+	typedef SingletonHolder<MyClass<22>, CreateStatic, PhoenixSingleton, ClassLevelLockable> t22;
+	typedef SingletonHolder<MyClass<23>, CreateStatic, SingletonWithLongevity, ClassLevelLockable> t23;
+	typedef SingletonHolder<MyClass<24>, CreateStatic, NoDestroy, ClassLevelLockable> t24;
+
+#endif
+}
+
+class SingletonTest : public Test
+{
+public:
+	SingletonTest() : Test("Singleton.h") {}
+
+	virtual void execute(TestResult &result)
+		{
+		printName(result);
+
+		using namespace Loki;
+
+		singletonTest=true;
+
+		MAKE_TEST(t0)
+
+		MAKE_TEST(t1)
+		MAKE_TEST(t2)
+		MAKE_TEST(t3)
+		MAKE_TEST(t4)
+
+		MAKE_TEST(t9)
+		MAKE_TEST(t10)
+		MAKE_TEST(t11)
+		MAKE_TEST(t12)
+
+		MAKE_TEST(t17)
+		MAKE_TEST(t18)
+		MAKE_TEST(t19)
+		MAKE_TEST(t20)
+
+#if !__INTEL_COMPILER && !__GNUC__
+
+		MAKE_TEST(t5)
+		MAKE_TEST(t6)
+		MAKE_TEST(t7)
+		MAKE_TEST(t8)
+
+		MAKE_TEST(t13)
+		MAKE_TEST(t14)
+		MAKE_TEST(t15)
+		MAKE_TEST(t16)
+
+		MAKE_TEST(t21)
+		MAKE_TEST(t22)
+		MAKE_TEST(t23)
+		MAKE_TEST(t24)
+
+#endif
+
+		testAssert("Singleton",singletonTest,result);
+
+		std::cout << '\n';
+		}
+
+private:
+	bool singletonTest;
+};
+
+#endif
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/SmallObjectTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/SmallObjectTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/SmallObjectTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,164 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef SMALLOBJECTTEST_H
+#define SMALLOBJECTTEST_H
+
+#include <cstdlib>
+#include <loki/SmallObj.h>
+#include "UnitTest.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// SmallObjectTest
+///////////////////////////////////////////////////////////////////////////////
+
+class SmallObjectTest : public Test
+{
+public:
+	SmallObjectTest() : Test("SmallObject.h") {}
+
+	virtual void execute(TestResult &result)
+		{
+		printName(result);
+
+		using namespace Loki;
+
+		bool r;
+
+		SmallClass* a = new SmallClass;
+		delete a;
+
+		bool smallTest1=a!=NULL;
+
+		a = new SmallClass2;
+		delete a;
+
+		bool smallTest2=a!=NULL;
+
+		BigClass* b = new BigClass;
+		delete b;
+
+		bool bigTest1=b!=NULL;
+
+		b = new BigClass2;
+		delete b;
+
+		bool bigTest2=b!=NULL;
+
+		char* buff = static_cast<char*>(Loki::SmallObject<>::operator new(10));
+		Loki::SmallObject<>::operator delete(buff, 10);
+
+		bool test=buff!=NULL;
+
+//		stress_test();
+
+		r=smallTest1 && smallTest2 && bigTest1 && bigTest2 && test;
+
+		testAssert("SmallObject",r,result);
+
+		std::cout << '\n';
+		}
+
+private:
+	class SmallClass : public Loki::SmallObject<>
+	{
+		int a;
+	};
+
+	class SmallClass2 : public SmallClass
+	{
+		int b;
+	};
+
+	class BigClass : public Loki::SmallObject<>
+	{
+		char a[200];
+	};
+
+	class BigClass2 : public BigClass
+	{
+		int b;
+	};
+
+	class Base
+	{
+	public:
+		virtual ~Base() {}
+	};
+
+	class A : public Base, public Loki::SmallObject<>
+	{
+		int a[1];
+	};
+
+	class B : public Base, public Loki::SmallObject<>
+	{
+		int a[2];
+	};
+
+	class C : public Base, public Loki::SmallObject<>
+	{
+		int a[3];
+	};
+
+	class D : public Base, public Loki::SmallObject<>
+	{
+		int a[4];
+	};
+
+	static void stress_test()
+	{
+		std::vector<Base*> vec;
+
+		vec.reserve(20 * 1024);
+
+		std::srand(1231);
+
+		for (int i = 0; i < 10; ++i)
+		{
+			for (int j = 0; j < 2 * 1024; ++j)
+			{
+				Base* p;
+
+				switch (std::rand() % 4)
+				{
+					case 0: p = new A; break;
+					case 1: p = new B; break;
+					case 2: p = new C; break;
+					case 3: p = new D; break;
+				}
+
+				vec.push_back(p);
+			}
+
+			for (int j = 0; j < 1024; ++j)
+			{
+				int pos = std::rand() % vec.size();
+
+				delete vec[pos];
+
+				vec[pos] = 0;
+			}
+		}
+
+		while (!vec.empty())
+		{
+			delete vec.back();
+
+			vec.pop_back();
+		}
+	}
+};
+
+#endif
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/SmartPtrTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/SmartPtrTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/SmartPtrTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,290 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef SMARTPTRTEST_H
+#define SMARTPTRTEST_H
+
+#include <loki/SmartPtr.h>
+#include "UnitTest.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// SmartPtrTest
+///////////////////////////////////////////////////////////////////////////////
+
+class TestClass
+{
+public:
+	TestClass() : references(1)
+	{
+		++instances;
+	}
+
+	~TestClass()
+	{
+		--instances;
+	}
+
+	void AddRef()
+	{
+		++references;
+	}
+
+	void Release()
+	{
+	--references;
+
+	if (references <= 0)
+		delete this;
+	}
+
+public:
+	static int instances;
+
+	int references;
+};
+
+int TestClass::instances = 0;
+
+class SmartPtrTest : public Test
+{
+public:
+	SmartPtrTest() : Test("SmartPtr.h") {}
+
+	virtual void execute(TestResult &result)
+		{
+		printName(result);
+
+		using namespace Loki;
+
+		{ SmartPtr<TestClass> p = new TestClass; }
+
+		bool test1=TestClass::instances == 0;
+
+		{ p0 p = new TestClass(); }
+		{ p1 p = new TestClass(); }
+//		{ p2 p = new TestClass(); }
+		{ p3 p = new TestClass(); }
+		{ p4 p = new TestClass(); }
+		{ p5 p = new TestClass(); }
+		{ p6 p = new TestClass(); }
+		{ p7 p = new TestClass(); }
+		{ p8 p = new TestClass(); }
+		{ p9 p = new TestClass(); }
+//		{ p10 p = new TestClass(); }
+		{ p11 p = new TestClass(); }
+		{ p12 p = new TestClass(); }
+		{ p13 p = new TestClass(); }
+		{ p14 p = new TestClass(); }
+		{ p15 p = new TestClass(); }
+		{ p16 p = new TestClass(); }
+		{ p17 p = new TestClass(); }
+//		{ p18 p = new TestClass(); }
+		{ p19 p = new TestClass(); }
+		{ p20 p = new TestClass(); }
+		{ p21 p = new TestClass(); }
+		{ p22 p = new TestClass(); }
+		{ p23 p = new TestClass(); }
+		{ p24 p = new TestClass(); }
+		{ p25 p = new TestClass(); }
+//		{ p26 p = new TestClass(); }
+		{ p27 p = new TestClass(); }
+		{ p28 p = new TestClass(); }
+		{ p29 p = new TestClass(); }
+		{ p30 p = new TestClass(); }
+		{ p31 p = new TestClass(); }
+		{ p40 p = new TestClass(); }
+		{ p41 p = new TestClass(); }
+//		{ p42 p = new TestClass(); }
+		{ p43 p = new TestClass(); }
+		{ p44 p = new TestClass(); }
+		{ p45 p = new TestClass(); }
+		{ p46 p = new TestClass(); }
+		{ p47 p = new TestClass(); }
+		{ p48 p = new TestClass(); }
+		{ p49 p = new TestClass(); }
+//		{ p50 p = new TestClass(); }
+		{ p51 p = new TestClass(); }
+		{ p52 p = new TestClass(); }
+		{ p53 p = new TestClass(); }
+		{ p54 p = new TestClass(); }
+		{ p55 p = new TestClass(); }
+		{ p56 p = new TestClass(); }
+		{ p57 p = new TestClass(); }
+//		{ p58 p = new TestClass(); }
+		{ p59 p = new TestClass(); }
+		{ p60 p = new TestClass(); }
+		{ p61 p = new TestClass(); }
+		{ p62 p = new TestClass(); }
+		{ p63 p = new TestClass(); }
+		{ p64 p = new TestClass(); }
+		{ p65 p = new TestClass(); }
+//		{ p66 p = new TestClass(); }
+		{ p67 p = new TestClass(); }
+		{ p68 p = new TestClass(); }
+		{ p69 p = new TestClass(); }
+		{ p70 p = new TestClass(); }
+		{ p71 p = new TestClass(); }
+		{ p72 p = new TestClass(); }
+		{ p73 p = new TestClass(); }
+//		{ p74 p = new TestClass(); }
+		{ p75 p = new TestClass(); }
+		{ p76 p = new TestClass(); }
+		{ p77 p = new TestClass(); }
+		{ p78 p = new TestClass(); }
+		{ p79 p = new TestClass(); }
+		{ p80 p = new TestClass(); }
+		{ p81 p = new TestClass(); }
+//		{ p82 p = new TestClass(); }
+		{ p83 p = new TestClass(); }
+		{ p84 p = new TestClass(); }
+		{ p85 p = new TestClass(); }
+		{ p86 p = new TestClass(); }
+		{ p87 p = new TestClass(); }
+		{ p88 p = new TestClass(); }
+		{ p89 p = new TestClass(); }
+//		{ p90 p = new TestClass(); }
+		{ p91 p = new TestClass(); }
+		{ p92 p = new TestClass(); }
+		{ p93 p = new TestClass(); }
+		{ p94 p = new TestClass(); }
+		{ p95 p = new TestClass(); }
+		{ p96 p = new TestClass(); }
+		{ p97 p = new TestClass(); }
+//		{ p98 p = new TestClass(); }
+		{ p99 p = new TestClass(); }
+		{ p100 p = new TestClass(); }
+		{ p101 p = new TestClass(); }
+		{ p102 p = new TestClass(); }
+		{ p103 p = new TestClass(); }
+
+		bool test2=TestClass::instances==0;
+
+		bool r=test1 && test2;
+
+		testAssert("SmartPtr",r,result);
+
+		std::cout << '\n';
+		}
+
+private:
+	typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, AssertCheck, DefaultSPStorage> p0;
+	typedef SmartPtr<TestClass, RefCounted, DisallowConversion, AssertCheck, DefaultSPStorage> p1;
+	//typedef SmartPtr<TestClass, RefCountedMT, DisallowConversion, AssertCheck, DefaultSPStorage> p2;
+	typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, AssertCheck, DefaultSPStorage> p3;
+	typedef SmartPtr<TestClass, RefLinked, DisallowConversion, AssertCheck, DefaultSPStorage> p4;
+	typedef SmartPtr<TestClass, DestructiveCopy, DisallowConversion, AssertCheck, DefaultSPStorage> p5;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, AssertCheck, DefaultSPStorage> p6;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, AssertCheck, DefaultSPStorage> p7;
+
+	typedef SmartPtr<TestClass, DeepCopy, AllowConversion, AssertCheck, DefaultSPStorage> p8;
+	typedef SmartPtr<TestClass, RefCounted, AllowConversion, AssertCheck, DefaultSPStorage> p9;
+	//typedef SmartPtr<TestClass, RefCountedMT, AllowConversion, AssertCheck, DefaultSPStorage> p10;
+	typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, AssertCheck, DefaultSPStorage> p11;
+	typedef SmartPtr<TestClass, RefLinked, AllowConversion, AssertCheck, DefaultSPStorage> p12;
+	typedef SmartPtr<TestClass, DestructiveCopy, AllowConversion, AssertCheck, DefaultSPStorage> p13;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, AssertCheck, DefaultSPStorage> p14;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, AssertCheck, DefaultSPStorage> p15;
+
+	typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p16;
+	typedef SmartPtr<TestClass, RefCounted, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p17;
+	//typedef SmartPtr<TestClass, RefCountedMT, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p18;
+	typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p19;
+	typedef SmartPtr<TestClass, RefLinked, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p20;
+	typedef SmartPtr<TestClass, DestructiveCopy, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p21;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p22;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p23;
+
+	typedef SmartPtr<TestClass, DeepCopy, AllowConversion, AssertCheckStrict, DefaultSPStorage> p24;
+	typedef SmartPtr<TestClass, RefCounted, AllowConversion, AssertCheckStrict, DefaultSPStorage> p25;
+	//typedef SmartPtr<TestClass, RefCountedMT, AllowConversion, AssertCheckStrict, DefaultSPStorage> p26;
+	typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, AssertCheckStrict, DefaultSPStorage> p27;
+	typedef SmartPtr<TestClass, RefLinked, AllowConversion, AssertCheckStrict, DefaultSPStorage> p28;
+	typedef SmartPtr<TestClass, DestructiveCopy, AllowConversion, AssertCheckStrict, DefaultSPStorage> p29;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, AssertCheckStrict, DefaultSPStorage> p30;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, AssertCheckStrict, DefaultSPStorage> p31;
+
+	typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNullStatic, DefaultSPStorage> p40;
+	typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNullStatic, DefaultSPStorage> p41;
+	//typedef SmartPtr<TestClass, RefCountedMT, AllowConversion, RejectNullStatic, DefaultSPStorage> p42;
+	typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNullStatic, DefaultSPStorage> p43;
+	typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNullStatic, DefaultSPStorage> p44;
+	typedef SmartPtr<TestClass, DestructiveCopy, AllowConversion, RejectNullStatic, DefaultSPStorage> p45;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, RejectNullStatic, DefaultSPStorage> p46;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, RejectNullStatic, DefaultSPStorage> p47;
+
+	typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNullStatic, DefaultSPStorage> p48;
+	typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNullStatic, DefaultSPStorage> p49;
+	//typedef SmartPtr<TestClass, RefCountedMT, DisallowConversion, RejectNullStatic, DefaultSPStorage> p50;
+	typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNullStatic, DefaultSPStorage> p51;
+	typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNullStatic, DefaultSPStorage> p52;
+	typedef SmartPtr<TestClass, DestructiveCopy, DisallowConversion, RejectNullStatic, DefaultSPStorage> p53;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, RejectNullStatic,DefaultSPStorage> p54;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, RejectNullStatic,DefaultSPStorage> p55;
+
+	typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNull, DefaultSPStorage> p56;
+	typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNull, DefaultSPStorage> p57;
+	//typedef SmartPtr<TestClass, RefCountedMT, AllowConversion, RejectNull, DefaultSPStorage> p58;
+	typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNull, DefaultSPStorage> p59;
+	typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNull, DefaultSPStorage> p60;
+	typedef SmartPtr<TestClass, DestructiveCopy, AllowConversion, RejectNull, DefaultSPStorage> p61;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, RejectNull, DefaultSPStorage> p62;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, RejectNull, DefaultSPStorage> p63;
+
+	typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNull,  DefaultSPStorage> p64;
+	typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNull,  DefaultSPStorage> p65;
+	//typedef SmartPtr<TestClass, RefCountedMT, DisallowConversion, RejectNull,  DefaultSPStorage> p66;
+	typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNull,	DefaultSPStorage> p67;
+	typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNull,	DefaultSPStorage> p68;
+	typedef SmartPtr<TestClass, DestructiveCopy, DisallowConversion, RejectNull,	DefaultSPStorage> p69;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, RejectNull,  DefaultSPStorage> p70;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, RejectNull,  DefaultSPStorage> p71;
+
+	typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNullStrict, DefaultSPStorage> p72;
+	typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNullStrict, DefaultSPStorage> p73;
+	//typedef SmartPtr<TestClass, RefCountedMT, AllowConversion, RejectNullStrict, DefaultSPStorage> p74;
+	typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNullStrict, DefaultSPStorage> p75;
+	typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNullStrict, DefaultSPStorage> p76;
+	typedef SmartPtr<TestClass, DestructiveCopy, AllowConversion, RejectNullStrict, DefaultSPStorage> p77;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, RejectNullStrict, DefaultSPStorage> p78;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, RejectNullStrict, DefaultSPStorage> p79;
+
+	typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNullStrict, DefaultSPStorage> p80;
+	typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNullStrict, DefaultSPStorage> p81;
+	//typedef SmartPtr<TestClass, RefCountedMT, DisallowConversion, RejectNullStrict, DefaultSPStorage> p82;
+	typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNullStrict, DefaultSPStorage> p83;
+	typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNullStrict, DefaultSPStorage> p84;
+	typedef SmartPtr<TestClass, DestructiveCopy, DisallowConversion, RejectNullStrict, DefaultSPStorage> p85;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, RejectNullStrict, DefaultSPStorage> p86;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, RejectNullStrict, DefaultSPStorage> p87;
+
+	typedef SmartPtr<TestClass, DeepCopy, AllowConversion, NoCheck, DefaultSPStorage> p88;
+	typedef SmartPtr<TestClass, RefCounted, AllowConversion, NoCheck, DefaultSPStorage> p89;
+	//typedef SmartPtr<TestClass, RefCountedMT, AllowConversion, NoCheck, DefaultSPStorage> p90;
+	typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, NoCheck, DefaultSPStorage> p91;
+	typedef SmartPtr<TestClass, RefLinked, AllowConversion, NoCheck, DefaultSPStorage> p92;
+	typedef SmartPtr<TestClass, DestructiveCopy, AllowConversion, NoCheck, DefaultSPStorage> p93;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, NoCheck, DefaultSPStorage> p94;
+	typedef SmartPtr<TestClass, NoCopy, AllowConversion, NoCheck, DefaultSPStorage> p95;
+
+	typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, NoCheck, DefaultSPStorage> p96;
+	typedef SmartPtr<TestClass, RefCounted, DisallowConversion, NoCheck, DefaultSPStorage> p97;
+	//typedef SmartPtr<TestClass, RefCountedMT, DisallowConversion, NoCheck, DefaultSPStorage> p98;
+	typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, NoCheck, DefaultSPStorage> p99;
+	typedef SmartPtr<TestClass, RefLinked, DisallowConversion, NoCheck, DefaultSPStorage> p100;
+	typedef SmartPtr<TestClass, DestructiveCopy, DisallowConversion, NoCheck, DefaultSPStorage> p101;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, NoCheck, DefaultSPStorage> p102;
+	typedef SmartPtr<TestClass, NoCopy, DisallowConversion, NoCheck, DefaultSPStorage> p103;
+};
+
+#endif
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/Test.cpp
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/Test.cpp:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/Test.cpp	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,32 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifdef __INTEL_COMPILER
+# pragma warning(disable: 111 193 304 383 444 488 981 1418)
+#endif
+
+#include "LokiTest.h"
+
+int main()
+{
+LokiTest test;
+
+const int result=test.result();
+
+#if __BORLANDC__ || __GNUC__
+	while(true); // Stop console window from closing if run from IDE.
+#endif
+
+return result;
+}
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/TypeManipTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/TypeManipTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/TypeManipTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,119 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TYPEMANIPTEST_H
+#define TYPEMANIPTEST_H
+
+#include <Loki/TypeManip.h>
+#include "UnitTest.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// TypeManipTest
+///////////////////////////////////////////////////////////////////////////////
+
+class TypeManipTest : public Test
+{
+public:
+	TypeManipTest() : Test("TypeManip.h") {}
+
+	virtual void execute(TestResult &result)
+		{
+		printName(result);
+
+		using namespace Loki;
+
+		bool r;
+
+		r=Int2Type<1>::value==1;
+
+		testAssert("Int2Type",r,result);
+
+		r=SameType<Type2Type<char>::OriginalType,char>::value;
+
+		testAssert("Type2Type",r,result);
+
+		r=SameType<Select<true,char,int>::Result,char>::value &&
+			SameType<Select<false,char,int>::Result,int>::value;
+
+		testAssert("Select",r,result);
+
+		r=Conversion<char,int>::exists &&
+			Conversion<char,int>::exists2Way &&
+			!Conversion<char,int>::sameType &&
+			Conversion<char,char>::exists &&
+			Conversion<char,char>::exists2Way &&
+			Conversion<char,char>::sameType &&
+			Conversion<void,void>::exists &&
+			!Conversion<void,char>::exists &&
+			Conversion<char,void>::exists &&
+			Conversion<Derived2,Base>::exists &&
+			Conversion<Derived1,Base>::exists &&
+			Conversion<Base,Base>::exists &&
+			!Conversion<Base,Derived2>::exists &&
+			!Conversion<Base,Derived1>::exists &&
+			Conversion<Derived2 *,Base *>::exists &&
+			Conversion<Derived1 *,Base *>::exists &&
+			!Conversion<Base *,Derived2 *>::exists &&
+			!Conversion<Base *,Derived1 *>::exists &&
+			Conversion<Base *,void *>::exists &&
+			!Conversion<void *,Base *>::exists;
+
+		testAssert("Conversion",r,result);
+
+		r=SuperSubclass<Base,Derived1>::value &&
+			SuperSubclass<Base,Derived2>::value &&
+			SuperSubclass<Base,Base>::value &&
+			!SuperSubclass<Derived1,Base>::value &&
+			!SuperSubclass<Derived2,Base>::value &&
+			!SuperSubclass<void,Base>::value;
+		
+		testAssert("SuperSubclass",r,result);
+
+		r=SuperSubclassStrict<Base,Derived1>::value &&
+			SuperSubclassStrict<Base,Derived2>::value &&
+			!SuperSubclassStrict<Base,Base>::value &&
+			!SuperSubclassStrict<Derived1,Base>::value &&
+			!SuperSubclassStrict<Derived2,Base>::value &&
+			!SuperSubclassStrict<void,Base>::value;
+
+		testAssert("SuperSubclassStrict",r,result);
+
+		r=SUPERSUBCLASS(Base,Derived1) &&
+			SUPERSUBCLASS(Base,Derived2) &&
+			SUPERSUBCLASS(Base,Base) &&
+			!SUPERSUBCLASS(Derived1,Base) &&
+			!SUPERSUBCLASS(Derived2,Base) &&
+			!SUPERSUBCLASS(void,Base);
+
+		testAssert("SUPERSUBCLASS",r,result);
+
+		r=SUPERSUBCLASS_STRICT(Base,Derived1) &&
+			SUPERSUBCLASS_STRICT(Base,Derived2) &&
+			!SUPERSUBCLASS_STRICT(Base,Base) &&
+			!SUPERSUBCLASS_STRICT(Derived1,Base) &&
+			!SUPERSUBCLASS_STRICT(Derived2,Base) &&
+			!SUPERSUBCLASS_STRICT(void,Base);
+
+		testAssert("SUPERSUBCLASS_STRICT",r,result);
+
+		std::cout << '\n';
+		}
+
+private:
+	struct Base { char c; };
+	struct Derived1 : Base { char c; };
+	struct Derived2 : Derived1 { char c; };
+};
+
+#endif
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/TypeTraitsTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/TypeTraitsTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/TypeTraitsTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,116 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TYPETRAITSTEST_H
+#define TYPETRAITSTEST_H
+
+#include <Loki/TypeTraits.h>
+#include "UnitTest.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// TypeTraitsTest
+///////////////////////////////////////////////////////////////////////////////
+
+class TypeTraitsTest : public Test
+{
+public:
+	TypeTraitsTest() : Test("TypeTraits.h") {}
+
+	virtual void execute(TestResult &result)
+		{
+		printName(result);
+
+		using namespace Loki;
+
+		bool r;
+
+		r=TypeTraits<int *>::isPointer &&
+			!TypeTraits<int>::isPointer &&
+			SameType<TypeTraits<int *>::PointeeType,int>::value &&
+			SameType<TypeTraits<int>::PointeeType,NullType>::value &&
+
+			TypeTraits<int &>::isReference &&
+			!TypeTraits<int>::isReference &&
+			SameType<TypeTraits<int &>::ReferredType,int>::value &&
+			SameType<TypeTraits<int>::ReferredType,int>::value &&
+
+			TypeTraits<int Test::*>::isMemberPointer &&
+			!TypeTraits<int>::isMemberPointer &&
+
+			TypeTraits<unsigned int>::isStdUnsignedInt &&
+			!TypeTraits<int>::isStdUnsignedInt &&
+
+			TypeTraits<int>::isStdSignedInt &&
+			!TypeTraits<unsigned int>::isStdSignedInt &&
+
+			TypeTraits<int>::isStdIntegral &&
+			!TypeTraits<double>::isStdIntegral &&
+
+			TypeTraits<double>::isStdFloat &&
+			!TypeTraits<int>::isStdFloat &&
+
+			TypeTraits<int>::isStdArith &&
+			!TypeTraits<void>::isStdArith &&
+
+			TypeTraits<void>::isStdFundamental &&
+			!TypeTraits<Test>::isStdFundamental &&
+
+			TypeTraits<unsigned int>::isUnsignedInt &&
+			!TypeTraits<int>::isUnsignedInt &&
+
+			TypeTraits<int>::isSignedInt &&
+			!TypeTraits<unsigned int>::isSignedInt &&
+
+			TypeTraits<int>::isIntegral &&
+			!TypeTraits<double>::isIntegral &&
+
+			TypeTraits<double>::isFloat &&
+			!TypeTraits<int>::isFloat &&
+
+			TypeTraits<char>::isArith &&
+			TypeTraits<int>::isArith &&
+			TypeTraits<double>::isArith &&
+			!TypeTraits<void>::isArith &&
+
+			TypeTraits<void>::isFundamental &&
+			!TypeTraits<Test>::isFundamental &&
+
+#ifndef __BORLANDC__
+
+			TypeTraits<const int>::isConst &&
+			!TypeTraits<int>::isConst &&
+			SameType<TypeTraits<const int>::NonConstType,int>::value &&
+			SameType<TypeTraits<int>::NonConstType,int>::value &&
+
+			TypeTraits<volatile int>::isVolatile &&
+			!TypeTraits<int>::isVolatile &&
+			SameType<TypeTraits<volatile int>::NonVolatileType,int>::value &&
+			SameType<TypeTraits<int>::NonVolatileType,int>::value &&
+
+			SameType<TypeTraits<const volatile int>::UnqualifiedType,int>::value &&
+
+#endif
+
+			SameType<TypeTraits<char>::ParameterType,char>::value &&
+			SameType<TypeTraits<int>::ParameterType,int>::value &&
+			SameType<TypeTraits<double>::ParameterType,double>::value &&
+			SameType<TypeTraits<Test>::ParameterType,Test &>::value;
+
+		testAssert("TypeTraits",r,result);
+
+		std::cout << '\n';
+		}
+};
+
+#endif
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/TypelistTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/TypelistTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/TypelistTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,186 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test for Loki
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TYPELISTTEST_H
+#define TYPELISTTEST_H
+
+#include <Loki/Typelist.h>
+#include "UnitTest.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// TypelistTest
+///////////////////////////////////////////////////////////////////////////////
+
+class TypelistTest : public Test
+{
+public:
+	TypelistTest() : Test("Typelist.h") {}
+
+	virtual void execute(TestResult &result)
+		{
+		printName(result);
+
+		using namespace Loki;
+		using namespace Loki::TL;
+
+		typedef TYPELIST_1(char) CharList;
+		typedef TYPELIST_3(char,int,double) CharIntDoubleList;
+		typedef TYPELIST_4(char,int,double,char) CharIntDoubleCharList;
+		typedef TYPELIST_3(Base,Derived1,Derived2) BaseDerived1Derived2List;
+		typedef TYPELIST_3(Derived2,Derived1,Base) Derived2Derived1BaseList;
+
+		bool r;
+
+		r=Length<NullType>::value==0 &&
+			Length<CharList>::value==1 &&
+			Length<CharIntDoubleList>::value==3;
+
+		testAssert("Length",r,result);
+
+		r=SameType<TypeAt<CharList,0>::Result,char>::value &&
+			SameType<TypeAt<CharIntDoubleList,2>::Result,double>::value;
+
+		testAssert("TypeAt",r,result);
+
+		#if !(_MSC_VER && !__INTEL_COMPILER && !__MWERKS__ && _MSC_VER < 1300)
+
+		// TypeAtNonStrict works like TypeAt on MSVC 6.0
+
+		r=SameType<TypeAtNonStrict<NullType,0>::Result,NullType>::value &&
+			SameType<TypeAtNonStrict<CharList,0>::Result,char>::value &&
+			SameType<TypeAtNonStrict<CharIntDoubleList,2>::Result,double>::value &&
+			SameType<TypeAtNonStrict<CharIntDoubleList,3>::Result,NullType>::value &&
+      SameType<TypeAtNonStrict<CharList,1,long>::Result,long>::value;
+
+		testAssert("TypeAtNonStrict",r,result);
+
+		#else
+
+		testAssert("TypeAtNonStrict",false,result,false);
+
+		#endif
+
+		r=IndexOf<NullType,char>::value==-1 &&
+			IndexOf<CharList,char>::value==0 &&
+			IndexOf<CharIntDoubleList,double>::value==2 &&
+			IndexOf<CharIntDoubleList,long>::value==-1;
+
+		testAssert("IndexOf",r,result);
+
+		#if !(_MSC_VER && !__INTEL_COMPILER && !__MWERKS__ && _MSC_VER < 1300)
+
+		// Append, Erase, EraseAll, NoDuplicates, Replace, ReplaceAll, Reverse,
+		// MostDerived and DerivedToFront doesn't work on MSVC 6.0
+
+		r=SameType<Append<NullType,NullType>::Result,NullType>::value &&
+			SameType<Append<NullType,char>::Result,TYPELIST_1(char)>::value &&
+			SameType<Append<NullType,CharList>::Result,CharList>::value &&
+			SameType<Append<CharList,NullType>::Result,CharList>::value &&
+			SameType<Append<CharList,int>::Result,TYPELIST_2(char,int)>::value &&
+			SameType<Append<CharList,CharIntDoubleList>::Result,TYPELIST_4(char,char,int,double)>::value;
+
+		testAssert("Append",r,result);
+
+		r=SameType<Erase<NullType,char>::Result,NullType>::value &&
+			SameType<Erase<CharList,char>::Result,NullType>::value &&
+			SameType<Erase<CharList,long>::Result,CharList>::value &&
+			SameType<Erase<CharIntDoubleList,int>::Result,TYPELIST_2(char,double)>::value &&
+			SameType<Erase<CharIntDoubleList,double>::Result,TYPELIST_2(char,int)>::value;
+
+		testAssert("Erase",r,result);
+
+		r=SameType<EraseAll<NullType,char>::Result,NullType>::value &&
+			SameType<EraseAll<CharList,char>::Result,NullType>::value &&
+			SameType<EraseAll<CharList,long>::Result,CharList>::value &&
+			SameType<EraseAll<CharIntDoubleList,int>::Result,TYPELIST_2(char,double)>::value &&
+			SameType<EraseAll<CharIntDoubleList,double>::Result,TYPELIST_2(char,int)>::value &&
+			SameType<EraseAll<CharIntDoubleCharList,char>::Result,TYPELIST_2(int,double)>::value &&
+			SameType<EraseAll<CharIntDoubleCharList,int>::Result,TYPELIST_3(char,double,char)>::value &&
+			SameType<EraseAll<CharIntDoubleCharList,double>::Result,TYPELIST_3(char,int,char)>::value;
+
+		testAssert("EraseAll",r,result);
+
+		r=SameType<NoDuplicates<NullType>::Result,NullType>::value &&
+			SameType<NoDuplicates<CharList>::Result,CharList>::value &&
+			SameType<NoDuplicates<CharIntDoubleList>::Result,CharIntDoubleList>::value &&
+			SameType<NoDuplicates<CharIntDoubleCharList>::Result,CharIntDoubleList>::value;
+
+		testAssert("NoDuplicates",r,result);
+
+		r=SameType<Replace<NullType,char,long>::Result,NullType>::value &&
+			SameType<Replace<CharList,char,long>::Result,TYPELIST_1(long)>::value &&
+			SameType<Replace<CharList,int,long>::Result,CharList>::value &&
+			SameType<Replace<CharIntDoubleList,char,long>::Result,TYPELIST_3(long,int,double)>::value &&
+			SameType<Replace<CharIntDoubleList,long,char[16]>::Result,CharIntDoubleList>::value &&
+			SameType<Replace<CharIntDoubleCharList,char,long>::Result,TYPELIST_4(long,int,double,char)>::value;
+
+		testAssert("Replace",r,result);
+
+		r=SameType<ReplaceAll<NullType,char,long>::Result,NullType>::value &&
+			SameType<ReplaceAll<CharList,char,long>::Result,TYPELIST_1(long)>::value &&
+			SameType<ReplaceAll<CharList,int,long>::Result,CharList>::value &&
+			SameType<ReplaceAll<CharIntDoubleList,char,long>::Result,TYPELIST_3(long,int,double)>::value &&
+			SameType<ReplaceAll<CharIntDoubleList,long,char[16]>::Result,CharIntDoubleList>::value &&
+			SameType<ReplaceAll<CharIntDoubleCharList,char,long>::Result,TYPELIST_4(long,int,double,long)>::value;
+
+		testAssert("ReplaceAll",r,result);
+
+		r=SameType<Reverse<NullType>::Result,NullType>::value &&
+			SameType<Reverse<CharList>::Result,CharList>::value &&
+			SameType<Reverse<CharIntDoubleList>::Result,TYPELIST_3(double,int,char)>::value;
+
+		testAssert("Reverse",r,result);
+
+		r=SameType<MostDerived<NullType,Base>::Result,Base>::value &&
+			SameType<MostDerived<BaseDerived1Derived2List,Base>::Result,Derived2>::value &&
+			SameType<MostDerived<BaseDerived1Derived2List,Derived1>::Result,Derived2>::value &&
+			SameType<MostDerived<BaseDerived1Derived2List,Derived2>::Result,Derived2>::value &&
+			SameType<MostDerived<Derived2Derived1BaseList,Base>::Result,Derived2>::value &&
+			SameType<MostDerived<Derived2Derived1BaseList,Derived1>::Result,Derived2>::value &&
+			SameType<MostDerived<Derived2Derived1BaseList,Derived2>::Result,Derived2>::value;
+
+		testAssert("MostDerived",r,result);
+
+		r=SameType<DerivedToFront<NullType>::Result,NullType>::value &&
+			SameType<DerivedToFront<CharList>::Result,CharList>::value &&
+			SameType<DerivedToFront<CharIntDoubleList>::Result,CharIntDoubleList>::value &&
+			SameType<DerivedToFront<CharIntDoubleCharList>::Result,CharIntDoubleCharList>::value &&
+			SameType<DerivedToFront<BaseDerived1Derived2List>::Result,Derived2Derived1BaseList>::value &&
+			SameType<DerivedToFront<Derived2Derived1BaseList>::Result,Derived2Derived1BaseList>::value;
+
+		testAssert("DerivedToFront",r,result);
+
+		#else
+
+		testAssert("Append",false,result,false);
+		testAssert("Erase",false,result,false);
+		testAssert("EraseAll",false,result,false);
+		testAssert("NoDuplicates",false,result,false);
+		testAssert("Replace",false,result,false);
+		testAssert("Reverse",false,result,false);
+		testAssert("MostDerived",false,result,false);
+		testAssert("DerivedToFront",false,result,false);
+
+		#endif
+
+		std::cout << '\n';
+		}
+
+private:
+	struct Base { char c; };
+	struct Derived1 : Base { char c; };
+	struct Derived2 : Derived1 { char c; };
+};
+
+#endif
Index: avida/current/source/third-party/Loki/tools/RegressionTest2/UnitTest.h
diff -u /dev/null avida/current/source/third-party/Loki/tools/RegressionTest2/UnitTest.h:1.2
--- /dev/null	Wed Sep 24 01:12:13 2003
+++ avida/current/source/third-party/Loki/tools/RegressionTest2/UnitTest.h	Wed Sep 24 01:12:10 2003
@@ -0,0 +1,208 @@
+///////////////////////////////////////////////////////////////////////////////
+// Unit Test framework
+//
+// Copyright Terje Slettebø and Pavel Vozenilek 2002.
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose is hereby granted without fee, provided that this copyright and
+// permissions notice appear in all copies and derivatives.
+//
+// This software is provided "as is" without express or implied warranty.
+//
+// Last update: September 16, 2002
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef UNITTEST_H
+#define UNITTEST_H
+
+#include <iostream>
+#include <string>
+#include <vector>
+#include <algorithm>
+
+///////////////////////////////////////////////////////////////////////////////
+// SameType
+///////////////////////////////////////////////////////////////////////////////
+
+#if _MSC_VER && !__INTEL_COMPILER && !__MWERKS__
+
+// Rani Sharoni's SameType
+
+template<class T1,class T2>
+struct SameType
+{
+private:
+	template<class>
+	struct In 
+	{ enum { value = false }; };
+
+	template<>
+	struct In<T1>
+	{ enum { value = true };	};
+
+public:
+	enum { value = In<T2>::value };
+};
+
+#else
+
+template<class T1,class T2>
+struct SameType
+{
+		static const bool value=false;
+};
+
+template<class T>
+struct SameType<T,T>
+{
+		static const bool value=true;
+};
+
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// TestResult
+///////////////////////////////////////////////////////////////////////////////
+
+class TestResult
+{
+public:
+	TestResult() : pos(0),passed(0),failed(0),notSupported(0) {}
+
+	int pos;
+	int passed;
+	int failed;
+	int notSupported;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Test
+///////////////////////////////////////////////////////////////////////////////
+
+class Test
+{
+public:
+	explicit Test(const std::string &n) : name(n) {}
+
+	virtual void execute(TestResult &) =0;
+
+protected:
+	~Test() {}
+
+	void printName(const TestResult &result) const
+		{
+		if(name.length()!=0)
+			std::cout << std::string(result.pos,' ') << name << '\n';
+		}
+
+	void testAssert(const std::string &s,bool assertion,TestResult &result,bool supported =true,
+									const std::string &failStr =emptyStr())
+		{
+		std::string str=std::string(result.pos+2,' ')+s;
+
+		str+=std::string(offset-str.length(),' ');
+
+		if(supported)
+			{
+			if(assertion)
+				{
+				std::cout << str << "Passed\n";
+
+				++result.passed;
+				}
+			else
+				{
+				std::cout << str << (failStr==emptyStr() ? std::string("Failed") : "Failed - "+failStr) << '\n';
+
+				++result.failed;
+				}
+			}
+		else
+			{
+			std::cout << str << "Not Supported\n";
+
+			++result.notSupported;
+			}
+		}
+
+	static std::string emptyStr()
+		{
+		return std::string();
+		}
+
+public:
+	enum { offset=63 };
+
+protected:
+	const std::string name;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// TestSuite
+///////////////////////////////////////////////////////////////////////////////
+
+class TestSuite : public Test
+{
+private:
+	typedef std::vector<Test *> TestList;
+
+public:
+	explicit TestSuite(const std::string &name =emptyStr()) : Test(name) {}
+
+	void add(Test &test)
+		{
+		tests.push_back(&test);
+		}
+
+	virtual void execute(TestResult &result)
+		{
+		printName(result);
+
+		if(name.length()!=0)
+			result.pos+=2;
+
+		for(TestList::iterator i=tests.begin();i!=tests.end();++i)
+			(*i)->execute(result);
+
+		if(name.length()!=0)
+			result.pos-=2;
+		}
+
+private:
+	TestList tests;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// UnitTest
+///////////////////////////////////////////////////////////////////////////////
+
+class UnitTest
+{
+public:
+	int run(const std::string &title,TestSuite &tests) const
+		{
+		std::cout << title << std::string(Test::offset-title.length(),' ') << "Result\n";
+		std::cout << std::string(76,'-') << '\n';
+
+		TestResult testResult;
+
+		tests.execute(testResult);
+
+		std::cout << std::string(76,'-') << '\n';
+
+		const int total=testResult.passed+testResult.failed;
+		const int totalAll=total+testResult.notSupported;
+
+		if(total!=0)
+			std::cout << "Total - " << testResult.passed << '/' << total << (total==1 ? " test, " : " tests, ")
+								<< testResult.passed*100/total << "% Passed\n";
+
+		if(testResult.notSupported!=0)
+			std::cout << "Not Supported - " << testResult.notSupported << '/' << totalAll << ", "
+								<< testResult.notSupported*100/totalAll << "%\n";
+
+		return testResult.failed;
+		}
+};
+
+#endif
Index: avida/current/source/viewers/ncurses_viewer.ncb
Index: avida/current/source/viewers/ncurses_viewer.sln
diff -u /dev/null avida/current/source/viewers/ncurses_viewer.sln:1.8
--- /dev/null	Wed Sep 24 01:12:14 2003
+++ avida/current/source/viewers/ncurses_viewer.sln	Wed Sep 24 01:12:11 2003
@@ -0,0 +1,18 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncurses-viewer", "ncurses_viewer.vcproj", "{B6625AC4-47F4-4480-BCCA-82FC8F2EF859}"
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		ConfigName.0 = Debug
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{B6625AC4-47F4-4480-BCCA-82FC8F2EF859}.Debug.ActiveCfg = Debug|Win32
+		{B6625AC4-47F4-4480-BCCA-82FC8F2EF859}.Debug.Build.0 = Debug|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
Index: avida/current/source/viewers/ncurses_viewer.suo
Index: avida/current/source/viewers/ncurses_viewer.vcproj
diff -u /dev/null avida/current/source/viewers/ncurses_viewer.vcproj:1.8
--- /dev/null	Wed Sep 24 01:12:14 2003
+++ avida/current/source/viewers/ncurses_viewer.vcproj	Wed Sep 24 01:12:11 2003
@@ -0,0 +1,611 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="ncurses-viewer"
+	ProjectGUID="{B6625AC4-47F4-4480-BCCA-82FC8F2EF859}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -w34100 -w34189"
+				Optimization="0"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..;..\cpu;..\event;..\main;&quot;..\third-party\trio-1.9&quot;;..\tools;&quot;$(QTDIR)\include&quot;;C:\cygwin\home\Kaben\CygwinExperiment\current\source\viewers;&quot;$(QTDIR)\mkspecs\win32-msvc.net&quot;;c:\cygwin\home\kaben\CygwinExperiment\pdcurs26"
+				PreprocessorDefinitions="_CONSOLE,UNICODE,WIN32,QT_DLL,QT_THREAD_SUPPORT"
+				GeneratePreprocessedFile="0"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\ncurses-viewer.pch"
+				AssemblerListingLocation=".\"
+				ObjectFile=".\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="qt-mteval312.lib qtmain.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib c:/cygwin/home/kaben/CygwinExperiment/pdcurs/pdcurses.lib"
+				OutputFile=".\ncurses-viewer.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="$(QTDIR)\lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="ncurses-viewer.pdb"
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\main\analyze.cc">
+			</File>
+			<File
+				RelativePath="..\main\analyze_util.cc">
+			</File>
+			<File
+				RelativePath="ansi.cc">
+			</File>
+			<File
+				RelativePath="..\main\avida.cc">
+			</File>
+			<File
+				RelativePath="..\tools\b_struct2.cc">
+			</File>
+			<File
+				RelativePath="bar_screen.cc">
+			</File>
+			<File
+				RelativePath="..\main\birth_chamber.cc">
+			</File>
+			<File
+				RelativePath="..\tools\block_struct.cc">
+			</File>
+			<File
+				RelativePath="..\main\callback_util.cc">
+			</File>
+			<File
+				RelativePath="..\main\config.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_memory.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_stack.cc">
+			</File>
+			<File
+				RelativePath="..\tools\data_entry.cc">
+			</File>
+			<File
+				RelativePath="..\tools\data_manager.cc">
+			</File>
+			<File
+				RelativePath="..\tools\datafile.cc">
+			</File>
+			<File
+				RelativePath="..\main\environment.cc">
+			</File>
+			<File
+				RelativePath="..\event\event.cc">
+			</File>
+			<File
+				RelativePath="..\event\event_factory.cc">
+			</File>
+			<File
+				RelativePath="..\event\event_factory_manager.cc">
+			</File>
+			<File
+				RelativePath="..\event\event_list.cc">
+			</File>
+			<File
+				RelativePath="..\tools\file.cc">
+			</File>
+			<File
+				RelativePath="..\main\fitness_matrix.cc">
+			</File>
+			<File
+				RelativePath="..\main\genebank.cc">
+			</File>
+			<File
+				RelativePath="..\main\genome.cc">
+			</File>
+			<File
+				RelativePath="..\main\genome_util.cc">
+			</File>
+			<File
+				RelativePath="..\main\genotype.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_base.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_cpu.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_factory.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_util.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\head.cc">
+			</File>
+			<File
+				RelativePath="..\tools\help.cc">
+			</File>
+			<File
+				RelativePath="hist_screen.cc">
+			</File>
+			<File
+				RelativePath="..\main\inst.cc">
+			</File>
+			<File
+				RelativePath="..\main\inst_util.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\label.cc">
+			</File>
+			<File
+				RelativePath="..\main\landscape.cc">
+			</File>
+			<File
+				RelativePath="..\main\lineage.cc">
+			</File>
+			<File
+				RelativePath="..\main\lineage_control.cc">
+			</File>
+			<File
+				RelativePath="map_screen.cc">
+			</File>
+			<File
+				RelativePath="menu.cc">
+			</File>
+			<File
+				RelativePath="..\tools\merit.cc">
+			</File>
+			<File
+				RelativePath="..\tools\message_display.cc">
+			</File>
+			<File
+				RelativePath="..\main\mutations.cc">
+			</File>
+			<File
+				RelativePath="ncurses.cc">
+			</File>
+			<File
+				RelativePath="options_screen.cc">
+			</File>
+			<File
+				RelativePath="..\main\organism.cc">
+			</File>
+			<File
+				RelativePath="..\main\phenotype.cc">
+			</File>
+			<File
+				RelativePath="..\main\pop_interface.cc">
+			</File>
+			<File
+				RelativePath="..\main\population.cc">
+			</File>
+			<File
+				RelativePath="..\main\population_cell.cc">
+			</File>
+			<File
+				RelativePath="..\event\population_event_factory.cc">
+			</File>
+			<File
+				RelativePath="..\tools\random.cc">
+			</File>
+			<File
+				RelativePath="..\main\reaction.cc">
+			</File>
+			<File
+				RelativePath="..\main\reaction_result.cc">
+			</File>
+			<File
+				RelativePath="..\main\resource.cc">
+			</File>
+			<File
+				RelativePath="..\main\resource_count.cc">
+			</File>
+			<File
+				RelativePath="..\tools\slice.cc">
+			</File>
+			<File
+				RelativePath="..\main\species.cc">
+			</File>
+			<File
+				RelativePath="..\tools\stat.cc">
+			</File>
+			<File
+				RelativePath="..\main\stats.cc">
+			</File>
+			<File
+				RelativePath="stats_screen.cc">
+			</File>
+			<File
+				RelativePath="..\tools\string.cc">
+			</File>
+			<File
+				RelativePath="..\tools\string_list.cc">
+			</File>
+			<File
+				RelativePath="..\tools\string_util.cc">
+			</File>
+			<File
+				RelativePath="symbol_util.cc">
+			</File>
+			<File
+				RelativePath="..\main\tasks.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\test_cpu.cc">
+			</File>
+			<File
+				RelativePath="..\cpu\test_util.cc">
+			</File>
+			<File
+				RelativePath="text_screen.cc">
+			</File>
+			<File
+				RelativePath="..\tools\tools.cc">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trio.c">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trionan.c">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triostr.c">
+			</File>
+			<File
+				RelativePath="view.cc">
+			</File>
+			<File
+				RelativePath="viewer.cc">
+			</File>
+			<File
+				RelativePath="..\tools\weighted_index.cc">
+			</File>
+			<File
+				RelativePath="zoom_screen.cc">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\main\analyze.hh">
+			</File>
+			<File
+				RelativePath="..\main\analyze_util.hh">
+			</File>
+			<File
+				RelativePath="ansi.hh">
+			</File>
+			<File
+				RelativePath="..\main\avida.hh">
+			</File>
+			<File
+				RelativePath="..\tools\b_struct2.hh">
+			</File>
+			<File
+				RelativePath="bar_screen.hh">
+			</File>
+			<File
+				RelativePath="..\main\birth_chamber.hh">
+			</File>
+			<File
+				RelativePath="..\tools\block_struct.hh">
+			</File>
+			<File
+				RelativePath="..\main\callback_util.hh">
+			</File>
+			<File
+				RelativePath="..\main\config.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_defs.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_memory.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_stack.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\cpu_stats.hh">
+			</File>
+			<File
+				RelativePath="..\tools\data_entry.hh">
+			</File>
+			<File
+				RelativePath="..\tools\data_manager.hh">
+			</File>
+			<File
+				RelativePath="..\tools\datafile.hh">
+			</File>
+			<File
+				RelativePath="..\main\environment.hh">
+			</File>
+			<File
+				RelativePath="..\event\event.hh">
+			</File>
+			<File
+				RelativePath="..\event\event_factory.hh">
+			</File>
+			<File
+				RelativePath="..\event\event_factory_manager.hh">
+			</File>
+			<File
+				RelativePath="..\event\event_list.hh">
+			</File>
+			<File
+				RelativePath="..\tools\file.hh">
+			</File>
+			<File
+				RelativePath="..\main\fitness_matrix.hh">
+			</File>
+			<File
+				RelativePath="..\tools\functions.hh">
+			</File>
+			<File
+				RelativePath="..\main\genebank.hh">
+			</File>
+			<File
+				RelativePath="..\main\genome.hh">
+			</File>
+			<File
+				RelativePath="..\main\genome_util.hh">
+			</File>
+			<File
+				RelativePath="..\main\genotype.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_base.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_cpu.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_factory.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_method.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\hardware_util.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\head.hh">
+			</File>
+			<File
+				RelativePath="..\tools\help.hh">
+			</File>
+			<File
+				RelativePath="hist_screen.hh">
+			</File>
+			<File
+				RelativePath="..\main\inst.hh">
+			</File>
+			<File
+				RelativePath="..\main\inst_lib.hh">
+			</File>
+			<File
+				RelativePath="..\main\inst_util.hh">
+			</File>
+			<File
+				RelativePath="..\tools\int.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\label.hh">
+			</File>
+			<File
+				RelativePath="..\main\landscape.hh">
+			</File>
+			<File
+				RelativePath="..\main\lineage.hh">
+			</File>
+			<File
+				RelativePath="..\main\lineage_control.hh">
+			</File>
+			<File
+				RelativePath="map_screen.hh">
+			</File>
+			<File
+				RelativePath="menu.hh">
+			</File>
+			<File
+				RelativePath="..\tools\merit.hh">
+			</File>
+			<File
+				RelativePath="..\tools\message_display.hh">
+			</File>
+			<File
+				RelativePath="..\tools\message_display_hdrs.hh">
+			</File>
+			<File
+				RelativePath="..\main\mutations.hh">
+			</File>
+			<File
+				RelativePath="ncurses.hh">
+			</File>
+			<File
+				RelativePath="options_screen.hh">
+			</File>
+			<File
+				RelativePath="..\main\organism.hh">
+			</File>
+			<File
+				RelativePath="..\main\phenotype.hh">
+			</File>
+			<File
+				RelativePath="..\main\pop_interface.hh">
+			</File>
+			<File
+				RelativePath="..\main\population.hh">
+			</File>
+			<File
+				RelativePath="..\main\population_cell.hh">
+			</File>
+			<File
+				RelativePath="..\event\population_event_factory.hh">
+			</File>
+			<File
+				RelativePath="..\tools\random.hh">
+			</File>
+			<File
+				RelativePath="..\main\reaction.hh">
+			</File>
+			<File
+				RelativePath="..\main\reaction_result.hh">
+			</File>
+			<File
+				RelativePath="..\main\resource.hh">
+			</File>
+			<File
+				RelativePath="..\main\resource_count.hh">
+			</File>
+			<File
+				RelativePath="..\tools\slice.hh">
+			</File>
+			<File
+				RelativePath="..\main\species.hh">
+			</File>
+			<File
+				RelativePath="..\tools\stat.hh">
+			</File>
+			<File
+				RelativePath="..\main\stats.hh">
+			</File>
+			<File
+				RelativePath="stats_screen.hh">
+			</File>
+			<File
+				RelativePath="..\tools\string.hh">
+			</File>
+			<File
+				RelativePath="..\tools\string_list.hh">
+			</File>
+			<File
+				RelativePath="..\tools\string_util.hh">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\strio.h">
+			</File>
+			<File
+				RelativePath="symbol_util.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tArray.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tBuffer.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tDictionary.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tList.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tMatrix.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tVector.hh">
+			</File>
+			<File
+				RelativePath="..\main\tasks.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\test_cpu.hh">
+			</File>
+			<File
+				RelativePath="..\cpu\test_util.hh">
+			</File>
+			<File
+				RelativePath="text_screen.hh">
+			</File>
+			<File
+				RelativePath="text_window.hh">
+			</File>
+			<File
+				RelativePath="..\tools\tools.hh">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trio.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triodef.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\trionan.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triop.h">
+			</File>
+			<File
+				RelativePath="..\third-party\trio-1.9\triostr.h">
+			</File>
+			<File
+				RelativePath="view.hh">
+			</File>
+			<File
+				RelativePath="viewer.hh">
+			</File>
+			<File
+				RelativePath="..\tools\weighted_index.hh">
+			</File>
+			<File
+				RelativePath="..\tools\win32_mkdir_hack.hh">
+			</File>
+			<File
+				RelativePath="zoom_screen.hh">
+			</File>
+		</Filter>
+		<File
+			RelativePath="..\cpu\hardware_4stack.cc">
+		</File>
+		<File
+			RelativePath="..\cpu\hardware_4stack.hh">
+		</File>
+		<File
+			RelativePath="..\main\inst_set.cc">
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>


More information about the Avida-cvs mailing list