5353#include " boost/iostreams/filtering_stream.hpp"
5454#include " boost/iostreams/filtering_streambuf.hpp"
5555#include " boost/iostreams/stream.hpp"
56- #include " boost/optional.hpp"
5756#include " boost/tokenizer.hpp"
5857
5958#include < algorithm>
6059#include < cassert>
6160#include < iostream>
6261#include < list>
6362#include < map>
63+ #include < optional>
6464#include < set>
6565
6666#include < fcntl.h>
@@ -415,11 +415,11 @@ size_t compress(
415415 int compressionLevel,
416416 const std::string &compressor,
417417 int threadCount,
418- boost ::optional<size_t > maxBlockSize = boost ::optional<size_t >(),
418+ std ::optional<size_t > maxBlockSize = std ::optional<size_t >(),
419419 size_t minCompressedBlockSize = 1024U
420420)
421421{
422- size_t maxCompressedBlockSize = maxBlockSize ? maxBlockSize. get () : BLOSC_MAX_BUFFERSIZE;
422+ const size_t maxCompressedBlockSize = maxBlockSize. value_or ( BLOSC_MAX_BUFFERSIZE ) ;
423423
424424 if ( size < minCompressedBlockSize )
425425 {
@@ -765,7 +765,7 @@ class DirectoryNode : public NodeBase
765765 typedef std::vector< NodeBase* > ChildMap;
766766
767767 // regular constructor
768- DirectoryNode (IndexedIO::EntryID name, boost ::optional<uint32_t > numChildren = boost ::optional<uint32_t >()) : NodeBase( NodeBase::Directory, name ),
768+ DirectoryNode (IndexedIO::EntryID name, std ::optional<uint32_t > numChildren = std ::optional<uint32_t >()) : NodeBase( NodeBase::Directory, name ),
769769 m_subindex ( NoSubIndex ),
770770 m_sortedChildren( false ),
771771 m_subindexChildren( false ),
@@ -774,7 +774,7 @@ class DirectoryNode : public NodeBase
774774 {
775775 if ( numChildren )
776776 {
777- m_children.reserve ( numChildren. get () );
777+ m_children.reserve ( * numChildren );
778778 }
779779
780780 }
@@ -1124,7 +1124,7 @@ class StreamIndexedIO::Index : public RefCounted
11241124 int m_compressionLevel;
11251125 int m_compressionThreadCount;
11261126 int m_decompressionThreadCount;
1127- boost ::optional<size_t > m_maxCompressedBlockSize;
1127+ std ::optional<size_t > m_maxCompressedBlockSize;
11281128 std::string m_compressor;
11291129
11301130 struct FreePage
0 commit comments