From 8e00803c8312411084eb0ad2f657b4eb59138843 Mon Sep 17 00:00:00 2001 From: Michael Glassford Date: Wed, 30 Mar 2005 16:59:07 +0000 Subject: [PATCH] Don't include explicit instantiations in release builds (they increase the code size significantly). [SVN r27887] --- src/read_write_mutex.cpp | 62 +++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/src/read_write_mutex.cpp b/src/read_write_mutex.cpp index 5ab33b8e..26ac8287 100644 --- a/src/read_write_mutex.cpp +++ b/src/read_write_mutex.cpp @@ -1696,47 +1696,49 @@ read_write_lock_state::read_write_lock_state_enum timed_read_write_mutex::state( return m_impl.state(); } -//Explicit instantiations of read/write locks to catch syntax errors in templates +#if !defined(NDEBUG) + //Explicit instantiations of read/write locks to catch syntax errors in templates -template class boost::detail::thread::scoped_read_write_lock; -template class boost::detail::thread::scoped_read_write_lock; -template class boost::detail::thread::scoped_read_write_lock; + template class boost::detail::thread::scoped_read_write_lock; + template class boost::detail::thread::scoped_read_write_lock; + template class boost::detail::thread::scoped_read_write_lock; -//template class boost::detail::thread::scoped_try_read_write_lock; -template class boost::detail::thread::scoped_try_read_write_lock; -template class boost::detail::thread::scoped_try_read_write_lock; + //template class boost::detail::thread::scoped_try_read_write_lock; + template class boost::detail::thread::scoped_try_read_write_lock; + template class boost::detail::thread::scoped_try_read_write_lock; -//template class boost::detail::thread::scoped_timed_read_write_lock; -//template class boost::detail::thread::scoped_timed_read_write_lock; -template class boost::detail::thread::scoped_timed_read_write_lock; + //template class boost::detail::thread::scoped_timed_read_write_lock; + //template class boost::detail::thread::scoped_timed_read_write_lock; + template class boost::detail::thread::scoped_timed_read_write_lock; -//Explicit instantiations of read locks to catch syntax errors in templates + //Explicit instantiations of read locks to catch syntax errors in templates -template class boost::detail::thread::scoped_read_lock; -template class boost::detail::thread::scoped_read_lock; -template class boost::detail::thread::scoped_read_lock; + template class boost::detail::thread::scoped_read_lock; + template class boost::detail::thread::scoped_read_lock; + template class boost::detail::thread::scoped_read_lock; -//template class boost::detail::thread::scoped_try_read_lock; -template class boost::detail::thread::scoped_try_read_lock; -template class boost::detail::thread::scoped_try_read_lock; + //template class boost::detail::thread::scoped_try_read_lock; + template class boost::detail::thread::scoped_try_read_lock; + template class boost::detail::thread::scoped_try_read_lock; -//template class boost::detail::thread::scoped_timed_read_lock; -//template class boost::detail::thread::scoped_timed_read_lock; -template class boost::detail::thread::scoped_timed_read_lock; + //template class boost::detail::thread::scoped_timed_read_lock; + //template class boost::detail::thread::scoped_timed_read_lock; + template class boost::detail::thread::scoped_timed_read_lock; -//Explicit instantiations of write locks to catch syntax errors in templates + //Explicit instantiations of write locks to catch syntax errors in templates -template class boost::detail::thread::scoped_write_lock; -template class boost::detail::thread::scoped_write_lock; -template class boost::detail::thread::scoped_write_lock; + template class boost::detail::thread::scoped_write_lock; + template class boost::detail::thread::scoped_write_lock; + template class boost::detail::thread::scoped_write_lock; -//template class boost::detail::thread::scoped_try_write_lock; -template class boost::detail::thread::scoped_try_write_lock; -template class boost::detail::thread::scoped_try_write_lock; + //template class boost::detail::thread::scoped_try_write_lock; + template class boost::detail::thread::scoped_try_write_lock; + template class boost::detail::thread::scoped_try_write_lock; -//template class boost::detail::thread::scoped_timed_write_lock; -//template class boost::detail::thread::scoped_timed_write_lock; -template class boost::detail::thread::scoped_timed_write_lock; + //template class boost::detail::thread::scoped_timed_write_lock; + //template class boost::detail::thread::scoped_timed_write_lock; + template class boost::detail::thread::scoped_timed_write_lock; +#endif } // namespace boost // Change Log: