Dade wrote:LuxCore film file (and, in general, LuxCore serialization process) is now portable across multiple platforms. This is an important step for some future feature (like resume rendering, etc.).
I struggle atm. with compile when using clang ( more strict ):
- Code: Select all
[ 20%] Building CXX object src/slg/CMakeFiles/smallluxgpu.dir/renderstate.cpp.o
/media/Workdata3/Development/Lux_dev/luxrays/src/slg/renderstate.cpp:81:13: error: invalid operands to binary expression
('eos::polymorphic_portable_oarchive' (aka 'polymorphic_oarchive_route<eos::portable_oarchive>') and 'slg::RenderState *')
outArchive << this;
~~~~~~~~~~ ^ ~~~~
/media/Workdata3/Development/Lux_dev/linux_deps/include/boost/archive/detail/polymorphic_oarchive_route.hpp:170:28: note:
candidate function [with T = slg::RenderState *] not viable: no known conversion from 'slg::RenderState *' to
'slg::RenderState *&' for 1st argument
polymorphic_oarchive & operator<<(T & t){
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/basic_string.h:2753:5: note: candidate template ignored: could
not match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/shared_ptr.h:66:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_Ch, _Tr>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ostream:471:5: note: candidate template ignored: could not match
'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ostream:476:5: note: candidate template ignored: could not match
'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ostream:482:5: note: candidate template ignored: could not match
'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<char, _Traits>& __out, char __c)
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ostream:488:5: note: candidate template ignored: could not match
'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ostream:493:5: note: candidate template ignored: could not match
'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ostream:513:5: note: candidate template ignored: could not match
'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ostream:530:5: note: candidate template ignored: could not match
'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ostream:543:5: note: candidate template ignored: could not match
'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ostream:548:5: note: candidate template ignored: could not match
'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ostream:602:5: note: candidate template ignored: could not match
'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/ostream.tcc:321:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.h:1277:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:156:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:477:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:632:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:702:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:831:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:1029:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:1088:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:1150:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:1232:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:1347:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:1552:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:1819:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:1883:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:2050:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:2115:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:2188:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:2275:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:2352:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:2427:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:2596:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:2674:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:2750:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:2886:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:3096:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/random.tcc:3312:5: note: candidate template ignored: could not
match 'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/complex:524:5: note: candidate template ignored: could not match
'basic_ostream' against 'polymorphic_oarchive_route'
operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
^
In file included from /media/Workdata3/Development/Lux_dev/luxrays/src/slg/renderstate.cpp:23:
In file included from /media/Workdata3/Development/Lux_dev/luxrays/include/slg/renderstate.h:28:
/media/Workdata3/Development/Lux_dev/luxrays/deps/eos_portable_archive-v5.1/eos/portable_oarchive.hpp:322:15: warning: shift count
>= width of type [-Wshift-count-overflow]
do { temp >>= CHAR_BIT; ++size; }
^ ~~~~~~~~
/media/Workdata3/Development/Lux_dev/linux_deps/include/boost/archive/impl/basic_binary_oprimitive.ipp:50:19: note: in
instantiation of function template specialization 'eos::portable_oarchive::save<unsigned char>' requested here
this->This()->save(static_cast<unsigned char>(sizeof(int)));
^
In file included from /media/Workdata3/Development/Lux_dev/luxrays/src/slg/renderstate.cpp:23:
In file included from /media/Workdata3/Development/Lux_dev/luxrays/include/slg/renderstate.h:28:
/media/Workdata3/Development/Lux_dev/luxrays/deps/eos_portable_archive-v5.1/eos/portable_oarchive.hpp:322:15: warning: shift count
>= width of type [-Wshift-count-overflow]
do { temp >>= CHAR_BIT; ++size; }
^ ~~~~~~~~
/media/Workdata3/Development/Lux_dev/linux_deps/include/boost/archive/detail/polymorphic_oarchive_route.hpp:79:32: note: in
instantiation of function template specialization 'eos::portable_oarchive::save<char>' requested here
ArchiveImplementation::save(t);
^
/media/Workdata3/Development/Lux_dev/linux_deps/include/boost/archive/detail/polymorphic_oarchive_route.hpp:186:5: note: in
instantiation of member function 'boost::archive::detail::polymorphic_oarchive_route<eos::portable_oarchive>::save'
requested here
polymorphic_oarchive_route(
^
/media/Workdata3/Development/Lux_dev/luxrays/src/slg/renderstate.cpp:78:37: note: in instantiation of function template
specialization 'boost::archive::detail::polymorphic_oarchive_route<eos::portable_oarchive>::polymorphic_oarchive_route<char,
std::char_traits<char> >' requested here
eos::polymorphic_portable_oarchive outArchive(outStream);
^
In file included from /media/Workdata3/Development/Lux_dev/luxrays/src/slg/renderstate.cpp:23:
In file included from /media/Workdata3/Development/Lux_dev/luxrays/include/slg/renderstate.h:28:
/media/Workdata3/Development/Lux_dev/luxrays/deps/eos_portable_archive-v5.1/eos/portable_oarchive.hpp:322:15: warning: shift count
>= width of type [-Wshift-count-overflow]
do { temp >>= CHAR_BIT; ++size; }
^ ~~~~~~~~
/media/Workdata3/Development/Lux_dev/linux_deps/include/boost/archive/detail/polymorphic_oarchive_route.hpp:82:32: note: in
instantiation of function template specialization 'eos::portable_oarchive::save<signed char>' requested here
ArchiveImplementation::save(t);
^
/media/Workdata3/Development/Lux_dev/linux_deps/include/boost/archive/detail/polymorphic_oarchive_route.hpp:186:5: note: in
instantiation of member function 'boost::archive::detail::polymorphic_oarchive_route<eos::portable_oarchive>::save'
requested here
polymorphic_oarchive_route(
^
/media/Workdata3/Development/Lux_dev/luxrays/src/slg/renderstate.cpp:78:37: note: in instantiation of function template
specialization 'boost::archive::detail::polymorphic_oarchive_route<eos::portable_oarchive>::polymorphic_oarchive_route<char,
std::char_traits<char> >' requested here
eos::polymorphic_portable_oarchive outArchive(outStream);
^
3 warnings and 1 error generated.
Just FYI, still looking myelf also ..
EDIT: found: "this seems is actually a bug. In gcc a pointer is output – in clang so for some reason there's an operator<< overload that outputs a string stream as a pointer."
Here is a little test for compiler behavoiur:
- Code: Select all
#include <string>
#include <iostream>
#include <sstream>
#include <boost/format.hpp>
int main() {
std::stringstream ss;
ss.str("example");
std::cout << (boost::format("hello %1% world\n") % ss);
std::cout << (boost::format("hello %1% world\n") % ss.str());
return 0;
}
Result from my env always:
- Code: Select all
jensverwiebe@jensverwiebe-MS-7885 /media/Workdata3/Development/test $ ./a.out
hello 0x7ffc96a0a9d8 world
hello example world
Getting this from gcc 4.8, clang 3.7 and clang 3.9 though ( use same toolchain atm. )
Jens