#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: | Ion Gaztañaga |
|---|---|---|---|
| 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)
Change History (7)
by , 9 years ago
| Attachment: | vc12_fix_has_member_function_callable_with.patch added |
|---|
comment:1 by , 9 years ago
comment:2 by , 9 years ago
May be it should read
#ifdef BOOST_NO_SFINAE_EXPR
rather than
#ifdef BOOST_MSVC
comment:4 by , 8 years ago
Is there any chance this can be part of boost 1.56.0 (whenever that gets released)?
by , 7 years ago
| Attachment: | has_member_function_callable_with.hpp added |
|---|
Note:
See TracTickets
for help on using tickets.

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).