From f5cb1bc791728f9de1e2c8df66e88d4a3e665aa8 Mon Sep 17 00:00:00 2001 From: graehl Date: Mon, 16 Aug 2010 19:11:03 +0000 Subject: fixed git-svn-id: https://ws10smt.googlecode.com/svn/trunk@563 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/cfg.cc | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'decoder/cfg.cc') diff --git a/decoder/cfg.cc b/decoder/cfg.cc index b0d4eab6..4d5bf801 100755 --- a/decoder/cfg.cc +++ b/decoder/cfg.cc @@ -213,6 +213,23 @@ WordID BinName(RHS const& b,CFG::NTs const& N,CFG::NTs const& M) return TD::Convert(BinStr(b,N,M)); } +template +struct null_for; + +typedef CFG::BinRhs BinRhs; + +template <> +struct null_for { + static BinRhs null; +}; +BinRhs null_for::null(std::numeric_limits::min(),std::numeric_limits::min()); + +template <> +struct null_for { + static RHS null; +}; +RHS null_for::null(1,std::numeric_limits::min()); + template struct add_virtual_rules { typedef CFG::RuleHandle RuleHandle; @@ -343,24 +360,6 @@ struct add_virtual_rules { } }; - -template -struct null_for; - -typedef CFG::BinRhs BinRhs; - -template <> -struct null_for { - static BinRhs null; -}; -BinRhs null_for::null(std::numeric_limits::min(),std::numeric_limits::min()); - -template <> -struct null_for { - static RHS null; -}; -RHS null_for::null(1,std::numeric_limits::min()); - }//ns void CFG::BinarizeSplit(CFGBinarize const& b) { -- cgit v1.2.3