Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

error: namespace "boost::type_traits" has no member "yes_type"

Hou_y_1
Beginner
724 Views

hi, I compile code calling some api of the boost by inter c++ compiler; but met massive errors as follow:

In file included from /usr/local/include/boost/type_traits/is_convertible.hpp(17),
                 from /usr/local/include/boost/math/tools/promotion.hpp(29),
                 from /usr/local/include/boost/math/special_functions/detail/round_fwd.hpp(12),
                 from /usr/local/include/boost/math/special_functions/math_fwd.hpp(27),
                 from /usr/local/include/boost/math/special_functions/fpclassify.hpp(19),
                 from ./include/caffe/common.hpp(5),
                 from ./include/caffe/blob.hpp(8),
                 from ./include/caffe/layers/average_layer.hpp(6),
                 from src/caffe/layers/average_layer.cpp(5):
/usr/local/include/boost/type_traits/is_complete.hpp(61): error: namespace "std" has no member "declval"
           template <class U, class = decltype(sizeof(std::declval< U >())) >
                                                           ^

In file included from /usr/local/include/boost/type_traits/is_convertible.hpp(17),
                 from /usr/local/include/boost/math/tools/promotion.hpp(29),
                 from /usr/local/include/boost/math/special_functions/detail/round_fwd.hpp(12),
                 from /usr/local/include/boost/math/special_functions/math_fwd.hpp(27),
                 from /usr/local/include/boost/math/special_functions/fpclassify.hpp(19),
                 from ./include/caffe/common.hpp(5),
                 from ./include/caffe/blob.hpp(8),
                 from ./include/caffe/layers/average_layer.hpp(6),
                 from src/caffe/layers/average_layer.cpp(5):
/usr/local/include/boost/type_traits/is_complete.hpp(61): error: type name is not allowed
           template <class U, class = decltype(sizeof(std::declval< U >())) >
                                                                    ^

In file included from /usr/local/include/boost/type_traits/is_convertible.hpp(17),
                 from /usr/local/include/boost/math/tools/promotion.hpp(29),
                 from /usr/local/include/boost/math/special_functions/detail/round_fwd.hpp(12),
                 from /usr/local/include/boost/math/special_functions/math_fwd.hpp(27),
                 from /usr/local/include/boost/math/special_functions/fpclassify.hpp(19),
                 from ./include/caffe/common.hpp(5),
                 from ./include/caffe/blob.hpp(8),
                 from ./include/caffe/layers/average_layer.hpp(6),
                 from src/caffe/layers/average_layer.cpp(5):
/usr/local/include/boost/type_traits/is_complete.hpp(61): error: expected an expression
           template <class U, class = decltype(sizeof(std::declval< U >())) >
                                                                        ^

In file included from /usr/local/include/boost/type_traits/is_convertible.hpp(17),
                 from /usr/local/include/boost/math/tools/promotion.hpp(29),
                 from /usr/local/include/boost/math/special_functions/detail/round_fwd.hpp(12),
                 from /usr/local/include/boost/math/special_functions/math_fwd.hpp(27),
                 from /usr/local/include/boost/math/special_functions/fpclassify.hpp(19),
                 from ./include/caffe/common.hpp(5),
                 from ./include/caffe/blob.hpp(8),
                 from ./include/caffe/layers/average_layer.hpp(6),
                 from src/caffe/layers/average_layer.cpp(5):
/usr/local/include/boost/type_traits/is_complete.hpp(62): error: namespace "boost::type_traits" has no member "yes_type"
           static type_traits::yes_type check(U*);
                               ^

In file included from /usr/local/include/boost/type_traits/is_convertible.hpp(17),
                 from /usr/local/include/boost/math/tools/promotion.hpp(29),
                 from /usr/local/include/boost/math/special_functions/detail/round_fwd.hpp(12),
                 from /usr/local/include/boost/math/special_functions/math_fwd.hpp(27),
                 from /usr/local/include/boost/math/special_functions/fpclassify.hpp(19),
                 from ./include/caffe/common.hpp(5),
                 from ./include/caffe/blob.hpp(8),
                 from ./include/caffe/layers/average_layer.hpp(6),
                 from src/caffe/layers/average_layer.cpp(5):
/usr/local/include/boost/type_traits/is_complete.hpp(65): error: namespace "boost::type_traits" has no member "no_type"
           static type_traits::no_type check(...);
                               ^

In file included from /usr/local/include/boost/type_traits/is_convertible.hpp(17),
                 from /usr/local/include/boost/math/tools/promotion.hpp(29),
                 from /usr/local/include/boost/math/special_functions/detail/round_fwd.hpp(12),
                 from /usr/local/include/boost/math/special_functions/math_fwd.hpp(27),
                 from /usr/local/include/boost/math/special_functions/fpclassify.hpp(19),
                 from ./include/caffe/common.hpp(5),
                 from ./include/caffe/blob.hpp(8),
                 from ./include/caffe/layers/average_layer.hpp(6),
                 from src/caffe/layers/average_layer.cpp(5):
/usr/local/include/boost/type_traits/is_complete.hpp(67): error: namespace "boost::type_traits" has no member "yes_type"
           static const bool value = sizeof(check<T>(0)) == sizeof(type_traits::yes_type)

info of compiling enviroment:

os: redhat 6.5

gcc: 4.4.7

intel-compiler: 

icc version 18.0.3 (gcc version 4.4.7 compatibility)

how can i solve this problem?

 
0 Kudos
1 Reply
Viet_H_Intel
Moderator
724 Views

 

Can you provide us a pre-process file to investigate?

Thanks,

Viet  

0 Kudos
Reply