It's probably this commit:
commit 07dcbc91f762c082238f0173df52e8f330ddab2b
Author: Larry Gritz <[email protected]>
Date: Mon Oct 29 15:54:36 2018 -0700
Remove ustring::operator int() (#2047)
As pointed out by Thiago Ize and John Haddon (but unfortunately not
heard by me until literally years later), this is error prone because
there are times when a ustring is converted to an int/bool in unexpected
situations. It even led to verifiable errors in OSL that I only
discovered after commenting out this operator to see what would happen.
Neither std::string nor std::string_view have this operator, bolstering
Thiago & John's arguments.
So we are removing it from OIIO 2.0. Hopefully this won't break too many
people's apps that happen to make use of ustring. The fix is simple,
just
change:
if (myustring)
to
if (! myustring.empty())
On Mon, Dec 10, 2018 at 8:09 AM Richard Shaw <[email protected]> wrote:
> I'm working on updating OIIO to 2.0.0 in Fedora Rawhide and it looks like
> Blender is affected by the API change:
>
> [ 7%] Building CXX object
> intern/cycles/graph/CMakeFiles/cycles_graph.dir/node_xml.cpp.o
> cd /builddir/build/BUILD/blender-2.79b/cmake-make/intern/cycles/graph &&
> /usr/bin/c++ -DBOOST_ALL_NO_LIB -DCCL_NAMESPACE_BEGIN="namespace ccl {"
> -DCCL_NAMESPACE_END=} -DCYCLES_GFLAGS_NAMESPACE=gflags
> -DCYCLES_STD_UNORDERED_MAP -DGOOGLE_GLOG_DLL_DECL="" -DNDEBUG
> -DWITH_BLENDER_GUARDEDALLOC -DWITH_CYCLES_LOGGING -DWITH_KERNEL_AVX
> -DWITH_KERNEL_AVX2 -DWITH_KERNEL_SSE2 -DWITH_KERNEL_SSE3
> -DWITH_KERNEL_SSE41 -DWITH_SYSTEM_PUGIXML -D_FILE_OFFSET_BITS=64
> -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__
> -D__SSE2__ -D__SSE__
> -I/builddir/build/BUILD/blender-2.79b/intern/cycles/../atomic
> -I/builddir/build/BUILD/blender-2.79b/intern/cycles/graph/.. -isystem
> /builddir/build/BUILD/blender-2.79b/extern/glog/src -isystem
> /builddir/build/BUILD/blender-2.79b/extern/gflags/src -isystem
> /usr/include/OpenImageIO -isystem /usr/include/OpenEXR -Wredundant-decls
> -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self
> -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type
> -Werror=implicit-function-declaration -Wno-char-subscripts
> -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings
> -Wundef -Wformat-signedness -Wuninitialized -Wundef -Wmissing-declarations
> -Wimplicit-fallthrough=5 -O2 -g -pipe -Wall -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
> -fstack-protector-strong -grecord-gcc-switches
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
> -fuse-ld=gold -fopenmp -std=c++11 -msse -pipe -fPIC -funsigned-char
> -fno-strict-aliasing -msse2 -ffast-math -fno-finite-math-only
> -Werror=float-conversion -Werror=double-promotion -Wno-error=unused-macros
> -DNDEBUG -o CMakeFiles/cycles_graph.dir/node_xml.cpp.o -c
> /builddir/build/BUILD/blender-2.79b/intern/cycles/graph/node_xml.cpp
> BUILDSTDERR:
> /builddir/build/BUILD/blender-2.79b/intern/cycles/graph/node_xml.cpp: In
> function 'void ccl::xml_read_node(ccl::XMLReader&, ccl::Node*,
> pugi::xml_node)':
> BUILDSTDERR:
> /builddir/build/BUILD/blender-2.79b/intern/cycles/graph/node_xml.cpp:253:11:
> error: could not convert 'node->ccl::Node::name' from
> 'OpenImageIO_v2_0::ustring' to 'bool'
> BUILDSTDERR: if(node->name)
> BUILDSTDERR: ~~~~~~^~~~
>
> Any hints appreciated. I can make the full log available if needed.
>
> Thanks,
> Richard
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org