[multi_index].[example].[composite_keys]. Fails to compile with Solaris 10

Hi, OS: SunOS 5.10 patches/ss11_patches.html, http://blogs.sun.com/roller/resources/sga/ boost_1_33_1.patch and following instructions listed at http://blogs.sun.com/ sga/entry/boost_1_33_1, am still unable to do so. However, I can compile other examples provided with multi_index.
CC -library=stlport4 -features=tmplife -featurestmplrefstatic -fast -I$BOOST_INCLUDE composite_keys.cpp
boost/include/boost-1_33_1/boost/multi_index/ordered_index.hpp", line 784: Error: boost::multi_index::composite_key_compare<std::less<const file_entry*>, std::less<std::string>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>::operator()<boost::multi_index:: composite_key<file_entry, boost::multi_index::member<file_entry, const file_entry*, 21>, boost::multi_index::member<file_entry, std::string, 1>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::multi_index::composite_key<file_entry, boost::multi_index:: member<file_entry, const file_entry*, 21>, boost::multi_index::member<file_entry, std::string, 1>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>>(const boost::multi_index::composite_ key_result<boost::multi_index::composite_key<file_entry, boost::multi_index::member<file_entry, const file_entry*, 21>, boost::multi_index::member<file_entry, std::string,1>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>>&, const boost::multi_index::composite_key_result< boost::multi_index::composite_key<file_entry, boost::multi_index::member<file_entry, const file_entry*, 21>, boost::multi_index::member<file_entry, std::string, 1>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>>&) const is not accessible from boost::multi_index::detail::ordered_index<name_key, std::less<boost::multi_index::composite_key_result< boost::multi_index::composite_key<file_entry, boost::multi_index::member<file_entry, const file_entry*, 21>, boost::multi_index::member<file_entry, std::string, 1>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::nulles::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>>>, boost::multi_index::detail::nth_layer<1,file_entry, boost::multi_index::indexed_by<boost::multi_index::ordered_unique<name_key, mpl_::na, mpl_::na>, boost::multi_index::ordered_non_unique< size_key, mpl_::na, mpl_::na>, mpl_::na,mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<file_entry>> , boost::mpl::vector0<mpl_::na>, boost::multi_index::detail::ordered_unique_tag>::invariant_() const. ----------------------------------------------------------------------------- similar error is reported for line 785 ("boost/include/boost-1_33_1/boost/ multi_index/ordered_index.hpp" ) regards, Prashant Thakre

Prashant Thakre ha escrito:
[long error message snipped]
regards, Prashant Thakre
Hello, Could you please try to compile the attached file in your environment? If it *fails* to compile, then it's likely that you can work around the problem you're having with Boost.MultiIndex by going to lines 39 and ff. of boost/multi_index/detail/access_specifier.hpp: #if BOOST_WORKAROUND(__GNUC__, <3)||\ BOOST_WORKAROUND(__GNUC__,==3)&&(__GNUC_MINOR__<4)||\ BOOST_WORKAROUND(BOOST_MSVC,==1310)||\ BOOST_WORKAROUND(BOOST_MSVC,==1400) #define BOOST_MULTI_INDEX_PRIVATE_IF_USING_DECL_FOR_TEMPL_FUNCTIONS public #else #define BOOST_MULTI_INDEX_PRIVATE_IF_USING_DECL_FOR_TEMPL_FUNCTIONS private #endif and adding Sun Studio as a special case: #if BOOST_WORKAROUND(__GNUC__, <3)||\ BOOST_WORKAROUND(__GNUC__,==3)&&(__GNUC_MINOR__<4)||\ BOOST_WORKAROUND(BOOST_MSVC,==1310)||\ BOOST_WORKAROUND(BOOST_MSVC,==1400)||\ BOOST_WORKAROUND(__SUNPRO_CC,BOOST_TESTED_AT(0x580)) #define BOOST_MULTI_INDEX_PRIVATE_IF_USING_DECL_FOR_TEMPL_FUNCTIONS public #else #define BOOST_MULTI_INDEX_PRIVATE_IF_USING_DECL_FOR_TEMPL_FUNCTIONS private #endif Does this help? Please report back, good luck, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Joaquín Mª López Muñoz <joaquin <at> tid.es> writes:
applying
Hi, Sample file provided did *fail* to compile with Sun Studio 11 on Solaris 10. ----Error---- Could not find a match for A::F<A::R>(int) needed in main(). ------------- However, adding __SUNPRO_CC as a special case for access_specifier.hpp didn't help. "boost/include/boost-1_33_1/boost/multi_index/detail/access_specifier.hpp" line 43: Error: Badly formed constant expression. Thanks a lot for the help. -regards, Prashant Thakre

Prashant Thakre ha escrito: [...]
My hunch is that you overlook a needed ||\ at the end of line 42. Is that it? Oherwise, please send me your modified copy of access_specifier.hpp and I'll be happy to take a look at it.
Thanks a lot for the help.
Thanks for using Boost.MultiIndex, I hope it's being useful to your project.
-regards, Prashant Thakre
Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Joaquín Mª López Muñoz <joaquin <at> tid.es> writes:
Although I don't have access to the system right now, you have rightly pointed out the source of this error. I should have been more careful while making the change :(
Thanks once again. -- regards, Prashant Thakre
participants (2)
-
Joaquín Mª López Muñoz
-
Prashant Thakre