Opened 8 years ago

Closed 6 years ago

#10732 closed Bugs (invalid)

clang-3.5 splay_set compiling error

Reported by: khizmax@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: intrusive
Version: Boost 1.57.0 Severity: Problem
Keywords: splay_set default_bstree_hook Cc:

Description

When compiling libcds project, the following error is encountered for clang-3.4, clang-3.5 64bit:

In file included from /home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/splay_set.hpp:21:
In file included from /home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/splaytree.hpp:26:
In file included from /home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/bstree.hpp:25:
In file included from /home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/bs_set_hook.hpp:25:
/home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/options.hpp:54:48: error: no type named 'default_bstree_hook' in 'set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> >'
BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_bstree_hook);

The same error is observed or boost 1.55, 1.56, 1.57 beta1. Clang-3.3 and gcc-4.8, gcc-4.9 64bit is ok. Environment: ubuntu-14.04 amd64

Compiler output:

clang-3.5 -std=c++11 -c  -pedantic -Wall -mcx16 -march=native -DNDEBUG -O3 -fno-strict-aliasing   -m64 -fPIC -march=native  -I/home/khizmax/works/lib/boost_1_57_0_b1   -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 -I.. -I../tests/test-hdr -I../tests ../tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp -o ../tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.o
In file included from ../tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp:4:
In file included from ../cds/intrusive/striped_set/boost_splay_set.h:6:
In file included from /home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/splay_set.hpp:21:
In file included from /home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/splaytree.hpp:26:
In file included from /home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/bstree.hpp:25:
In file included from /home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/bs_set_hook.hpp:25:
/home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/options.hpp:54:48: error: no type named 'default_bstree_hook' in 'set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> >'
BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_bstree_hook);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/options.hpp:46:27: note: expanded from macro 'BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION'
   {  typedef typename T::BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER type;  };\
                          ^
/home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/detail/mpl.hpp:139:24: note: in instantiation of template class 'boost::intrusive::detail::default_bstree_hook::apply<set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> > >' requested here
   typedef typename F::template apply<Param>::type type;
                       ^
/home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/detail/mpl.hpp:203:7: note: in instantiation of template class 'boost::intrusive::detail::apply<boost::intrusive::detail::default_bstree_hook, set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> > >' requested here
    : if_c<C,F1,F2>::type
      ^
/home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/options.hpp:145:21: note: in instantiation of template class 'boost::intrusive::detail::eval_if_c<true, boost::intrusive::detail::apply<boost::intrusive::detail::default_bstree_hook, set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> > >, boost::intrusive::detail::identity<boost::intrusive::detail::default_bstree_hook> >' requested here
   typedef typename eval_if_c
                    ^
/home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/splay_set.hpp:440:29: note: in instantiation of template class 'boost::intrusive::detail::get_value_traits<set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> >, boost::intrusive::detail::default_bstree_hook>' requested here
   typedef typename detail::get_value_traits
                            ^
/home/khizmax/works/lib/boost_1_57_0_b1/boost/intrusive/splay_set.hpp:463:14: note: in instantiation of template class 'boost::intrusive::make_splay_set<set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> >, boost::intrusive::compare<set::IntrusiveStripedSetHdrTest::less<set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> > > >, void, void, void, void>' requested here
   :  public make_splay_set<T,
             ^
../cds/intrusive/striped_set/adapter.h:202:34: note: in instantiation of template class 'boost::intrusive::splay_set<set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> >, boost::intrusive::compare<set::IntrusiveStripedSetHdrTest::less<set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> > > >, void, void, void, void>' requested here
                typedef typename container_type::value_type     value_type      ;   ///< value type stored in the container
                                 ^
../cds/intrusive/striped_set.h:279:26: note: in instantiation of template class 'cds::intrusive::striped_set::details::boost_intrusive_set_adapter<boost::intrusive::splay_set<set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> >, boost::intrusive::compare<set::IntrusiveStripedSetHdrTest::less<set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> > > >, void, void, void, void> >' requested here
        typedef typename bucket_type::value_type    value_type  ;   ///< value type stored in the set
                         ^
../tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp:56:18: note: in instantiation of template class 'cds::intrusive::StripedSet<boost::intrusive::splay_set<set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> >, boost::intrusive::compare<set::IntrusiveStripedSetHdrTest::less<set::IntrusiveStripedSetHdrTest::base_item<boost::intrusive::bs_set_member_hook<void, void, void> > > >, void, void, void, void>, cds::opt::mutex_policy<cds::intrusive::striped_set::refinable<std::recursive_mutex, cds::backoff::yield, std::allocator<int> > >, cds::opt::hash<set::IntrusiveStripedSetHdrTest::hash_int>, cds::opt::resizing_policy<cds::intrusive::striped_set::single_bucket_size_threshold<0> > >' requested here
        set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
                 ^

Change History (5)

comment:1 by khizmax@…, 8 years ago

Similar error for Intel C++ 15 compiler for Linux (icc):

icc -std=c++11 -c  -pedantic -Wall -march=native -DNDEBUG -O3 -fno-strict-aliasing   -fPIC -march=native  -I/home/khizmax/works/lib/boost_1_56_0   -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 -I.. -I../tests/test-hdr -I../tests ../tests/test-hdr/set/hdr_intrusive_refinable_hashset_list.cpp -o ../tests/test-hdr/set/hdr_intrusive_refinable_hashset_list.o
/home/khizmax/works/lib/boost_1_56_0/boost/intrusive/options.hpp(49): error: class "set::IntrusiveStripedSetHdrTest::member_item<boost::intrusive::avl_set_member_hook<void, void, void, void>>" has no member "default_avltree_hook"
  BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_avltree_hook);
  ^
          detected during:
            instantiation of class "boost::intrusive::detail::default_avltree_hook::apply<T> [with T=set::<unnamed>::member_item_type]" at line 118 of "/home/khizmax/works/lib/boost_1_56_0/boost/intrusive/detail/mpl.hpp"
            instantiation of class "boost::intrusive::detail::apply<F, Param> [with F=boost::intrusive::avltree_defaults::proto_value_traits, Param=set::<unnamed>::member_item_type]" at line 182 of "/home/khizmax/works/lib/boost_1_56_0/boost/intrusive/detail/mpl.hpp"
            instantiation of class "boost::intrusive::detail::eval_if_c<C, F1, F2> [with C=true, F1=boost::intrusive::detail::apply<boost::intrusive::avltree_defaults::proto_value_traits, set::<unnamed>::member_item_type>, F2=boost::intrusive::detail::identity<boost::intrusive::avltree_defaults::proto_value_traits>]" at line 132
            instantiation of class "boost::intrusive::detail::get_value_traits<T, SupposedValueTraits> [with T=set::<unnamed>::member_item_type, SupposedValueTraits=boost::intrusive::avltree_defaults::proto_value_traits]" at line 416 of "/home/khizmax/works/lib/boost_1_56_0/boost/intrusive/avl_set.hpp"
            instantiation of class "boost::intrusive::make_avl_set<T, O1, O2, O3, O4, O5> [with T=set::<unnamed>::member_item_type, O1=void, O2=void, O3=void, O4=void, O5=void]" at line 444 of "/home/khizmax/works/lib/boost_1_56_0/boost/intrusive/avl_set.hpp"
            instantiation of class "boost::intrusive::avl_set<T, O1, O2, O3, O4, O5> [with T=set::<unnamed>::member_item_type, O1=void, O2=void, O3=void, O4=void, O5=void]" at line 202 of "../cds/intrusive/striped_set/adapter.h"
            instantiation of class "cds::intrusive::striped_set::details::boost_intrusive_set_adapter<Set> [with Set=boost::intrusive::avl_set<set::<unnamed>::member_item_type, void, void, void, void, void>]" at line 279 of "../cds/intrusive/striped_set.h"
            instantiation of class "cds::intrusive::StripedSet<Container, Options...> [with Container=boost::intrusive::avl_set<set::<unnamed>::member_item_type, boost::intrusive::member_hook<set::<unnamed>::member_item_type, boost::intrusive::avl_set_member_hook<void, void, void, void>, &set::IntrusiveStripedSetHdrTest::member_item<boost::intrusive::avl_set_member_hook<void, void, void, void>>::hMember>,
                      boost::intrusive::compare<set::IntrusiveStripedSetHdrTest::less<set::<unnamed>::member_item_type>>, void, void, void>, Options=<cds::opt::hash<set::IntrusiveStripedSetHdrTest::hash_int>, cds::opt::mutex_policy<cds::intrusive::striped_set::refinable<std::recursive_mutex, cds::backoff::yield, std::allocator<int>>>, cds::opt::resizing_policy<cds::intrusive::striped_set::single_bucket_size_threshold<0UL>>>]" at line 96 of
                      "../tests/test-hdr/set/hdr_intrusive_refinable_hashset_avlset.cpp"

comment:2 by khizmax@…, 8 years ago

MSVC 2013 Update 4 RC: similar error:

1>d:\Developer\libs\boost_1_56_0\boost/intrusive/options.hpp(50): error C2039: 'default_bstree_hook' : is not a member of 'set::IntrusiveStripedSetHdrTest::base_item<set::`anonymous-namespace'::splay_set_base_hook>'
1>          d:\Developer\libs\boost_1_56_0\boost/intrusive/detail/mpl.hpp(118) : see reference to class template instantiation 'boost::intrusive::detail::default_bstree_hook::apply<Param>' being compiled
1>          with
1>          [
1>              Param=set::`anonymous-namespace'::base_item_type
1>          ]
1>          d:\Developer\libs\boost_1_56_0\boost/intrusive/detail/mpl.hpp(183) : see reference to class template instantiation 'boost::intrusive::detail::apply<SupposedValueTraits,T>' being compiled
1>          with
1>          [
1>              SupposedValueTraits=boost::intrusive::splaytree_defaults::proto_value_traits
1>  ,            T=set::`anonymous-namespace'::base_item_type
1>          ]
1>          d:\Developer\libs\boost_1_56_0\boost/intrusive/options.hpp(132) : see reference to class template instantiation 'boost::intrusive::detail::eval_if_c<true,boost::intrusive::detail::apply<SupposedValueTraits,T>,boost::intrusive::detail::identity<SupposedValueTraits>>' being compiled
1>          with
1>          [
1>              SupposedValueTraits=boost::intrusive::splaytree_defaults::proto_value_traits
1>  ,            T=set::`anonymous-namespace'::base_item_type
1>          ]
1>          d:\Developer\libs\boost_1_56_0\boost/intrusive/splay_set.hpp(437) : see reference to class template instantiation 'boost::intrusive::detail::get_value_traits<T,boost::intrusive::splaytree_defaults::proto_value_traits>' being compiled
1>          with
1>          [
1>              T=set::`anonymous-namespace'::base_item_type
1>          ]
1>          d:\Developer\libs\boost_1_56_0\boost/intrusive/splay_set.hpp(465) : see reference to class template instantiation 'boost::intrusive::make_splay_set<T,O1,O2,O3,O4,O5>' being compiled
1>          with
1>          [
1>              T=set::`anonymous-namespace'::base_item_type
1>  ,            O1=boost::intrusive::compare<set::IntrusiveStripedSetHdrTest::less<set::`anonymous-namespace'::base_item_type>>
1>  ,            O2=void
1>  ,            O3=void
1>  ,            O4=void
1>  ,            O5=void
1>          ]

comment:3 by Ion Gaztañaga, 8 years ago

I can't deduce much from the error log. Could you please send a little compilable example?

comment:4 by khizmax@…, 8 years ago

Oops, it is my mistake, sorry. Looks like I jumbled base and member hook for boost 1.56+.

I apologise, please, close the ticket.

comment:5 by Ion Gaztañaga, 6 years ago

Resolution: invalid
Status: newclosed

Reviewing old bugs. Closing as requested by reporter.

Note: See TracTickets for help on using tickets.