Modify

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#9332 closed Bugs (fixed)

has_member_function_callable_with.hpp compile error on msvc-12.0 - '.select_on_container_copy_construction' must have class/struct/union

Reported by: viboes Owned by: igaztanaga
Milestone: To Be Determined Component: intrusive
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description

The regression test are showing this compiler error on Boost.Thread

Test output: teeks99-10-win2008-64on64 - thread - container__thread_ptr_list_p / msvc-12.0
Rev 86532 / Fri, 01 Nov 2013 12:53:59 +0000
Compile [2013-11-01 22:52:20 UTC]: fail



    call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64 >nul
cl /Zm800 -nologo @"C:\local\results\boost\bin.v2\libs\thread\test\container__thread_ptr_list_p.test\msvc-12.0\debug\address-model-64\threading-multi\threads\container\thread_ptr_list_pass.obj.rsp" 

thread_ptr_list_pass.cpp
C:\local\boost\boost/intrusive/detail/has_member_function_callable_with.hpp(200) : error C2228: left of '.select_on_container_copy_construction' must have class/struct/union
        type is 'boost::move_detail::add_rvalue_reference<U>::type'
        C:\local\boost\boost/intrusive/detail/has_member_function_callable_with.hpp(276) : see reference to class template instantiation 'boost::container::container_detail::has_member_function_callable_with_select_on_container_copy_construction_impl<Fun,true,>' being compiled
        with
        [
            Fun=std::allocator<thread_ptr>
        ]
        C:\local\boost\boost/container/allocator_traits.hpp(262) : see reference to class template instantiation 'boost::container::container_detail::has_member_function_callable_with_select_on_container_copy_construction<const Alloc,>' being compiled
        with
        [
            Alloc=std::allocator<thread_ptr>
        ]
        C:\local\boost\boost/container/list.hpp(84) : see reference to class template instantiation 'boost::container::allocator_traits<Allocator>' being compiled
        with
        [
            Allocator=std::allocator<thread_ptr>
        ]
        C:\local\boost\boost/container/list.hpp(121) : see reference to class template instantiation 'boost::container::container_detail::intrusive_list_type<Allocator>' being compiled
        with
        [
            Allocator=std::allocator<thread_ptr>
        ]
        ..\libs\thread\test\threads\container\thread_ptr_list_pass.cpp(62) : see reference to class template instantiation 'boost::container::list<thread_ptr,std::allocator<T>>' being compiled
        with
        [
            T=thread_ptr
        ]
            


Attachments (2)

vc12_fix_has_member_function_callable_with.patch (1.4 KB) - added by Daniela Engert <dani@…> 4 years ago.
has_member_function_callable_with.hpp (18.2 KB) - added by anonymous 18 months ago.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by Daniela Engert <dani@…>

comment:1 Changed 4 years ago by Daniela Engert <dani@…>

The attached patch seems to work around the compile failure with vc12. IIUC, the root cause is

boost::move_detail::declval<F>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME ()

being evaluated (line 201).

comment:2 Changed 4 years ago by Daniela Engert <dani@…>

May be it should read

#ifdef BOOST_NO_SFINAE_EXPR

rather than

#ifdef BOOST_MSVC

comment:3 Changed 4 years ago by igaztanaga

  • Resolution set to fixed
  • Status changed from new to closed

(In [86626]) Fixes #9332

comment:4 Changed 3 years ago by anonymous

Is there any chance this can be part of boost 1.56.0 (whenever that gets released)?

comment:5 Changed 3 years ago by igaztanaga

Yes, it's already in the master branch.

Changed 18 months ago by anonymous

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain igaztanaga.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.