Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60515 - in trunk/libs: interprocess/proj/vc7ide interprocess/test intrusive/test
From: igaztanaga_at_[hidden]
Date: 2010-03-12 08:22:14


Author: igaztanaga
Date: 2010-03-12 08:22:13 EST (Fri, 12 Mar 2010)
New Revision: 60515
URL: http://svn.boost.org/trac/boost/changeset/60515

Log:
Interprocess:
  [@https://svn.boost.org/trac/boost/ticket/3439 #3439],
  [@https://svn.boost.org/trac/boost/ticket/3846 #3846],
  [@https://svn.boost.org/trac/boost/ticket/3947 #3947],
  [@https://svn.boost.org/trac/boost/ticket/3985 #3985].
Intrusive:
  [@https://svn.boost.org/trac/boost/ticket/3668 #3668],
  [@https://svn.boost.org/trac/boost/ticket/3339 #3688],
  [@https://svn.boost.org/trac/boost/ticket/3698 #3698],
  [@https://svn.boost.org/trac/boost/ticket/3706 #3706],
  [@https://svn.boost.org/trac/boost/ticket/3721 #3721].
  [@https://svn.boost.org/trac/boost/ticket/3729 #3729],
  [@https://svn.boost.org/trac/boost/ticket/3746 #3746],
  [@https://svn.boost.org/trac/boost/ticket/3781 #3781],
  [@https://svn.boost.org/trac/boost/ticket/3829 #3829],
  [@https://svn.boost.org/trac/boost/ticket/3840 #3840],
  [@https://svn.boost.org/trac/boost/ticket/3339 #3339],
  [@https://svn.boost.org/trac/boost/ticket/3419 #3419],
  [@https://svn.boost.org/trac/boost/ticket/3431 #3431],
Added:
   trunk/libs/interprocess/proj/vc7ide/intermodule_singleton_test.vcproj (contents, props changed)
   trunk/libs/interprocess/test/intermodule_singleton_test.cpp (contents, props changed)
Text files modified:
   trunk/libs/interprocess/test/movable_int.hpp | 2 +-
   trunk/libs/intrusive/test/common_functors.hpp | 2 +-
   trunk/libs/intrusive/test/set_test.cpp | 1 +
   trunk/libs/intrusive/test/smart_ptr.hpp | 4 ++--
   4 files changed, 5 insertions(+), 4 deletions(-)

Added: trunk/libs/interprocess/proj/vc7ide/intermodule_singleton_test.vcproj
==============================================================================
--- (empty file)
+++ trunk/libs/interprocess/proj/vc7ide/intermodule_singleton_test.vcproj 2010-03-12 08:22:13 EST (Fri, 12 Mar 2010)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="intermodule_singleton_test"
+ ProjectGUID="{58CCE183-6092-48FE-A4F7-BA0D3A792608}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/intermodule_singleton_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/intermodule_singleton_test_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/intermodule_singleton_test.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/intermodule_singleton_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/intermodule_singleton_test.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ 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="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath="..\..\test\intermodule_singleton_test.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: trunk/libs/interprocess/test/intermodule_singleton_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/interprocess/test/intermodule_singleton_test.cpp 2010-03-12 08:22:13 EST (Fri, 12 Mar 2010)
@@ -0,0 +1,93 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2004-2009. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/interprocess for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#include <boost/interprocess/detail/config_begin.hpp>
+#include <boost/interprocess/detail/intermodule_singleton.hpp>
+#include <iostream>
+
+using namespace boost::interprocess;
+
+class MyClass
+{
+ public:
+ MyClass()
+ {
+ std::cout << "Constructor\n";
+ }
+
+ void shout() const
+ {
+ std::cout << "Shout\n";
+ }
+
+ ~MyClass()
+ {
+ std::cout << "Destructor\n";
+ }
+};
+
+class MyDerivedClass
+ : public MyClass
+{};
+
+class MyThrowingClass
+{
+ public:
+ MyThrowingClass()
+ {
+ throw int(0);
+ }
+};
+
+
+
+int main ()
+{
+ bool exception_thrown = false;
+ bool exception_2_thrown = false;
+ try{
+ detail::intermodule_singleton<MyThrowingClass>::get();
+ }
+ catch(int &){
+ exception_thrown = true;
+ //Second try
+ try{
+ detail::intermodule_singleton<MyThrowingClass>::get();
+ }
+ catch(interprocess_exception &){
+ exception_2_thrown = true;
+ }
+ }
+
+ if(!exception_thrown || !exception_2_thrown){
+ return 1;
+ }
+
+ MyClass & mc = detail::intermodule_singleton<MyClass>::get();
+ mc.shout();
+ detail::intermodule_singleton<MyClass>::get().shout();
+ detail::intermodule_singleton<MyDerivedClass>::get().shout();
+
+ //Second try
+ exception_2_thrown = false;
+ try{
+ detail::intermodule_singleton<MyThrowingClass>::get();
+ }
+ catch(interprocess_exception &){
+ exception_2_thrown = true;
+ }
+ if(!exception_2_thrown){
+ return 1;
+ }
+
+ return 0;
+}
+
+#include <boost/interprocess/detail/config_end.hpp>
+

Modified: trunk/libs/interprocess/test/movable_int.hpp
==============================================================================
--- trunk/libs/interprocess/test/movable_int.hpp (original)
+++ trunk/libs/interprocess/test/movable_int.hpp 2010-03-12 08:22:13 EST (Fri, 12 Mar 2010)
@@ -79,7 +79,7 @@
 
 class movable_and_copyable_int
 {
- BOOST_COPYABLE_AND_MOVABLE(movable_and_copyable_int)
+ BOOST_INTERPROCESS_COPYABLE_AND_MOVABLE(movable_and_copyable_int)
    public:
 
    movable_and_copyable_int()

Modified: trunk/libs/intrusive/test/common_functors.hpp
==============================================================================
--- trunk/libs/intrusive/test/common_functors.hpp (original)
+++ trunk/libs/intrusive/test/common_functors.hpp 2010-03-12 08:22:13 EST (Fri, 12 Mar 2010)
@@ -29,7 +29,7 @@
    {
       typedef typename std::iterator_traits<Pointer>::value_type value_type;
       BOOST_INTRUSIVE_INVARIANT_ASSERT(( detail::is_same<T, value_type>::value ));
- delete detail::get_pointer(p);
+ delete detail::boost_intrusive_get_pointer(p);
    }
 };
 

Modified: trunk/libs/intrusive/test/set_test.cpp
==============================================================================
--- trunk/libs/intrusive/test/set_test.cpp (original)
+++ trunk/libs/intrusive/test/set_test.cpp 2010-03-12 08:22:13 EST (Fri, 12 Mar 2010)
@@ -147,6 +147,7 @@
    }
 };
 
+
 int main( int, char* [] )
 {
    test_main_template<void*, false>()();

Modified: trunk/libs/intrusive/test/smart_ptr.hpp
==============================================================================
--- trunk/libs/intrusive/test/smart_ptr.hpp (original)
+++ trunk/libs/intrusive/test/smart_ptr.hpp 2010-03-12 08:22:13 EST (Fri, 12 Mar 2010)
@@ -303,10 +303,10 @@
    pt2 = ptr;
 }
 
-//!detail::get_pointer() enables boost::mem_fn to recognize smart_ptr.
+//!detail::boost_intrusive_get_pointer() enables boost::mem_fn to recognize smart_ptr.
 //!Never throws.
 template<class T>
-inline T* get_pointer(const smart_ptr<T> & p)
+inline T* boost_intrusive_get_pointer(const smart_ptr<T> & p)
 { return p.get(); }
 
 //!Simulation of static_cast between pointers. Never throws.


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk