In file included from test.cpp:1: /usr/include/boost/iostreams/device/file_descriptor.hpp:276:12: error: functional-style cast from 'int const' to 'detail::path' is not allowed { open(detail::path(path), mode); } ^~~~~~~~~~~~~ In file included from test.cpp:2: /usr/include/boost/iostreams/stream.hpp:128:5: note: in instantiation of function template specialization 'boost::iostreams::file_descriptor_sink::file_descriptor_sink' requested here BOOST_IOSTREAMS_FORWARD( stream, open_impl, Device, ^ In file included from test.cpp:2: In file included from /usr/include/boost/iostreams/stream.hpp:18: /usr/include/boost/iostreams/detail/forward.hpp:56:5: note: instantiated from: BOOST_PP_REPEAT_FROM_TO( \ ^ In file included from test.cpp:2: In file included from /usr/include/boost/iostreams/stream.hpp:18: In file included from /usr/include/boost/iostreams/detail/forward.hpp:24: /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp:34:34: note: instantiated from: # define BOOST_PP_REPEAT_FROM_TO BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) ^ In file included from test.cpp:1: In file included from /usr/include/boost/iostreams/device/file_descriptor.hpp:26: In file included from /usr/include/boost/iostreams/detail/path.hpp:31: In file included from /usr/include/boost/type_traits/is_same.hpp:31: In file included from /usr/include/boost/type_traits/detail/bool_trait_def.hpp:14: In file included from /usr/include/boost/type_traits/detail/template_arity_spec.hpp:10: In file included from /usr/include/boost/mpl/int.hpp:20: In file included from /usr/include/boost/mpl/aux_/integral_wrapper.hpp:22: /usr/include/boost/preprocessor/cat.hpp:22:32: note: instantiated from: # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b) ^ note: (skipping 14 contexts in backtrace; use -fmacro-backtrace-limit=0 to see all) In file included from test.cpp:2: In file included from /usr/include/boost/iostreams/stream.hpp:18: In file included from /usr/include/boost/iostreams/detail/forward.hpp:22: In file included from /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp:19: /usr/include/boost/preprocessor/tuple/elem.hpp:20:53: note: instantiated from: # define BOOST_PP_TUPLE_ELEM(size, index, tuple) BOOST_PP_TUPLE_ELEM_I(size, index, tuple) ^ :110:1: note: instantiated from: BOOST_PP_TUPLE_ELEM_3_2 ^ In file included from test.cpp:2: /usr/include/boost/iostreams/stream.hpp:128:5: note: instantiated from: BOOST_IOSTREAMS_FORWARD( stream, open_impl, Device, ^ In file included from test.cpp:2: In file included from /usr/include/boost/iostreams/stream.hpp:18: /usr/include/boost/iostreams/detail/forward.hpp:56:5: note: instantiated from: BOOST_PP_REPEAT_FROM_TO( \ ^ In file included from test.cpp:2: In file included from /usr/include/boost/iostreams/stream.hpp:18: In file included from /usr/include/boost/iostreams/detail/forward.hpp:24: /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp:34:34: note: instantiated from: # define BOOST_PP_REPEAT_FROM_TO BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) ^ In file included from test.cpp:1: In file included from /usr/include/boost/iostreams/device/file_descriptor.hpp:26: In file included from /usr/include/boost/iostreams/detail/path.hpp:31: In file included from /usr/include/boost/type_traits/is_same.hpp:31: In file included from /usr/include/boost/type_traits/detail/bool_trait_def.hpp:14: In file included from /usr/include/boost/type_traits/detail/template_arity_spec.hpp:10: In file included from /usr/include/boost/mpl/int.hpp:20: In file included from /usr/include/boost/mpl/aux_/integral_wrapper.hpp:22: /usr/include/boost/preprocessor/cat.hpp:22:32: note: instantiated from: # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b) ^ note: (skipping 14 contexts in backtrace; use -fmacro-backtrace-limit=0 to see all) In file included from test.cpp:2: In file included from /usr/include/boost/iostreams/stream.hpp:18: In file included from /usr/include/boost/iostreams/detail/forward.hpp:22: In file included from /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp:19: /usr/include/boost/preprocessor/tuple/elem.hpp:20:53: note: instantiated from: # define BOOST_PP_TUPLE_ELEM(size, index, tuple) BOOST_PP_TUPLE_ELEM_I(size, index, tuple) ^ In file included from test.cpp:2: /usr/include/boost/iostreams/stream.hpp:128:5: note: instantiated from: BOOST_IOSTREAMS_FORWARD( stream, open_impl, Device, ^ In file included from test.cpp:2: In file included from /usr/include/boost/iostreams/stream.hpp:18: /usr/include/boost/iostreams/detail/forward.hpp:56:5: note: instantiated from: BOOST_PP_REPEAT_FROM_TO( \ ^ In file included from test.cpp:2: In file included from /usr/include/boost/iostreams/stream.hpp:18: In file included from /usr/include/boost/iostreams/detail/forward.hpp:24: /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp:34:34: note: instantiated from: # define BOOST_PP_REPEAT_FROM_TO BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) ^ In file included from test.cpp:1: In file included from /usr/include/boost/iostreams/device/file_descriptor.hpp:26: In file included from /usr/include/boost/iostreams/detail/path.hpp:31: In file included from /usr/include/boost/type_traits/is_same.hpp:31: In file included from /usr/include/boost/type_traits/detail/bool_trait_def.hpp:14: In file included from /usr/include/boost/type_traits/detail/template_arity_spec.hpp:10: In file included from /usr/include/boost/mpl/int.hpp:20: In file included from /usr/include/boost/mpl/aux_/integral_wrapper.hpp:22: /usr/include/boost/preprocessor/cat.hpp:22:32: note: instantiated from: # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b) ^ note: (skipping 14 contexts in backtrace; use -fmacro-backtrace-limit=0 to see all) In file included from test.cpp:2: /usr/include/boost/iostreams/stream.hpp:128:5: note: instantiated from: BOOST_IOSTREAMS_FORWARD( stream, open_impl, Device, ^ In file included from test.cpp:2: In file included from /usr/include/boost/iostreams/stream.hpp:18: /usr/include/boost/iostreams/detail/forward.hpp:56:5: note: instantiated from: BOOST_PP_REPEAT_FROM_TO( \ ^ In file included from test.cpp:2: In file included from /usr/include/boost/iostreams/stream.hpp:18: In file included from /usr/include/boost/iostreams/detail/forward.hpp:24: /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp:34:34: note: instantiated from: # define BOOST_PP_REPEAT_FROM_TO BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) ^ In file included from test.cpp:1: In file included from /usr/include/boost/iostreams/device/file_descriptor.hpp:26: In file included from /usr/include/boost/iostreams/detail/path.hpp:31: In file included from /usr/include/boost/type_traits/is_same.hpp:31: In file included from /usr/include/boost/type_traits/detail/bool_trait_def.hpp:14: In file included from /usr/include/boost/type_traits/detail/template_arity_spec.hpp:10: In file included from /usr/include/boost/mpl/int.hpp:20: In file included from /usr/include/boost/mpl/aux_/integral_wrapper.hpp:22: /usr/include/boost/preprocessor/cat.hpp:22:32: note: instantiated from: # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b) ^ note: (skipping 14 contexts in backtrace; use -fmacro-backtrace-limit=0 to see all) test.cpp:9:23: note: in instantiation of function template specialization 'boost::iostreams::stream, std::allocator >::stream' requested here fdstream(int fd): stream(fd) {} ^ 1 error generated.