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

boost 1.47 operations.hpp

Daniel_Davidson
Beginner
284 Views
On this simple source including operations.hpp, I am getting compile errors shown below.
NOTE: I usedDBOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR to
get around compile errors inboost/test/utils/callback.hpp without it.
Thanks,
Dan
icc --version
icc (ICC) 12.1.0 20110811
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.
[bash]#include 
#include 
#include 
#include 
int main(int argc, char** argv) {
  return 0;
}[/bash]
----------------- ERRORS ----------------------

$ "icpc" -c -xc++ -O0 -g -w1 -inline-level=0 -fPIC -std=c++0x -DBOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR -DBOOST_FILESYSTEM_VERSION=3 -DDEBUG -I"../.." -I"/install/boost_1_47_0/include" -c -o "../../../../build-dir/tests/play/intel-linux/debug/file_operations.o" "file_operations.cpp"
/usr/include/c++/4.5.4/ext/new_allocator.h(111): error: no instance of constructor "boost::filesystem3::directory_iterator::directory_iterator" matches the argument list
argument types are: (boost::filesystem3::detail::recur_dir_itr_imp::element_type)
{ ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
^
detected during:
instantiation of "void __gnu_cxx::new_allocator<_Tp>::construct(_Tp *, _Args &&...) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Args=<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>]" at line 96 of "/usr/include/c++/4.5.4/bits/vector.tcc"
instantiation of "void std::vector<_Tp, _Alloc>::emplace_back(_Args &&...) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Alloc=std::allocator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>, _Args=<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>]" at line 755 of "/usr/include/c++/4.5.4/bits/stl_vector.h"
instantiation of "void std::vector<_Tp, _Alloc>::push_back(_Tp &&) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Alloc=std::allocator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>]" at line 188 of "/usr/include/c++/4.5.4/bits/stl_stack.h"
instantiation of "void std::stack<_Tp, _Sequence>::push(_Sequence::value_type &&) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Sequence=std::vector<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>>]" at line 685 of "/install/boost_1_47_0/include/boost/filesystem/v3/operations.hpp"
/usr/include/c++/4.5.4/bits/vector.tcc(314): error: no instance of constructor "boost::filesystem3::directory_iterator::directory_iterator" matches the argument list
argument types are: (boost::filesystem3::detail::recur_dir_itr_imp::element_type)
*__position = _Tp(std::forward<_Args>(__args)...);
^
detected during:
instantiation of "void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<:_VECTOR_BASE><_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc>>, _Args &&...) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Alloc=std::allocator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>, _Args=<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>]" at line 100
instantiation of "void std::vector<_Tp, _Alloc>::emplace_back(_Args &&...) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Alloc=std::allocator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>, _Args=<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>]" at line 755 of "/usr/include/c++/4.5.4/bits/stl_vector.h"
instantiation of "void std::vector<_Tp, _Alloc>::push_back(_Tp &&) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Alloc=std::allocator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>]" at line 188 of "/usr/include/c++/4.5.4/bits/stl_stack.h"
instantiation of "void std::stack<_Tp, _Sequence>::push(_Sequence::value_type &&) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Sequence=std::vector<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>>]" at line 685 of "/install/boost_1_47_0/include/boost/filesystem/v3/operations.hpp"
/usr/include/c++/4.5.4/bits/stl_construct.h(80): error: no instance of constructor "boost::filesystem3::directory_iterator::directory_iterator" matches the argument list
argument types are: (boost::filesystem3::detail::recur_dir_itr_imp::element_type)
::new(static_cast(__p)) _T1(_GLIBCXX_FORWARD(_T2, __value));
^
detected during:
instantiation of "void std::_Construct(_T1 *, _T2 &&) [with _T1=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _T2=boost::filesystem3::detail::recur_dir_itr_imp::element_type]" at line 74 of "/usr/include/c++/4.5.4/bits/stl_uninitialized.h"
instantiation of "_ForwardIterator std::__uninitialized_copy<>::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with =false, _InputIterator=std::move_iterator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>, _ForwardIterator=boost::filesystem3::detail::recur_dir_itr_imp::element_type *]" at line 116 of "/usr/include/c++/4.5.4/bits/stl_uninitialized.h"
instantiation of "_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator=std::move_iterator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>, _ForwardIterator=boost::filesystem3::detail::recur_dir_itr_imp::element_type *]" at line 318 of "/usr/include/c++/4.5.4/bits/stl_uninitialized.h"
instantiation of "_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp> &) [with _InputIterator=std::move_iterator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>, _ForwardIterator=boost::filesystem3::detail::recur_dir_itr_imp::element_type *, _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type]" at line 328 of "/usr/include/c++/4.5.4/bits/stl_uninitialized.h"
instantiation of "_ForwardIterator std::__uninitialized_move_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator &) [with _InputIterator=boost::filesystem3::detail::recur_dir_itr_imp::element_type *, _ForwardIterator=boost::filesystem3::detail::recur_dir_itr_imp::element_type *, _Allocator=std::allocator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>]" at line 341 of "/usr/include/c++/4.5.4/bits/vector.tcc"
instantiation of "void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<:_VECTOR_BASE><_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc>>, _Args &&...) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Alloc=std::allocator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>, _Args=<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>]" at line 100 of "/usr/include/c++/4.5.4/bits/vector.tcc"
instantiation of "void std::vector<_Tp, _Alloc>::emplace_back(_Args &&...) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Alloc=std::allocator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>, _Args=<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>]" at line 755 of "/usr/include/c++/4.5.4/bits/stl_vector.h"
instantiation of "void std::vector<_Tp, _Alloc>::push_back(_Tp &&) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Alloc=std::allocator<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>]" at line 188 of "/usr/include/c++/4.5.4/bits/stl_stack.h"
instantiation of "void std::stack<_Tp, _Sequence>::push(_Sequence::value_type &&) [with _Tp=boost::filesystem3::detail::recur_dir_itr_imp::element_type, _Sequence=std::vector<:FILESYSTEM3::DETAIL::RECUR_DIR_ITR_IMP::ELEMENT_TYPE>>]" at line 685 of "/install/boost_1_47_0/include/boost/filesystem/v3/operations.hpp"
compilation aborted for file_operations.cpp (code 2)
0 Kudos
1 Reply
Judith_W_Intel
Employee
284 Views

Does the option -Qoption,cpp,--rvalue_ctor_is_not_copy_ctor (if your Gnu compatibility target is 4.5 or earlier) fix the problem.

If so I think this is the same as our cq #232045 which should be fixed in the next update.


Here is a description of that bug:


9/29/11
GNU C++ compatibility: Move constructors and copy constructors

In GNU C++ mode with gcc-version < 460, the front end now generates a
traditional copy constructor and copy assignment operator if one has not been
declared by the programmer even when there is a corresponding move constructor
or move assignment operator.
0 Kudos
Reply