diff --git a/PolyARules.h b/PolyARules.h index eb57f2c..c93d21b 100644 --- a/PolyARules.h +++ b/PolyARules.h @@ -47,7 +47,7 @@ class PolyARules { case 1 : return 0; case 2 : iter = exceptionList.find(transcript_id); return (iter == exceptionList.end() ? polyALen : 0); - default : assert(false); + default : abort(); } } diff --git a/boost/math/special_functions/detail/lanczos_sse2.hpp b/boost/math/special_functions/detail/lanczos_sse2.hpp index f8846bf..cc01cef 100644 --- a/boost/math/special_functions/detail/lanczos_sse2.hpp +++ b/boost/math/special_functions/detail/lanczos_sse2.hpp @@ -51,11 +51,11 @@ inline double lanczos13m53::lanczos_sum(const double& x) static_cast(23531376880.41075968857200767445163675473L), static_cast(0u) }; - register __m128d vx = _mm_load1_pd(&x); - register __m128d sum_even = _mm_load_pd(coeff); - register __m128d sum_odd = _mm_load_pd(coeff+2); - register __m128d nc_odd, nc_even; - register __m128d vx2 = _mm_mul_pd(vx, vx); + __m128d vx = _mm_load1_pd(&x); + __m128d sum_even = _mm_load_pd(coeff); + __m128d sum_odd = _mm_load_pd(coeff+2); + __m128d nc_odd, nc_even; + __m128d vx2 = _mm_mul_pd(vx, vx); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 4); @@ -101,7 +101,7 @@ inline double lanczos13m53::lanczos_sum(const double& x) double ALIGN16 t[2]; _mm_store_pd(t, sum_even); - + return t[0] / t[1]; } @@ -136,11 +136,11 @@ inline double lanczos13m53::lanczos_sum_expG_scaled(const double& x) static_cast(56906521.91347156388090791033559122686859L), static_cast(0u) }; - register __m128d vx = _mm_load1_pd(&x); - register __m128d sum_even = _mm_load_pd(coeff); - register __m128d sum_odd = _mm_load_pd(coeff+2); - register __m128d nc_odd, nc_even; - register __m128d vx2 = _mm_mul_pd(vx, vx); + __m128d vx = _mm_load1_pd(&x); + __m128d sum_even = _mm_load_pd(coeff); + __m128d sum_odd = _mm_load_pd(coeff+2); + __m128d nc_odd, nc_even; + __m128d vx2 = _mm_mul_pd(vx, vx); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 4); @@ -186,7 +186,7 @@ inline double lanczos13m53::lanczos_sum_expG_scaled(const double& x) double ALIGN16 t[2]; _mm_store_pd(t, sum_even); - + return t[0] / t[1]; } @@ -197,8 +197,3 @@ inline double lanczos13m53::lanczos_sum_expG_scaled(const double& x) #undef ALIGN16 #endif // BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS - - - - - diff --git a/boost/random/uniform_on_sphere.hpp b/boost/random/uniform_on_sphere.hpp index 04071dc..d36df70 100644 --- a/boost/random/uniform_on_sphere.hpp +++ b/boost/random/uniform_on_sphere.hpp @@ -34,7 +34,7 @@ namespace random { * numbers uniformly distributed on the unit sphere of arbitrary * dimension @c dim. The @c Cont template parameter must be a STL-like * container type with begin and end operations returning non-const - * ForwardIterators of type @c Cont::iterator. + * ForwardIterators of type @c Cont::iterator. */ template > class uniform_on_sphere @@ -170,9 +170,9 @@ class uniform_on_sphere sqsum += val * val; } using std::sqrt; - // for all i: result[i] /= sqrt(sqsum) - std::transform(_container.begin(), _container.end(), _container.begin(), - std::bind2nd(std::divides(), sqrt(sqsum))); + for (auto& it : _container) { + *it /= sqrt(sqsum); + } return _container; } diff --git a/boost/smart_ptr/detail/shared_count.hpp b/boost/smart_ptr/detail/shared_count.hpp index 8e1dd48..9f19640 100644 --- a/boost/smart_ptr/detail/shared_count.hpp +++ b/boost/smart_ptr/detail/shared_count.hpp @@ -31,7 +31,7 @@ #include // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of doesn't try to -// pull in the TR1 headers: that's why we use this header +// pull in the TR1 headers: that's why we use this header // rather than including directly: #include // std::auto_ptr #include // std::less @@ -66,7 +66,7 @@ template< class D > struct sp_inplace_tag #if !defined( BOOST_NO_CXX11_SMART_PTR ) template< class T > class sp_reference_wrapper -{ +{ public: explicit sp_reference_wrapper( T & t): t_( boost::addressof( t ) ) @@ -320,7 +320,7 @@ class shared_count // auto_ptr is special cased to provide the strong guarantee template - explicit shared_count( std::auto_ptr & r ): pi_( new sp_counted_impl_p( r.get() ) ) + explicit shared_count( std::unique_ptr & r ): pi_( new sp_counted_impl_p( r.get() ) ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif @@ -337,7 +337,7 @@ class shared_count r.release(); } -#endif +#endif #if !defined( BOOST_NO_CXX11_SMART_PTR ) diff --git a/boost/smart_ptr/shared_ptr.hpp b/boost/smart_ptr/shared_ptr.hpp index 9259ca0..62b98c1 100644 --- a/boost/smart_ptr/shared_ptr.hpp +++ b/boost/smart_ptr/shared_ptr.hpp @@ -22,7 +22,7 @@ // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of doesn't try to -// pull in the TR1 headers: that's why we use this header +// pull in the TR1 headers: that's why we use this header // rather than including directly: #include // std::auto_ptr @@ -244,10 +244,10 @@ template< class T, class R > struct sp_enable_if_auto_ptr { }; -template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > +template< class T, class R > struct sp_enable_if_auto_ptr< std::unique_ptr< T >, R > { typedef R type; -}; +}; #endif @@ -443,7 +443,7 @@ template class shared_ptr #ifndef BOOST_NO_AUTO_PTR template - explicit shared_ptr( std::auto_ptr & r ): px(r.get()), pn() + explicit shared_ptr( std::unique_ptr & r ): px(r.get()), pn() { boost::detail::sp_assert_convertible< Y, T >(); @@ -456,7 +456,7 @@ template class shared_ptr #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template - shared_ptr( std::auto_ptr && r ): px(r.get()), pn() + shared_ptr( std::unique_ptr && r ): px(r.get()), pn() { boost::detail::sp_assert_convertible< Y, T >(); @@ -522,7 +522,7 @@ template class shared_ptr #ifndef BOOST_NO_AUTO_PTR template - shared_ptr & operator=( std::auto_ptr & r ) + shared_ptr & operator=( std::unique_ptr & r ) { this_type( r ).swap( *this ); return *this; @@ -531,9 +531,9 @@ template class shared_ptr #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template - shared_ptr & operator=( std::auto_ptr && r ) + shared_ptr & operator=( std::unique_ptr && r ) { - this_type( static_cast< std::auto_ptr && >( r ) ).swap( *this ); + this_type( static_cast< std::unique_ptr && >( r ) ).swap( *this ); return *this; } @@ -639,21 +639,21 @@ template class shared_ptr { this_type( r, p ).swap( *this ); } - + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) typename boost::detail::sp_dereference< T >::type operator* () const { BOOST_ASSERT( px != 0 ); return *px; } - + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) - typename boost::detail::sp_member_access< T >::type operator-> () const + typename boost::detail::sp_member_access< T >::type operator-> () const { BOOST_ASSERT( px != 0 ); return px; } - + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const {