"JOAQUIN LOPEZ MU?Z" wrote:
Thank you, John! That'd definitely help a lot.
Oh, and while you're at it, it'd be interesting to also try
the offending snippet that Marc originally provided:
http://lists.boost.org/boost-users/2006/12/24313.php
with the corrections I suggested at
http://lists.boost.org/boost-users/2006/12/24320.php
All the tests pass.
The code that was posted doesn't compile for me, I see:
Compiling...
scrap.cpp
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2039: 'result_type' : is not a member of
'boost::multi_index::ordered_non_unique<Arg1>'
with
[
Arg1=boost::multi_index::member-
]
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
see reference to class template instantiation
'boost::multi_index::detail::key_less<KeyFromValue>' being compiled
with
[
KeyFromValue=boost::multi_index::detail::nth_composite_key_less>,boost::multi_index::ordered_non_unique>>>::composite_key_type,0>::key_from_value
]
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(1123)
: see reference to class template instantiation
'boost::multi_index::detail::nth_composite_key_less' being
compiled
with
[
CompositeKey=boost::multi_index::composite_key_result>,boost::multi_index::ordered_non_unique>>>::composite_key_type,
N=0
]
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(1211)
: see reference to class template instantiation
'boost::multi_index::composite_key_result_less<CompositeKeyResult>' being
compiled
with
[
CompositeKeyResult=boost::multi_index::composite_key_result>,boost::multi_index::ordered_non_unique>>>
]
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\ordered_index.hpp(1097)
: see reference to class template instantiation 'std::less<_Ty>' being
compiled
with
[
_Ty=boost::multi_index::composite_key
- >,boost::multi_index::ordered_non_unique>>::result_type
]
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\ordered_index.hpp(117) :
see reference to class template instantiation
'boost::multi_index::detail::ordered_index'
being compiled
with
[
KeyFromValue=boost::multi_index::ordered_unique::key_from_value_type,
Compare=boost::multi_index::ordered_unique::compare_type,
SuperMeta=boost::multi_index::detail::nth_layer<3,Item,boost::multi_index::indexed_by,boost::multi_index::ordered_non_unique,boost::multi_index::ordered_unique>,std::allocator<Item>>,
TagList=boost::multi_index::ordered_unique::tag_list_type,
Category=boost::multi_index::detail::ordered_unique_tag
]
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\ordered_index.hpp(117) :
see reference to class template instantiation
'boost::multi_index::detail::ordered_index'
being compiled
with
[
KeyFromValue=boost::multi_index::ordered_non_unique::key_from_value_type,
Compare=boost::multi_index::ordered_non_unique::compare_type,
SuperMeta=boost::multi_index::detail::nth_layer<2,Item,boost::multi_index::indexed_by,boost::multi_index::ordered_non_unique,boost::multi_index::ordered_unique>,std::allocator<Item>>,
TagList=boost::multi_index::ordered_non_unique::tag_list_type,
Category=boost::multi_index::detail::ordered_non_unique_tag
]
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index_container.hpp(80) : see
reference to class template instantiation
'boost::multi_index::detail::ordered_index'
being compiled
with
[
KeyFromValue=boost::multi_index::ordered_non_unique::key_from_value_type,
Compare=boost::multi_index::ordered_non_unique::compare_type,
SuperMeta=boost::multi_index::detail::nth_layer<1,Item,boost::multi_index::indexed_by,boost::multi_index::ordered_non_unique,boost::multi_index::ordered_unique>,std::allocator<Item>>,
TagList=boost::multi_index::ordered_non_unique::tag_list_type,
Category=boost::multi_index::detail::ordered_non_unique_tag
]
c:\data\boost\1.33.1\boost_1_33_1\IDE\regex-1.33.1\scrap\scrap.cpp(58) : see
reference to class template instantiation
'boost::multi_index::multi_index_container' being
compiled
with
[
Value=Item,
IndexSpecifierList=boost::multi_index::indexed_by,boost::multi_index::ordered_non_unique,boost::multi_index::ordered_unique>
]
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2146: syntax error : missing ',' before identifier 'result_type'
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2065: 'result_type' : undeclared identifier
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2976: 'std::less' : too few template arguments
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(141) : see declaration of 'std::less'
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2955: 'std::less' : use of class template requires template argument
list
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(141) : see declaration of 'std::less'
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2955: 'std::less' : use of class template requires template argument
list
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(141) : see declaration of 'std::less'
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2955: 'std::less' : use of class template requires template argument
list
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(141) : see declaration of 'std::less'
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2039: 'result_type' : is not a member of
'boost::multi_index::ordered_non_unique<Arg1>'
with
[
Arg1=boost::multi_index::member
-
]
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
see reference to class template instantiation
'boost::multi_index::detail::key_less<KeyFromValue>' being compiled
with
[
KeyFromValue=boost::multi_index::detail::nth_composite_key_less>,boost::multi_index::ordered_non_unique>>>::composite_key_type,1>::key_from_value
]
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(1123)
: see reference to class template instantiation
'boost::multi_index::detail::nth_composite_key_less' being
compiled
with
[
CompositeKey=boost::multi_index::composite_key_result>,boost::multi_index::ordered_non_unique>>>::composite_key_type,
N=1
]
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2146: syntax error : missing ',' before identifier 'result_type'
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C3861: 'result_type': identifier not found, even with
argument-dependent lookup
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2976: 'std::less' : too few template arguments
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(141) : see declaration of 'std::less'
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2955: 'std::less' : use of class template requires template argument
list
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(141) : see declaration of 'std::less'
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2955: 'std::less' : use of class template requires template argument
list
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(141) : see declaration of 'std::less'
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(154) :
error C2955: 'std::less' : use of class template requires template argument
list
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(141) : see declaration of 'std::less'
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(1123)
: error C3203: 'less' : class template invalid as template argument for
template parameter 'Compare0', expected a real type
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(1123)
: error C3203: 'less' : class template invalid as template argument for
template parameter 'Compare1', expected a real type
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(1126)
: error C3203: 'less' : class template invalid as template argument for
template parameter 'Compare0', expected a real type
c:\data\boost\1.33.1\boost_1_33_1\boost\multi_index\composite_key.hpp(1126)
: error C3203: 'less' : class template invalid as template argument for
template parameter 'Compare1', expected a real type
So I gave up at that point. Adding your example programs to the same VC7.1
IDE project did compile so I don't think it's a setup issue.
John.