id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12129,C++11 / C++14 compability in boost/iostreams,Christian Meesters ,Jonathan Turkanis,"Hi, with this code {{{ #include #include #include #include #include int main() { using namespace std; ifstream file(""hello.z"", ios_base::in | ios_base::binary); boost::iostreams::filtering_stream in; in.push(boost::iostreams::zlib_decompressor()); in.push(file); boost::iostreams::copy(in, cout); } }}} The current trunk compiles. However, if the -std=c++11 or -std=c++14 flags are specified with gcc (tested versions 4.9.2 and 5.3.0) the following error is displayd: {{{ In file included from /usr/include/boost/iostreams/traits.hpp:31:0, from /usr/include/boost/iostreams/pipeline.hpp:18, from /usr/include/boost/iostreams/detail/push.hpp:22, from /usr/include/boost/iostreams/filtering_stream.hpp:19, from test.cpp:3: /usr/include/boost/iostreams/detail/wrap_unwrap.hpp: In instantiation of ‘T boost::iostreams::detail::wrap(const T&, typename boost::disable_if >::type*) [with T = boost::iostreams::basic_zlib_decompressor<>; typename boost::disable_if >::type = void]’: /usr/include/boost/iostreams/stream_buffer.hpp:93:5: required from ‘boost::iostreams::stream_buffer::stream_buffer(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input]’ /usr/include/boost/iostreams/chain.hpp:252:60: required from ‘void boost::iostreams::detail::chain_base::push_impl(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Self = boost::iostreams::chain, std::allocator >; Ch = char; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input]’ /usr/include/boost/iostreams/chain.hpp:212:5: required from ‘void boost::iostreams::detail::chain_base::push(const T&, int, int, typename boost::disable_if >::type*) [with T = boost::iostreams::basic_zlib_decompressor<>; Self = boost::iostreams::chain, std::allocator >; Ch = char; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input; typename boost::disable_if >::type = void]’ /usr/include/boost/iostreams/chain.hpp:491:7: required from ‘void boost::iostreams::detail::chain_client::push_impl(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Chain = boost::iostreams::chain, std::allocator >]’ /usr/include/boost/iostreams/chain.hpp:479:5: required from ‘void boost::iostreams::detail::chain_client::push(const T&, int, int, typename boost::disable_if >::type*) [with T = boost::iostreams::basic_zlib_decompressor<>; Chain = boost::iostreams::chain, std::allocator >; typename boost::disable_if >::type = void]’ test.cpp:13:50: required from here /usr/include/boost/iostreams/detail/wrap_unwrap.hpp:53:14: error: use of deleted function ‘boost::iostreams::basic_zlib_decompressor<>::basic_zlib_decompressor(const boost::iostreams::basic_zlib_decompressor<>&)’ { return t; } ^ In file included from test.cpp:5:0: /usr/include/boost/iostreams/filter/zlib.hpp:280:8: note: ‘boost::iostreams::basic_zlib_decompressor<>::basic_zlib_decompressor(const boost::iostreams::basic_zlib_decompressor<>&)’ is implicitly deleted because the default definition would be ill-formed: struct basic_zlib_decompressor ^ /usr/include/boost/iostreams/filter/zlib.hpp:280:8: error: use of deleted function ‘boost::iostreams::symmetric_filter >, std::allocator >::symmetric_filter(const boost::iostreams::symmetric_filter >, std::allocator >&)’ In file included from /usr/include/boost/iostreams/filter/zlib.hpp:31:0, from test.cpp:5: /usr/include/boost/iostreams/filter/symmetric.hpp:72:7: note: ‘boost::iostreams::symmetric_filter >, std::allocator >::symmetric_filter(const boost::iostreams::symmetric_filter >, std::allocator >&)’ is implicitly deleted because the default definition would be ill-formed: class symmetric_filter { ^ /usr/include/boost/iostreams/filter/symmetric.hpp:72:7: error: use of deleted function ‘boost::shared_ptr >, std::allocator >::impl>::shared_ptr(const boost::shared_ptr >, std::allocator >::impl>&)’ In file included from /usr/include/boost/shared_ptr.hpp:17:0, from /usr/include/boost/iostreams/chain.hpp:37, from /usr/include/boost/iostreams/filtering_streambuf.hpp:17, from /usr/include/boost/iostreams/filtering_stream.hpp:22, from test.cpp:3: /usr/include/boost/smart_ptr/shared_ptr.hpp:168:25: note: ‘boost::shared_ptr >, std::allocator >::impl>::shared_ptr(const boost::shared_ptr >, std::allocator >::impl>&)’ is implicitly declared as deleted because ‘boost::shared_ptr >, std::allocator >::impl>’ declares a move constructor or move assignment operator template class shared_ptr ^ In file included from /usr/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:23:0, from /usr/include/boost/iostreams/stream_buffer.hpp:22, from /usr/include/boost/iostreams/chain.hpp:35, from /usr/include/boost/iostreams/filtering_streambuf.hpp:17, from /usr/include/boost/iostreams/filtering_stream.hpp:22, from test.cpp:3: /usr/include/boost/iostreams/detail/adapter/concept_adapter.hpp: In instantiation of ‘boost::iostreams::detail::concept_adapter::concept_adapter(const T&) [with T = boost::iostreams::basic_zlib_decompressor<>]’: /usr/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:186:5: required from ‘void boost::iostreams::detail::indirect_streambuf::open(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input]’ /usr/include/boost/iostreams/stream_buffer.hpp:103:28: required from ‘void boost::iostreams::stream_buffer::open_impl(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input]’ /usr/include/boost/iostreams/stream_buffer.hpp:93:5: required from ‘boost::iostreams::stream_buffer::stream_buffer(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input]’ /usr/include/boost/iostreams/chain.hpp:252:60: required from ‘void boost::iostreams::detail::chain_base::push_impl(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Self = boost::iostreams::chain, std::allocator >; Ch = char; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input]’ /usr/include/boost/iostreams/chain.hpp:212:5: required from ‘void boost::iostreams::detail::chain_base::push(const T&, int, int, typename boost::disable_if >::type*) [with T = boost::iostreams::basic_zlib_decompressor<>; Self = boost::iostreams::chain, std::allocator >; Ch = char; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input; typename boost::disable_if >::type = void]’ /usr/include/boost/iostreams/chain.hpp:491:7: required from ‘void boost::iostreams::detail::chain_client::push_impl(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Chain = boost::iostreams::chain, std::allocator >]’ /usr/include/boost/iostreams/chain.hpp:479:5: required from ‘void boost::iostreams::detail::chain_client::push(const T&, int, int, typename boost::disable_if >::type*) [with T = boost::iostreams::basic_zlib_decompressor<>; Chain = boost::iostreams::chain, std::allocator >; typename boost::disable_if >::type = void]’ test.cpp:13:50: required from here /usr/include/boost/iostreams/detail/adapter/concept_adapter.hpp:64:48: error: use of deleted function ‘boost::iostreams::basic_zlib_decompressor<>::basic_zlib_decompressor(const boost::iostreams::basic_zlib_decompressor<>&)’ explicit concept_adapter(const T& t) : t_(t) ^ In file included from /usr/include/boost/iostreams/detail/streambuf/direct_streambuf.hpp:26:0, from /usr/include/boost/iostreams/stream_buffer.hpp:21, from /usr/include/boost/iostreams/chain.hpp:35, from /usr/include/boost/iostreams/filtering_streambuf.hpp:17, from /usr/include/boost/iostreams/filtering_stream.hpp:22, from test.cpp:3: /usr/include/boost/iostreams/detail/optional.hpp: In instantiation of ‘void boost::iostreams::detail::optional::reset(const T&) [with T = boost::iostreams::detail::concept_adapter >]’: /usr/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:186:5: required from ‘void boost::iostreams::detail::indirect_streambuf::open(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input]’ /usr/include/boost/iostreams/stream_buffer.hpp:103:28: required from ‘void boost::iostreams::stream_buffer::open_impl(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input]’ /usr/include/boost/iostreams/stream_buffer.hpp:93:5: required from ‘boost::iostreams::stream_buffer::stream_buffer(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input]’ /usr/include/boost/iostreams/chain.hpp:252:60: required from ‘void boost::iostreams::detail::chain_base::push_impl(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Self = boost::iostreams::chain, std::allocator >; Ch = char; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input]’ /usr/include/boost/iostreams/chain.hpp:212:5: required from ‘void boost::iostreams::detail::chain_base::push(const T&, int, int, typename boost::disable_if >::type*) [with T = boost::iostreams::basic_zlib_decompressor<>; Self = boost::iostreams::chain, std::allocator >; Ch = char; Tr = std::char_traits; Alloc = std::allocator; Mode = boost::iostreams::input; typename boost::disable_if >::type = void]’ /usr/include/boost/iostreams/chain.hpp:491:7: required from ‘void boost::iostreams::detail::chain_client::push_impl(const T&, int, int) [with T = boost::iostreams::basic_zlib_decompressor<>; Chain = boost::iostreams::chain, std::allocator >]’ /usr/include/boost/iostreams/chain.hpp:479:5: required from ‘void boost::iostreams::detail::chain_client::push(const T&, int, int, typename boost::disable_if >::type*) [with T = boost::iostreams::basic_zlib_decompressor<>; Chain = boost::iostreams::chain, std::allocator >; typename boost::disable_if >::type = void]’ test.cpp:13:50: required from here /usr/include/boost/iostreams/detail/optional.hpp:100:9: error: use of deleted function ‘boost::iostreams::detail::concept_adapter >::concept_adapter(const boost::iostreams::detail::concept_adapter >&)’ new (address()) T(t); ^ In file included from /usr/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:23:0, from /usr/include/boost/iostreams/stream_buffer.hpp:22, from /usr/include/boost/iostreams/chain.hpp:35, from /usr/include/boost/iostreams/filtering_streambuf.hpp:17, from /usr/include/boost/iostreams/filtering_stream.hpp:22, from test.cpp:3: /usr/include/boost/iostreams/detail/adapter/concept_adapter.hpp:35:7: note: ‘boost::iostreams::detail::concept_adapter >::concept_adapter(const boost::iostreams::detail::concept_adapter >&)’ is implicitly deleted because the default definition would be ill-formed: class concept_adapter { ^ /usr/include/boost/iostreams/detail/adapter/concept_adapter.hpp:35:7: error: use of deleted function ‘boost::iostreams::basic_zlib_decompressor<>::basic_zlib_decompressor(const boost::iostreams::basic_zlib_decompressor<>&)’ }}} Almost the same error shows up when the gzip_decompressor is used to replace the zlib_decompressor. This bug is also present in the 1.60.0 download. Thanks for looking into this, Christian",Bugs,new,To Be Determined,iostreams,Boost Development Trunk,Problem,,,