mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
Fixes for vectostream and intermodule_singleton
[SVN r65855]
This commit is contained in:
@@ -6557,23 +6557,30 @@ thank them:
|
||||
[section:release_notes_boost_1_45_00 Boost 1.45 Release]
|
||||
|
||||
* Fixed bugs
|
||||
[@https://svn.boost.org/trac/boost/ticket/1080 #1080],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3284 #3284],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3439 #3439],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3448 #3448],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3582 #3582],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3682 #3682],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3829 #3829],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3846 #3846],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3914 #3914],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3947 #3947],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3950 #3950],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3951 #3951],
|
||||
[@https://svn.boost.org/trac/boost/ticket/3985 #3985],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4010 #4010],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4417 #4417],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4019 #4019],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4039 #4039],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4218 #4218],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4230 #4230],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4230 #4352],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4230 #4352],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4250 #4250],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4297 #4297],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4350 #4350],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4352 #4352],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4426 #4426],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4516 #4516],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4524 #4524],
|
||||
[@https://svn.boost.org/trac/boost/ticket/4557 #4557].
|
||||
|
||||
@@ -46,21 +46,20 @@ class MyThrowingClass
|
||||
};
|
||||
|
||||
|
||||
|
||||
int main ()
|
||||
template < template<class, bool> class IntermoduleType >
|
||||
int intermodule_singleton_test()
|
||||
{
|
||||
|
||||
bool exception_thrown = false;
|
||||
bool exception_2_thrown = false;
|
||||
|
||||
try{
|
||||
detail::intermodule_singleton<MyThrowingClass, true>::get();
|
||||
IntermoduleType<MyThrowingClass, true>::get();
|
||||
}
|
||||
catch(int &){
|
||||
exception_thrown = true;
|
||||
//Second try
|
||||
try{
|
||||
detail::intermodule_singleton<MyThrowingClass, true>::get();
|
||||
IntermoduleType<MyThrowingClass, true>::get();
|
||||
}
|
||||
catch(interprocess_exception &){
|
||||
exception_2_thrown = true;
|
||||
@@ -71,15 +70,15 @@ int main ()
|
||||
return 1;
|
||||
}
|
||||
|
||||
MyClass & mc = detail::intermodule_singleton<MyClass>::get();
|
||||
MyClass & mc = IntermoduleType<MyClass>::get();
|
||||
mc.shout();
|
||||
detail::intermodule_singleton<MyClass>::get().shout();
|
||||
detail::intermodule_singleton<MyDerivedClass>::get().shout();
|
||||
IntermoduleType<MyClass>::get().shout();
|
||||
IntermoduleType<MyDerivedClass>::get().shout();
|
||||
|
||||
//Second try
|
||||
exception_2_thrown = false;
|
||||
try{
|
||||
detail::intermodule_singleton<MyThrowingClass, true>::get();
|
||||
IntermoduleType<MyThrowingClass, true>::get();
|
||||
}
|
||||
catch(interprocess_exception &){
|
||||
exception_2_thrown = true;
|
||||
@@ -91,5 +90,20 @@ int main ()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
if(0 != intermodule_singleton_test<detail::portable_intermodule_singleton>()){
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef BOOST_INTERPROCESS_WINDOWS
|
||||
if(0 != intermodule_singleton_test<detail::windows_intermodule_singleton>()){
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include <boost/interprocess/detail/config_end.hpp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user