diff --git a/include/RMF/Vector.h b/include/RMF/Vector.h index 73b0846e..0298eacb 100644 --- a/include/RMF/Vector.h +++ b/include/RMF/Vector.h @@ -61,13 +61,13 @@ class Vector RMF_CXX11_DEFAULT_COPY_CONSTRUCTOR(Vector); Vector(float x, float y, float z) { - BOOST_STATIC_ASSERT(D == 3); + static_assert(D == 3); P::operator[](0) = x; P::operator[](1) = y; P::operator[](2) = z; } Vector(float x, float y, float z, float q) { - BOOST_STATIC_ASSERT(D == 4); + static_assert(D == 4); P::operator[](0) = x; P::operator[](1) = y; P::operator[](2) = z; diff --git a/include/RMF/internal/swig_helpers.h b/include/RMF/internal/swig_helpers.h index 385d23f1..c5ada462 100644 --- a/include/RMF/internal/swig_helpers.h +++ b/include/RMF/internal/swig_helpers.h @@ -118,7 +118,7 @@ struct ValueOrObject { template struct ConvertAllBase { - BOOST_STATIC_ASSERT(!is_pointer::value); + static_assert(!is_pointer::value); template static bool get_is_cpp_object(PyObject* o, SwigData st) { void* vp; @@ -129,7 +129,7 @@ struct ConvertAllBase { template struct ConvertValueBase : public ConvertAllBase { - BOOST_STATIC_ASSERT(!is_pointer::value); + static_assert(!is_pointer::value); template static const T& get_cpp_object(PyObject* o, SwigData st) { void* vp; @@ -175,7 +175,7 @@ struct Convert : public ConvertValueBase { template struct ConvertSequenceHelper { typedef typename ValueOrObject::type V; - BOOST_STATIC_ASSERT(!is_pointer::value); + static_assert(!is_pointer::value); template static bool get_is_cpp_object(PyObject* in, SwigData st) { if (!in || !PySequence_Check(in)) { diff --git a/src/avrocpp/api/AvroParse.hh b/src/avrocpp/api/AvroParse.hh index b44817d6..4547b87d 100644 --- a/src/avrocpp/api/AvroParse.hh +++ b/src/avrocpp/api/AvroParse.hh @@ -48,12 +48,12 @@ void parse(ResolvingReader &p, T &val) { template void parse(Reader &p, T &val, const boost::false_type &) { - BOOST_STATIC_ASSERT(sizeof(T) == 0); + static_assert(sizeof(T) == 0); } template void translatingParse(Reader &p, T &val, const boost::false_type &) { - BOOST_STATIC_ASSERT(sizeof(T) == 0); + static_assert(sizeof(T) == 0); } // @{ diff --git a/src/avrocpp/api/AvroSerialize.hh b/src/avrocpp/api/AvroSerialize.hh index 106c587d..a0f61c96 100644 --- a/src/avrocpp/api/AvroSerialize.hh +++ b/src/avrocpp/api/AvroSerialize.hh @@ -43,7 +43,7 @@ void serialize(Writer &s, const T &val) { template void serialize(Writer &s, const T &val, const boost::false_type &) { - BOOST_STATIC_ASSERT(sizeof(T) == 0); + static_assert(sizeof(T) == 0); } /// The remainder of the file includes default implementations for serializable diff --git a/src/avrocpp/api/buffer/BufferReader.hh b/src/avrocpp/api/buffer/BufferReader.hh index 94cbc9fa..a90839c7 100644 --- a/src/avrocpp/api/buffer/BufferReader.hh +++ b/src/avrocpp/api/buffer/BufferReader.hh @@ -235,7 +235,7 @@ class AVRO_DECL BufferReader : private boost::noncopyable { /// An uninstantiable function, this is if boost::is_fundamental check fails template bool read(T &val, const boost::false_type &) { - BOOST_STATIC_ASSERT(sizeof(T) == 0); + static_assert(sizeof(T) == 0); return false; } diff --git a/src/avrocpp/api/buffer/detail/BufferDetail.hh b/src/avrocpp/api/buffer/detail/BufferDetail.hh index e79542b6..934e07a7 100644 --- a/src/avrocpp/api/buffer/detail/BufferDetail.hh +++ b/src/avrocpp/api/buffer/detail/BufferDetail.hh @@ -325,7 +325,7 @@ class BufferImpl : boost::noncopyable { /// and will compile-time assert. template void writeTo(T val, const boost::false_type &) { - BOOST_STATIC_ASSERT(sizeof(T) == 0); + static_assert(sizeof(T) == 0); } /// Write a block of data to the buffer, adding new chunks if necessary. diff --git a/src/avrocpp/impl/Resolver.cc b/src/avrocpp/impl/Resolver.cc index 8f445f18..b12b5476 100644 --- a/src/avrocpp/impl/Resolver.cc +++ b/src/avrocpp/impl/Resolver.cc @@ -562,8 +562,8 @@ class ResolverFactory : private boost::noncopyable { &ResolverFactory::constructCompound, &ResolverFactory::constructCompound}; - BOOST_STATIC_ASSERT((sizeof(funcs) / sizeof(BuilderFunc)) == - (AVRO_NUM_TYPES)); + static_assert((sizeof(funcs) / sizeof(BuilderFunc)) == + (AVRO_NUM_TYPES)); BuilderFunc func = funcs[currentWriter->type()]; assert(func); @@ -594,8 +594,8 @@ class ResolverFactory : private boost::noncopyable { &ResolverFactory::constructCompoundSkipper, &ResolverFactory::constructCompoundSkipper}; - BOOST_STATIC_ASSERT((sizeof(funcs) / sizeof(BuilderFunc)) == - (AVRO_NUM_TYPES)); + static_assert((sizeof(funcs) / sizeof(BuilderFunc)) == + (AVRO_NUM_TYPES)); BuilderFunc func = funcs[currentWriter->type()]; assert(func); diff --git a/src/avrocpp/impl/Types.cc b/src/avrocpp/impl/Types.cc index a8cd5bf9..10da785d 100644 --- a/src/avrocpp/impl/Types.cc +++ b/src/avrocpp/impl/Types.cc @@ -28,8 +28,8 @@ const std::string typeToString[] = { "string", "bytes", "int", "long", "float", "double", "boolean", "null", "record", "enum", "array", "map", "union", "fixed", "symbolic"}; -BOOST_STATIC_ASSERT((sizeof(typeToString) / sizeof(std::string)) == - (AVRO_NUM_TYPES + 1)); +static_assert((sizeof(typeToString) / sizeof(std::string)) == + (AVRO_NUM_TYPES + 1)); } // namespace strings @@ -37,7 +37,7 @@ BOOST_STATIC_ASSERT((sizeof(typeToString) / sizeof(std::string)) == // each type, // and it would be a problem for this flag if we ever supported more than 32 // types -BOOST_STATIC_ASSERT(AVRO_NUM_TYPES < 32); +static_assert(AVRO_NUM_TYPES < 32); const std::string &toString(Type type) { static std::string undefinedType = "Undefined type"; diff --git a/src/avrocpp/impl/Validator.cc b/src/avrocpp/impl/Validator.cc index cc07ca27..d1b3dc58 100644 --- a/src/avrocpp/impl/Validator.cc +++ b/src/avrocpp/impl/Validator.cc @@ -141,8 +141,8 @@ void Validator::doAdvance() { &Validator::enumAdvance, &Validator::countingAdvance, &Validator::countingAdvance, &Validator::unionAdvance, &Validator::fixedAdvance}; - BOOST_STATIC_ASSERT((sizeof(funcs) / sizeof(AdvanceFunc)) == - (AVRO_NUM_TYPES)); + static_assert((sizeof(funcs) / sizeof(AdvanceFunc)) == + (AVRO_NUM_TYPES)); expectedTypesFlag_ = 0; // loop until we encounter a next expected type, or we've exited all compound @@ -199,7 +199,7 @@ void Validator::setupFlag(Type type) { typeToFlag(AVRO_ENUM), typeToFlag(AVRO_ARRAY), typeToFlag(AVRO_MAP), typeToFlag(AVRO_UNION), typeToFlag(AVRO_FIXED)}; - BOOST_STATIC_ASSERT((sizeof(flags) / sizeof(flag_t)) == (AVRO_NUM_TYPES)); + static_assert((sizeof(flags) / sizeof(flag_t)) == (AVRO_NUM_TYPES)); expectedTypesFlag_ = flags[type]; }