From 5ae63cf69ed87542cfbd603b55feb2c9a2d2f88e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20M=2E=20L=C3=B3pez=20Mu=C3=B1oz?= Date: Thu, 10 Jun 2004 10:39:31 +0000 Subject: [PATCH] workaround for a seemingly ETI-related issue in vacpp [SVN r23071] --- include/boost/multi_index_container.hpp | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/include/boost/multi_index_container.hpp b/include/boost/multi_index_container.hpp index 3a66300..4018df4 100644 --- a/include/boost/multi_index_container.hpp +++ b/include/boost/multi_index_container.hpp @@ -113,9 +113,37 @@ public: /* construct/copy/destroy */ +#if BOOST_WORKAROUND(__IBMCPP__,<=600) + /* Visual Age seems to have an ETI issue with the default values + * for arguments args_list and al in the ctors below. + */ + +private: + static const ctor_args_list& default_ctor_args_list() + { + static ctor_args_list cal; + return cal; + } + + static const allocator_type& default_allocator() + { + static allocator_type al; + return al; + } + +public: +#endif + explicit multi_index_container( + +#if BOOST_WORKAROUND(__IBMCPP__,<=600) + const ctor_args_list& args_list=default_ctor_args_list(), + const allocator_type& al=default_allocator()): +#else const ctor_args_list& args_list=ctor_args_list(), const allocator_type& al=allocator_type()): +#endif + bfm_allocator(al), super(args_list,bfm_allocator::member), node_count(0) @@ -126,8 +154,15 @@ public: template multi_index_container( InputIterator first,InputIterator last, + +#if BOOST_WORKAROUND(__IBMCPP__,<=600) + const ctor_args_list& args_list=default_ctor_args_list(), + const allocator_type& al=default_allocator()): +#else const ctor_args_list& args_list=ctor_args_list(), const allocator_type& al=allocator_type()): +#endif + bfm_allocator(al), super(args_list,bfm_allocator::member), node_count(0)