From f204210aee0748f5183c6f0c853be89266f4a651 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sun, 10 Nov 2013 01:46:28 -0500 Subject: fix for c++11 --- training/latent_svm/latent_svm.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'training/latent_svm') diff --git a/training/latent_svm/latent_svm.cc b/training/latent_svm/latent_svm.cc index ab9c1d5d..60e52550 100644 --- a/training/latent_svm/latent_svm.cc +++ b/training/latent_svm/latent_svm.cc @@ -32,7 +32,6 @@ total_loss and prev_loss actually refer not to loss, but the metric (usually BLE #include "sampler.h" using namespace std; -using boost::shared_ptr; namespace po = boost::program_options; bool invert_score; @@ -128,7 +127,7 @@ struct HypothesisInfo { }; struct GoodOracle { - shared_ptr good; + boost::shared_ptr good; }; struct TrainingObserver : public DecoderObserver { @@ -143,9 +142,9 @@ struct TrainingObserver : public DecoderObserver { const DocScorer& ds; const vector& feature_weights; vector& oracles; - shared_ptr cur_best; - shared_ptr cur_costaug_best; - shared_ptr cur_ref; + boost::shared_ptr cur_best; + boost::shared_ptr cur_costaug_best; + boost::shared_ptr cur_ref; const int kbest_size; const double mt_metric_scale; const double mu; @@ -168,8 +167,8 @@ struct TrainingObserver : public DecoderObserver { UpdateOracles(smeta.GetSentenceID(), *hg); } - shared_ptr MakeHypothesisInfo(const SparseVector& feats, const double metric) { - shared_ptr h(new HypothesisInfo); + boost::shared_ptr MakeHypothesisInfo(const SparseVector& feats, const double metric) { + boost::shared_ptr h(new HypothesisInfo); h->features = feats; h->mt_metric_score = metric; return h; -- cgit v1.2.3