* names as a default. */
catch(std::bad_cast&){
charT a = '\0';
+#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr< const facet_def > f(create_facet_def(a));
+#else
+ std::unique_ptr< const facet_def > f(create_facet_def(a));
+#endif
num = date_time::find_match(f->get_short_month_names(),
f->get_long_month_names(),
(greg_month::max)(), s); // greg_month spans 1..12, so max returns the array size,
* names as a default. */
catch(std::bad_cast&){
charT a = '\0';
+#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr< const facet_def > f(create_facet_def(a));
+#else
+ std::unique_ptr< const facet_def > f(create_facet_def(a));
+#endif
num = date_time::find_match(f->get_short_weekday_names(),
f->get_long_weekday_names(),
(greg_weekday::max)() + 1, s); // greg_weekday spans 0..6, so increment is needed
extern "C" void * lw_thread_routine( void * pv )
{
+#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
+#else
+ std::unique_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
+#endif
pt->run();
unsigned __stdcall lw_thread_routine( void * pv )
{
+#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
+#else
+ std::unique_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
+#endif
pt->run();
template<class F> int lw_thread_create( pthread_t & pt, F f )
{
+#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<lw_abstract_thread> p( new lw_thread_impl<F>( f ) );
+#else
+ std::unique_ptr<lw_abstract_thread> p( new lw_thread_impl<F>( f ) );
+#endif
int r = pthread_create( &pt, 0, lw_thread_routine, p.get() );
// invalidation for add_edge() with EdgeList=vecS. Instead we
// hold a pointer to the property. std::auto_ptr is not
// a perfect fit for the job, but it is darn close.
+#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<Property> m_property;
+#else
+ std::unique_ptr<Property> m_property;
+#endif
};
#else
template <class Vertex, class Property>
pback_size != -1 ?
pback_size :
pimpl_->pback_size_;
+#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<streambuf_t>
buf(new streambuf_t(t, buffer_size, pback_size));
+#else
+ std::unique_ptr<streambuf_t>
+ buf(new streambuf_t(t, buffer_size, pback_size));
+#endif
list().push_back(buf.get());
buf.release();
if (is_device<component_type>::value) {
}
} while(sqsum == 0);
// for all i: result[i] /= sqrt(sqsum)
- std::transform(_container.begin(), _container.end(), _container.begin(),
- std::bind2nd(std::multiplies<RealType>(), 1/sqrt(sqsum)));
+ RealType inverse_distance = 1 / sqrt(sqsum);
+ for(typename Cont::iterator it = _container.begin();
+ it != _container.end();
+ ++it) {
+ *it *= inverse_distance;
+ }
}
}
return _container;
if (definitions[id]!=0)
return *definitions[id];
+#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<definition_t>
result(new definition_t(target_grammar->derived()));
+#else
+ std::unique_ptr<definition_t>
+ result(new definition_t(target_grammar->derived()));
+#endif
#ifdef BOOST_SPIRIT_THREADSAFE
boost::unique_lock<boost::mutex> lock(helpers.mutex());
tst_node*
clone() const
{
+#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<tst_node> copy(new tst_node(value));
+#else
+ std::unique_ptr<tst_node> copy(new tst_node(value));
+#endif
if (left)
copy->left = left->clone();
}
else
{
+#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<T> mid_data(new T(*middle.data));
+#else
+ std::unique_ptr<T> mid_data(new T(*middle.data));
+#endif
copy->middle.data = mid_data.release();
}
protected:
typedef detail::basic_charset<CharT> charset;
typedef detail::ptr_list<charset> charset_list;
+#if defined(BOOST_NO_CXX11_SMART_PTR)
typedef std::auto_ptr<charset> charset_ptr;
+#else
+ typedef std::unique_ptr<charset> charset_ptr;
+#endif
typedef detail::equivset equivset;
typedef detail::ptr_list<equivset> equivset_list;
+#if defined(BOOST_NO_CXX11_SMART_PTR)
typedef std::auto_ptr<equivset> equivset_ptr;
+#else
+ typedef std::unique_ptr<equivset> equivset_ptr;
+#endif
typedef typename charset::index_set index_set;
typedef std::vector<index_set> index_set_vector;
typedef detail::basic_parser<CharT> parser;
if (followpos_->empty ()) return npos;
std::size_t index_ = 0;
+#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<node_set> set_ptr_ (new node_set);
std::auto_ptr<node_vector> vector_ptr_ (new node_vector);
+#else
+ std::unique_ptr<node_set> set_ptr_ (new node_set);
+ std::unique_ptr<node_vector> vector_ptr_ (new node_vector);
+#endif
for (typename detail::node::node_vector::const_iterator iter_ =
followpos_->begin (), end_ = followpos_->end ();