Skip to content

Boost 1.82 Compatibility #1467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
10.5.x.x (relative to 10.5.14.0)
========

Fixes
-----

- Boost : Fixed compatibility with Boost 1.82.

10.5.14.0 (relative to 10.5.13.1)
=========
Expand Down
2 changes: 1 addition & 1 deletion src/IECore/FileNameParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ bool FileNameParameter::valueValid( const Object *value, std::string *reason ) c
// extensions check
if( extensions().size() )
{
string ext = boost::filesystem::extension(boost::filesystem::path( s->readable()));
string ext = boost::filesystem::path( s->readable() ).extension().string();

const vector<string> &exts = extensions();
bool found = false;
Expand Down
4 changes: 2 additions & 2 deletions src/IECore/FileSequenceParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#include "boost/algorithm/string/classification.hpp"
#include "boost/algorithm/string/split.hpp"
#include "boost/filesystem/convenience.hpp"
#include "boost/filesystem/path.hpp"

#include <algorithm>
#include <cassert>
Expand Down Expand Up @@ -130,7 +130,7 @@ bool FileSequenceParameter::valueValid( const Object *value, std::string *reason

if ( m_extensions.size() )
{
std::string ext = boost::filesystem::extension( boost::filesystem::path( fileSequence->getFileName() ) );
std::string ext = boost::filesystem::path( fileSequence->getFileName() ).extension().string();
if ( ext.size() && ext[0] == '.' )
{
ext = ext.substr( 1, ext.size() - 1 );
Expand Down
8 changes: 4 additions & 4 deletions src/IECore/FileSequenceVectorParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#include "boost/algorithm/string/classification.hpp"
#include "boost/algorithm/string/split.hpp"
#include "boost/filesystem/convenience.hpp"
#include "boost/filesystem/path.hpp"

#include <algorithm>
#include <cassert>
Expand Down Expand Up @@ -131,7 +131,7 @@ bool FileSequenceVectorParameter::valueValid( const Object *value, std::string *

if ( m_extensions.size() )
{
std::string ext = boost::filesystem::extension( boost::filesystem::path( fileSequence->getFileName() ) );
std::string ext = boost::filesystem::path( fileSequence->getFileName() ).extension().string();
if ( ext.size() && ext[0] == '.' )
{
ext = ext.substr( 1, ext.size() - 1 );
Expand Down Expand Up @@ -257,7 +257,7 @@ FileSequencePtr FileSequenceVectorParameter::parseFileSequence( const std::strin
frameList = FrameList::parse( tail );
found = true;
}

catch ( Exception & )
{
fileSequenceCopy = fileSequenceCopy.substr( 0, spaceIndex )
Expand All @@ -267,7 +267,7 @@ FileSequencePtr FileSequenceVectorParameter::parseFileSequence( const std::strin

spaceIndex = fileSequenceCopy.find_first_of( " " );
}

}

return new FileSequence( filename, frameList );
Expand Down
6 changes: 2 additions & 4 deletions src/IECore/IndexedIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#include "IECore/Exception.h"

#include "boost/filesystem/convenience.hpp"
#include "boost/filesystem/path.hpp"
#include "boost/algorithm/string.hpp"

#include <iostream>
Expand Down Expand Up @@ -67,16 +67,14 @@ static CreatorMap &creators()

IE_CORE_DEFINERUNTIMETYPEDDESCRIPTION( IndexedIO )

namespace fs = boost::filesystem;

const IndexedIO::EntryID IndexedIO::rootName("/");
const IndexedIO::EntryIDList IndexedIO::rootPath;

IndexedIOPtr IndexedIO::create( const std::string &path, const IndexedIO::EntryIDList &root, IndexedIO::OpenMode mode, const CompoundData *options )
{
IndexedIOPtr result = nullptr;

std::string extension = fs::extension(path);
std::string extension = boost::filesystem::path( path ).extension().string();
boost::to_lower( extension );

const CreatorMap &createFns = creators();
Expand Down
4 changes: 2 additions & 2 deletions src/IECore/Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

#include "boost/algorithm/string/classification.hpp"
#include "boost/algorithm/string/split.hpp"
#include "boost/filesystem/convenience.hpp"
#include "boost/filesystem/path.hpp"

using namespace std;
using namespace IECore;
Expand Down Expand Up @@ -84,7 +84,7 @@ ReaderPtr Reader::create( const std::string &fileName )
bool knownExtension = false;
ExtensionsToFnsMap *m = extensionsToFns();
assert( m );
string ext = extension(boost::filesystem::path(fileName));
string ext = boost::filesystem::path( fileName ).extension().string();
if( ext!="" )
{
ExtensionsToFnsMap::const_iterator it = m->find( ext );
Expand Down
2 changes: 1 addition & 1 deletion src/IECore/SearchPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ std::string SearchPath::getPaths( const std::string &separator ) const
boost::filesystem::path SearchPath::find( const boost::filesystem::path &file ) const
{
// if it's a full path then there's no need to do any searching
if( file.is_complete() )
if( file.is_absolute() )
{
if( exists( file ) )
{
Expand Down
6 changes: 3 additions & 3 deletions src/IECore/Writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#include "boost/algorithm/string/classification.hpp"
#include "boost/algorithm/string/split.hpp"
#include "boost/filesystem/convenience.hpp"
#include "boost/filesystem/path.hpp"

#include <cassert>

Expand Down Expand Up @@ -116,7 +116,7 @@ void Writer::registerWriter( const std::string &extensions, CanWriteFn canWrite,

WriterPtr Writer::create( ObjectPtr object, const std::string &fileName )
{
string ext = extension(boost::filesystem::path(fileName));
string ext = boost::filesystem::path( fileName ).extension().string();

ExtensionsToFnsMap *m = extensionsToFns();
assert( m );
Expand Down Expand Up @@ -146,7 +146,7 @@ WriterPtr Writer::create( ObjectPtr object, const std::string &fileName )

WriterPtr Writer::create( const std::string &fileName )
{
string ext = extension(boost::filesystem::path(fileName));
string ext = boost::filesystem::path( fileName ).extension().string();

ExtensionsToFnsMap *m = extensionsToFns();
ExtensionsToFnsMap::const_iterator it = m->find( ext );
Expand Down
4 changes: 2 additions & 2 deletions src/IECoreScene/SceneInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include "IECoreScene/SceneInterface.h"

#include "boost/filesystem/convenience.hpp"
#include "boost/filesystem/path.hpp"
#include "boost/tokenizer.hpp"
#include "boost/algorithm/string.hpp"

Expand Down Expand Up @@ -104,7 +104,7 @@ SceneInterfacePtr SceneInterface::create( const std::string &path, IndexedIO::Op
{
SceneInterfacePtr result = nullptr;

std::string extension = boost::filesystem::extension(path);
std::string extension = boost::filesystem::path( path ).extension().string();
boost::algorithm::to_lower( extension );
IndexedIO::OpenModeFlags openMode = IndexedIO::OpenModeFlags( mode & (IndexedIO::Read|IndexedIO::Write|IndexedIO::Append) );
std::pair< std::string, IndexedIO::OpenModeFlags > key( extension, openMode );
Expand Down