Skip to content
Open
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
6 changes: 2 additions & 4 deletions contrib/IECoreUSD/src/IECoreUSD/SceneCacheData.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ IECORE_PUSH_DEFAULT_VISIBILITY
#include "pxr/usd/sdf/path.h"
IECORE_POP_DEFAULT_VISIBILITY

#include "boost/shared_ptr.hpp"

#include <vector>

// plugins to USD are required to use the internal pxr namespace
Expand Down Expand Up @@ -93,7 +91,7 @@ class SceneCacheData : public SdfAbstractData
std::vector<TfToken> List(const SdfPath& path) const override;

std::set<double> ListAllTimeSamples() const override;

std::set<double> ListTimeSamplesForPath(const SdfPath& path) const override;

bool GetBracketingTimeSamples(double time, double* tLower, double* tUpper) const override;
Expand Down Expand Up @@ -158,7 +156,7 @@ class SceneCacheData : public SdfAbstractData
typedef std::pair<TfToken, VtValue> FieldValuePair;
struct SpecData {
SpecData() : specType(SdfSpecTypeUnknown) {}

SdfSpecType specType;
std::vector<FieldValuePair> fields;
};
Expand Down
2 changes: 0 additions & 2 deletions include/IECore/BoxTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ IECORE_POP_DEFAULT_VISIBILITY

#include "Imath/ImathBoxAlgo.h"

#include "boost/static_assert.hpp"

#include <cassert>

namespace IECore
Expand Down
9 changes: 3 additions & 6 deletions include/IECore/ByteOrder.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#ifndef IE_CORE_BYTEORDER_H
#define IE_CORE_BYTEORDER_H

#include "boost/static_assert.hpp"

#include <stdint.h>

namespace IECore
Expand Down Expand Up @@ -74,8 +72,7 @@ inline bool bigEndian()
template<typename T>
inline T reverseBytes( const T &x )
{
// needs specialising for each type
BOOST_STATIC_ASSERT(sizeof(T)==0);
static_assert( sizeof( T ) == 0, "reverseBytes requires specialisation" );
}

template<>
Expand Down Expand Up @@ -125,7 +122,7 @@ inline uint32_t reverseBytes<uint32_t>( const uint32_t &x )
template<>
inline float reverseBytes<float>( const float &x )
{
BOOST_STATIC_ASSERT( sizeof(uint32_t) == sizeof(float) );
static_assert( sizeof( uint32_t ) == sizeof( float) );
union {
uint32_t i;
float f;
Expand All @@ -151,7 +148,7 @@ inline uint64_t reverseBytes<uint64_t>( const uint64_t &x )
template<>
inline double reverseBytes<double>( const double &x )
{
BOOST_STATIC_ASSERT( sizeof(uint64_t) == sizeof(double) );
static_assert( sizeof( uint64_t ) == sizeof( double ) );
union {
uint64_t i;
double d;
Expand Down
6 changes: 4 additions & 2 deletions include/IECore/CachedReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include "IECore/ObjectPool.h"
#include "IECore/SearchPath.h"

#include "boost/shared_ptr.hpp"
#include <memory>

namespace IECore
{
Expand Down Expand Up @@ -81,6 +81,8 @@ class IECORE_API CachedReader : public RefCounted
/// objects following loading. Will use the given ObjectPool to store the loaded objects.
CachedReader( const SearchPath &paths, ConstModifyOpPtr postProcessor, ObjectPoolPtr objectPool = ObjectPool::defaultObjectPool() );

~CachedReader() override;

/// Searches for the given file and loads it if found.
/// Throws an exception in case it cannot be found or no suitable Reader
/// exists. The Object is returned with only const access as
Expand Down Expand Up @@ -122,7 +124,7 @@ class IECORE_API CachedReader : public RefCounted
private :

struct MemberData;
boost::shared_ptr<MemberData> m_data;
std::unique_ptr<MemberData> m_data;

};

Expand Down
3 changes: 1 addition & 2 deletions include/IECore/CompoundDataConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

#include "IECore/DataConversion.h"

#include "boost/static_assert.hpp"
#include "boost/type_traits.hpp"

namespace IECore
Expand All @@ -50,7 +49,7 @@ class CompoundDataConversion : public DataConversion< typename C1::FromType, typ
{
public:
/// These two types must be the same, so that the function composition works
BOOST_STATIC_ASSERT( (boost::is_same< typename C1::ToType, typename C2::FromType >::value) );
static_assert( std::is_same_v<typename C1::ToType, typename C2::FromType> );

/// Inverse defined by the equality: (f o g)'(x) = ( g' o f' )(x)
typedef CompoundDataConversion< typename C2::InverseType, typename C1::InverseType > InverseType;
Expand Down
5 changes: 2 additions & 3 deletions include/IECore/DataConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#ifndef IE_CORE_DATACONVERSION_H
#define IE_CORE_DATACONVERSION_H

#include "boost/static_assert.hpp"
#include "boost/type_traits/integral_constant.hpp"

namespace IECore
Expand All @@ -61,13 +60,13 @@ struct DataConversion

T operator()( F f ) const
{
BOOST_STATIC_ASSERT( sizeof(T) == 0 );
static_assert( sizeof( T ) == 0 );
}

InverseType inverse() const
{
/// Function is not invertible
BOOST_STATIC_ASSERT( sizeof(T) == 0 );
static_assert( sizeof( T ) == 0 );
}

};
Expand Down
4 changes: 1 addition & 3 deletions include/IECore/DataPromoteOp.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
#include "IECore/ObjectParameter.h"
#include "IECore/Op.h"

#include "boost/static_assert.hpp"

namespace IECore
{

Expand Down Expand Up @@ -73,7 +71,7 @@ class IECORE_API DataPromoteOp : public Op
template<typename T, typename E=void >
struct Promote2Fn
{
BOOST_STATIC_ASSERT( sizeof(T) == 0 );
static_assert( sizeof( T ) == 0 );
};

ObjectParameterPtr m_objectParameter;
Expand Down
4 changes: 2 additions & 2 deletions include/IECore/DespatchTypedData.inl
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ struct TypedDataSize
{
ReturnType operator()( const T *data ) const
{
BOOST_STATIC_ASSERT( sizeof(T) == 0 );
static_assert( sizeof( T ) == 0 );
return 0;
}
};
Expand Down Expand Up @@ -485,7 +485,7 @@ struct TypedDataAddress
{
ReturnType operator()( const T *data ) const
{
BOOST_STATIC_ASSERT( sizeof(T) == 0 );
static_assert( sizeof( T ) == 0 );
return nullptr;
}
};
Expand Down
2 changes: 1 addition & 1 deletion include/IECore/DimensionTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace IECore
template< int N, typename T = void >
struct DimensionTraits
{
BOOST_STATIC_ASSERT( sizeof( T ) == 0 );
static_assert( sizeof( T ) == 0 );

typedef void VectorType;
typedef void BoxType;
Expand Down
8 changes: 3 additions & 5 deletions include/IECore/DimensionTraits.inl
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,14 @@ IECORE_PUSH_DEFAULT_VISIBILITY
#include "Imath/ImathVec.h"
IECORE_POP_DEFAULT_VISIBILITY

#include "boost/static_assert.hpp"

namespace IECore
{

/// 1-D partial specialization
template<typename T>
struct DimensionTraits<1, T>
{
BOOST_STATIC_ASSERT( boost::is_arithmetic<T>::value );
static_assert( boost::is_arithmetic<T>::value );
typedef T ValueType;
typedef T VectorType;
typedef void BoxType;
Expand All @@ -66,7 +64,7 @@ struct DimensionTraits<1, T>
template<typename T>
struct DimensionTraits<2, T>
{
BOOST_STATIC_ASSERT( boost::is_arithmetic<T>::value );
static_assert( boost::is_arithmetic<T>::value );
typedef T ValueType;
typedef Imath::Vec2<T> VectorType;
typedef Imath::Box< VectorType > BoxType;
Expand All @@ -78,7 +76,7 @@ struct DimensionTraits<2, T>
template<typename T>
struct DimensionTraits<3, T>
{
BOOST_STATIC_ASSERT( boost::is_arithmetic<T>::value );
static_assert( boost::is_arithmetic<T>::value );
typedef T ValueType;
typedef Imath::Vec3<T> VectorType;
typedef Imath::Box< VectorType > BoxType;
Expand Down
6 changes: 2 additions & 4 deletions include/IECore/EuclideanToSphericalTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
#include "IECore/SpaceTransform.h"
#include "IECore/TypeTraits.h"

#include "boost/static_assert.hpp"

namespace IECore
{

Expand All @@ -54,8 +52,8 @@ template<typename F, typename T>
class EuclideanToSphericalTransform : public SpaceTransform< F, T >
{
public:
BOOST_STATIC_ASSERT( ( TypeTraits::IsVec3<F>::value ) );
BOOST_STATIC_ASSERT( ( boost::mpl::or_< TypeTraits::IsVec3<T>, TypeTraits::IsVec2<T> >::value == true ) );
static_assert( ( TypeTraits::IsVec3<F>::value ) );
static_assert( ( boost::mpl::or_< TypeTraits::IsVec3<T>, TypeTraits::IsVec2<T> >::value == true ) );

typedef EuclideanToSphericalTransform< T, F > InverseType;

Expand Down
13 changes: 6 additions & 7 deletions include/IECore/HexConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#ifndef IE_CORE_HEXCONVERSION_H
#define IE_CORE_HEXCONVERSION_H

#include "boost/static_assert.hpp"
#include "boost/type_traits/is_integral.hpp"
#include "boost/type_traits/is_same.hpp"

Expand All @@ -52,9 +51,9 @@ namespace IECore
template<typename T, typename OutputIterator>
inline void decToHex( T value, OutputIterator result )
{
BOOST_STATIC_ASSERT( boost::is_integral<T>::value );
static_assert( boost::is_integral<T>::value );
typedef typename std::iterator_traits<OutputIterator>::value_type CharType;
BOOST_STATIC_ASSERT( ( boost::is_same<CharType, char>::value ) );
static_assert( ( boost::is_same<CharType, char>::value ) );

for( int i = sizeof( T ) * 2 - 1; i >= 0 ; --i )
{
Expand Down Expand Up @@ -86,7 +85,7 @@ inline std::string decToHex( RandomAccessIterator first, RandomAccessIterator la
template<typename T>
inline std::string decToHex( T n )
{
BOOST_STATIC_ASSERT( boost::is_integral<T>::value );
static_assert( boost::is_integral<T>::value );

std::string r; r.resize( sizeof( T ) * 2 );
decToHex( n, r.begin() );
Expand All @@ -97,9 +96,9 @@ inline std::string decToHex( T n )
template<typename T, typename InputIterator>
inline T hexToDec( InputIterator first, InputIterator last )
{
BOOST_STATIC_ASSERT( boost::is_integral<T>::value );
static_assert( boost::is_integral<T>::value );
typedef typename std::iterator_traits<InputIterator>::value_type CharType;
BOOST_STATIC_ASSERT( ( boost::is_same<CharType, char>::value ) );
static_assert( ( boost::is_same<CharType, char>::value ) );

T n = 0;

Expand Down Expand Up @@ -182,7 +181,7 @@ template<typename T, typename InputIterator, typename OutputIterator>
inline void hexToDec( InputIterator first, InputIterator last, OutputIterator result )
{
typedef typename std::iterator_traits<InputIterator>::value_type CharType;
BOOST_STATIC_ASSERT( ( boost::is_same<CharType, char>::value ) );
static_assert( ( boost::is_same<CharType, char>::value ) );

for( ; first != last; first += sizeof( T ) * 2 )
{
Expand Down
2 changes: 0 additions & 2 deletions include/IECore/IndexedIO.inl
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@

#include "OpenEXR/ImfXdr.h"

#include "boost/static_assert.hpp"

#include <stdint.h>
#include <string.h>

Expand Down
6 changes: 2 additions & 4 deletions include/IECore/LevenbergMarquardt.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
#include "IECore/TypeTraits.h"
#include "IECore/VectorTypedData.h"

#include "boost/static_assert.hpp"

namespace IECore
{

Expand All @@ -54,7 +52,7 @@ struct DefaultLevenbergMarquardtTraits;
/// template<typename T>
/// class DefaultErrorFn
/// {
/// BOOST_STATIC_ASSERT( boost::is_floating_point<T>::value );
/// static_assert( boost::is_floating_point<T>::value );
///
/// public :
///
Expand Down Expand Up @@ -87,7 +85,7 @@ struct DefaultLevenbergMarquardtTraits;
template<typename T, typename ErrorFn, template<typename> class Traits = DefaultLevenbergMarquardtTraits >
class LevenbergMarquardt : public boost::noncopyable
{
BOOST_STATIC_ASSERT( boost::is_floating_point<T>::value );
static_assert( boost::is_floating_point<T>::value );

public:

Expand Down
4 changes: 1 addition & 3 deletions include/IECore/MeanSquaredError.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#ifndef IE_CORE_MEANSQUAREDERROR_H
#define IE_CORE_MEANSQUAREDERROR_H

#include "boost/static_assert.hpp"

namespace IECore
{

Expand All @@ -47,7 +45,7 @@ struct MeanSquaredError
{
ReturnType operator()( const T &a, const T &b ) const
{
BOOST_STATIC_ASSERT( sizeof(T) == 0 );
static_assert( sizeof(T) == 0 );
return ReturnType(0);
}
};
Expand Down
4 changes: 2 additions & 2 deletions include/IECore/ObjectPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "IECore/MurmurHash.h"
#include "IECore/Object.h"

#include "boost/shared_ptr.hpp"
#include <memory>

namespace IECore
{
Expand Down Expand Up @@ -113,7 +113,7 @@ class IECORE_API ObjectPool : public RefCounted
private:

struct MemberData;
boost::shared_ptr<MemberData> m_data;
std::unique_ptr<MemberData> m_data;
};

} // namespace IECore
Expand Down
8 changes: 3 additions & 5 deletions include/IECore/RadixSort.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
#include "IECore/Export.h"
#include "IECore/VectorTypedData.h"

#include "boost/static_assert.hpp"

#include <vector>

namespace IECore
Expand All @@ -53,9 +51,9 @@ class IECORE_API RadixSort
{
public:

BOOST_STATIC_ASSERT( sizeof( int ) == 4 );
BOOST_STATIC_ASSERT( sizeof( unsigned int ) == 4 );
BOOST_STATIC_ASSERT( sizeof( float ) == 4 );
static_assert( sizeof( int ) == 4 );
static_assert( sizeof( unsigned int ) == 4 );
static_assert( sizeof( float ) == 4 );

RadixSort();
virtual ~RadixSort();
Expand Down
Loading