alashworth / test-issue-import

0 stars 0 forks source link

remove namespace scoped using statements in generated code for model #92

Open alashworth opened 5 years ago

alashworth commented 5 years ago

Issue by bob-carpenter Sunday Mar 27, 2016 at 03:38 GMT Originally opened as https://github.com/stan-dev/stan/issues/1820


Summary:

See title.

Description:

We don't need those top-level using statements; we can move them to where they're needed.

Reproducible Steps:

Just look at the C++ generated for any Stan program.

Current Output:

Generates these using statements:

namespace unit_model_namespace {

using std::istream;
using std::string;
using std::stringstream;
using std::vector;
using stan::io::dump;
using stan::math::lgamma;
using stan::model::prob_grad;
using namespace stan::math;

Expected Output:

Nothing at this scope; everything pushed down to where needed or explicitly qualified in its output.

Current Version:

v2.9.0