Robert Dailey | 10 Feb 20:05
Picon

unordered_map failing to compile on MSVC7.1 using STLport

For some reason, I get the following compiler error on Visual Studio .NET
2003 when using STLport 5.2.1:

boost\unordered\detail\allocator_helpers.hpp(318) : error C2039:
'select_on_container_copy_construction' : is not a member of
'stlpd_std::allocator<_Tp>'

Any idea why this is happening? If not, what other information can I
provide?

---------
Robert Dailey

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Robert Dailey | 10 Feb 20:13
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

On Fri, Feb 10, 2012 at 1:05 PM, Robert Dailey <rcdailey <at> gmail.com> wrote:

> For some reason, I get the following compiler error on Visual Studio .NET
> 2003 when using STLport 5.2.1:
>
> boost\unordered\detail\allocator_helpers.hpp(318) : error C2039:
> 'select_on_container_copy_construction' : is not a member of
> 'stlpd_std::allocator<_Tp>'
>
> Any idea why this is happening? If not, what other information can I
> provide?
>

Here is the full error:

C:\Code\work\cmake-gfe-dev\build-vc7\third_party\boost\1.48.0\include\boost\unordered\detail\allocator_helpers.hpp(318)
: error C2039: 'select_on_container_copy_construction' : is not a member of
'stlpd_std::allocator<_Tp>'
        with
        [

_Tp=boost::unordered::detail::ptr_node<boost::unordered::detail::map<boost::unordered::unordered_map<int,int>::value_allocator,int,boost::hash<int>,stlpd_std::equal_to<int>>::value_type>
        ]

C:\Code\work\cmake-gfe-dev\build-vc7\third_party\boost\1.48.0\include\boost\unordered\detail\allocator_helpers.hpp(436)
: see reference to function template instantiation
'boost::enable_if_c<B,T>::type
boost::unordered::detail::call_select_on_container_copy_construction<Alloc>(const
Alloc &)' being compiled
        with
(Continue reading)

Robert Dailey | 13 Feb 18:11
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

I would really appreciate some insight here, I have no idea what is going
on. This is actually preventing company code from compiling, so it's
extremely important. If I can't get help here the only thing I can do is
just not use boost.

The "call stack" chain for template instantiation provided in my pasted
error is confusing. It shows the source of where I create the
unordered_map, which is in  gdgalquery.h(40), but after that it says that
_locale.h is next? How is _locale.h next? That tells me that STL is
instantiating my class? Anyone know what is going on?

---------
Robert Dailey

On Fri, Feb 10, 2012 at 1:13 PM, Robert Dailey <rcdailey <at> gmail.com> wrote:

> On Fri, Feb 10, 2012 at 1:05 PM, Robert Dailey <rcdailey <at> gmail.com> wrote:
>
>> For some reason, I get the following compiler error on Visual Studio .NET
>> 2003 when using STLport 5.2.1:
>>
>> boost\unordered\detail\allocator_helpers.hpp(318) : error C2039:
>> 'select_on_container_copy_construction' : is not a member of
>> 'stlpd_std::allocator<_Tp>'
>>
>> Any idea why this is happening? If not, what other information can I
>> provide?
>>
>
> Here is the full error:
(Continue reading)

Daniel James | 13 Feb 22:28
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

On 13 February 2012 17:11, Robert Dailey <rcdailey <at> gmail.com> wrote:
> I would really appreciate some insight here, I have no idea what is going
> on. This is actually preventing company code from compiling, so it's
> extremely important. If I can't get help here the only thing I can do is
> just not use boost.
>
> The "call stack" chain for template instantiation provided in my pasted
> error is confusing. It shows the source of where I create the
> unordered_map, which is in  gdgalquery.h(40), but after that it says that
> _locale.h is next? How is _locale.h next? That tells me that STL is
> instantiating my class? Anyone know what is going on?

Sorry, I missed this before. The main problem is that we no longer
have Visual C++ 7.1 testers, so regressions for that compiler are
quite likely. In this case the problem is with support for C++11
allocators. There's an emulated version of C++11's allocator traits
which doesn't seem to work for Visual C++ 7.1. The simplest way to fix
that is probably to disable most of the new features for older
versions of Visual C++, and hope that everything else works okay.

Although it might be possible to get the new features to work on
Visual C++ 7.1. There are two possible places where it's failing.
First is the has_select_on_container_copy_construction trait, second
is the use of SFINAE the disable the function where you saw this
error. This detects in an allocator has a
has_select_on_container_copy_construction member. Try running this:

    #include <iostream>
    #include <boost/unordered_map.hpp>

(Continue reading)

Robert Dailey | 13 Feb 23:41
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

On Mon, Feb 13, 2012 at 3:28 PM, Daniel James <dnljms <at> gmail.com> wrote:

> On 13 February 2012 17:11, Robert Dailey <rcdailey <at> gmail.com> wrote:
> > I would really appreciate some insight here, I have no idea what is going
> > on. This is actually preventing company code from compiling, so it's
> > extremely important. If I can't get help here the only thing I can do is
> > just not use boost.
> >
> > The "call stack" chain for template instantiation provided in my pasted
> > error is confusing. It shows the source of where I create the
> > unordered_map, which is in  gdgalquery.h(40), but after that it says that
> > _locale.h is next? How is _locale.h next? That tells me that STL is
> > instantiating my class? Anyone know what is going on?
>
> Sorry, I missed this before. The main problem is that we no longer
> have Visual C++ 7.1 testers, so regressions for that compiler are
> quite likely. In this case the problem is with support for C++11
> allocators. There's an emulated version of C++11's allocator traits
> which doesn't seem to work for Visual C++ 7.1. The simplest way to fix
> that is probably to disable most of the new features for older
> versions of Visual C++, and hope that everything else works okay.
>
> Although it might be possible to get the new features to work on
> Visual C++ 7.1. There are two possible places where it's failing.
> First is the has_select_on_container_copy_construction trait, second
> is the use of SFINAE the disable the function where you saw this
> error. This detects in an allocator has a
> has_select_on_container_copy_construction member. Try running this:
>
>    #include <iostream>
(Continue reading)

Robert Dailey | 14 Feb 19:00
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

On Mon, Feb 13, 2012 at 4:41 PM, Robert Dailey <rcdailey <at> gmail.com> wrote:

> On Mon, Feb 13, 2012 at 3:28 PM, Daniel James <dnljms <at> gmail.com> wrote:
>
>> On 13 February 2012 17:11, Robert Dailey <rcdailey <at> gmail.com> wrote:
>> > I would really appreciate some insight here, I have no idea what is
>> going
>> > on. This is actually preventing company code from compiling, so it's
>> > extremely important. If I can't get help here the only thing I can do is
>> > just not use boost.
>> >
>> > The "call stack" chain for template instantiation provided in my pasted
>> > error is confusing. It shows the source of where I create the
>> > unordered_map, which is in  gdgalquery.h(40), but after that it says
>> that
>> > _locale.h is next? How is _locale.h next? That tells me that STL is
>> > instantiating my class? Anyone know what is going on?
>>
>> Sorry, I missed this before. The main problem is that we no longer
>> have Visual C++ 7.1 testers, so regressions for that compiler are
>> quite likely. In this case the problem is with support for C++11
>> allocators. There's an emulated version of C++11's allocator traits
>> which doesn't seem to work for Visual C++ 7.1. The simplest way to fix
>> that is probably to disable most of the new features for older
>> versions of Visual C++, and hope that everything else works okay.
>>
>> Although it might be possible to get the new features to work on
>> Visual C++ 7.1. There are two possible places where it's failing.
>> First is the has_select_on_container_copy_construction trait, second
>> is the use of SFINAE the disable the function where you saw this
(Continue reading)

Ion Gaztañaga | 14 Feb 23:50
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

El 14/02/2012 19:00, Robert Dailey escribió:

>> Unfortunately it does print 1 for me :(
>>
>
> Anyone know of a way to fix this for MSVC 7.1?

There is a allocator_traits class in Boost.Container that worksin 
MSVC7.1 (it has problems with some GCC versions with some overload 
detection) as I test all my libraries with this compiler. The 
implementation is not optimal for compilers with advanced SFINAE 
expressions based on decltype (it's in my to-do list, but the portable 
implementation is also valid in those compilers).

Ion

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Ion Gaztañaga | 14 Feb 23:59
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

El 14/02/2012 23:50, Ion Gaztañaga escribió:
> El 14/02/2012 19:00, Robert Dailey escribió:
>
>>> Unfortunately it does print 1 for me :(
>>>
>>
>> Anyone know of a way to fix this for MSVC 7.1?
>
> There is a allocator_traits class in Boost.Container that worksin
> MSVC7.1

Just a note, the implementation was committed for Boost 1.49.

Ion

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Daniel James | 16 Feb 22:39
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

2012/2/14 Ion Gaztañaga <igaztanaga <at> gmail.com>:
> El 14/02/2012 23:50, Ion Gaztañaga escribió:
>
>> El 14/02/2012 19:00, Robert Dailey escribió:
>>
>>>> Unfortunately it does print 1 for me :(
>>>>
>>>
>>> Anyone know of a way to fix this for MSVC 7.1?
>>
>>
>> There is a allocator_traits class in Boost.Container that worksin
>> MSVC7.1
>
>
> Just a note, the implementation was committed for Boost 1.49.

I've changed unordered in trunk to use it for old versions of visual
c++. Although it's untested and I've no idea if it'll work. It should
be possible to just copy the relevant header into boost 1.48. It's at:

http://svn.boost.org/svn/boost/trunk/boost/unordered/detail/allocator_helpers.hpp

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Robert Dailey | 17 Feb 00:14
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

On Thu, Feb 16, 2012 at 3:39 PM, Daniel James <dnljms <at> gmail.com> wrote:

> 2012/2/14 Ion Gaztañaga <igaztanaga <at> gmail.com>:
> > El 14/02/2012 23:50, Ion Gaztañaga escribió:
> >
> >> El 14/02/2012 19:00, Robert Dailey escribió:
> >>
> >>>> Unfortunately it does print 1 for me :(
> >>>>
> >>>
> >>> Anyone know of a way to fix this for MSVC 7.1?
> >>
> >>
> >> There is a allocator_traits class in Boost.Container that worksin
> >> MSVC7.1
> >
> >
> > Just a note, the implementation was committed for Boost 1.49.
>
> I've changed unordered in trunk to use it for old versions of visual
> c++. Although it's untested and I've no idea if it'll work. It should
> be possible to just copy the relevant header into boost 1.48. It's at:
>
>
> http://svn.boost.org/svn/boost/trunk/boost/unordered/detail/allocator_helpers.hpp

I replaced my allocator_helpers.hpp with yours and I get:

C:\Code\work\cmake-gfe-dev\build-vc7\third_party\boost\1.48.0\include\boost\unordered\detail\allocator_helpers.hpp(47)
: fatal error C1083: Cannot open include file:
(Continue reading)

Daniel James | 17 Feb 00:55
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

On 16 Feb 2012 23:15, "Robert Dailey" <rcdailey <at> gmail.com> wrote:
>
> On Thu, Feb 16, 2012 at 3:39 PM, Daniel James <dnljms <at> gmail.com> wrote:
> >
> > I've changed unordered in trunk to use it for old versions of visual
> > c++. Although it's untested and I've no idea if it'll work. It should
> > be possible to just copy the relevant header into boost 1.48. It's at:
> >
> >
> >
http://svn.boost.org/svn/boost/trunk/boost/unordered/detail/allocator_helpers.hpp
>
>
> I replaced my allocator_helpers.hpp with yours and I get:

Sorry, that should have been 1.49 since container's allocator_traits is new.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Robert Dailey | 17 Feb 01:05
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

On Thu, Feb 16, 2012 at 5:55 PM, Daniel James <dnljms <at> gmail.com> wrote:

> On 16 Feb 2012 23:15, "Robert Dailey" <rcdailey <at> gmail.com> wrote:
> >
> > On Thu, Feb 16, 2012 at 3:39 PM, Daniel James <dnljms <at> gmail.com> wrote:
> > >
> > > I've changed unordered in trunk to use it for old versions of visual
> > > c++. Although it's untested and I've no idea if it'll work. It should
> > > be possible to just copy the relevant header into boost 1.48. It's at:
> > >
> > >
> > >
>
> http://svn.boost.org/svn/boost/trunk/boost/unordered/detail/allocator_helpers.hpp
> >
> >
> > I replaced my allocator_helpers.hpp with yours and I get:
>
> Sorry, that should have been 1.49 since container's allocator_traits is
> new.

When will 1.49 be released? I may just have to wait for 1.49 to come
around, hopefully your fix will be included in that release.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Daniel James | 17 Feb 01:15
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

On 17 February 2012 00:05, Robert Dailey <rcdailey <at> gmail.com> wrote:
> On Thu, Feb 16, 2012 at 5:55 PM, Daniel James <dnljms <at> gmail.com> wrote:
>>
>> Sorry, that should have been 1.49 since container's allocator_traits is
>> new.
>
> When will 1.49 be released? I may just have to wait for 1.49 to come
> around, hopefully your fix will be included in that release.

1.49 is supposed to be released at the start of next week, I don't
know if it's happening though. This won't be included in 1.49, it's
too late.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Robert Dailey | 17 Feb 18:54
Picon

Re: unordered_map failing to compile on MSVC7.1 using STLport

Another interesting point is that if I remove the usage of STLport (both on
the include path and preprocessor), this is a non-issue.

---------
Robert Dailey

On Thu, Feb 16, 2012 at 6:15 PM, Daniel James <dnljms <at> gmail.com> wrote:

> On 17 February 2012 00:05, Robert Dailey <rcdailey <at> gmail.com> wrote:
> > On Thu, Feb 16, 2012 at 5:55 PM, Daniel James <dnljms <at> gmail.com> wrote:
> >>
> >> Sorry, that should have been 1.49 since container's allocator_traits is
> >> new.
> >
> > When will 1.49 be released? I may just have to wait for 1.49 to come
> > around, hopefully your fix will be included in that release.
>
> 1.49 is supposed to be released at the start of next week, I don't
> know if it's happening though. This won't be included in 1.49, it's
> too late.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

(Continue reading)


Gmane