# \`has\_only\_int\_args\`

**URL:** <https://discourse.mc-stan.org/t/has-only-int-args/1985>\
**Category:** Developers\
**Created:** [September 22, 2017, 8:28pm UTC](https://discourse.mc-stan.org/t/has-only-int-args/1985 "2017-09-22T20:28:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sakrejda](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/sakrejda/32/845_2.png) [@sakrejda](https://discourse.mc-stan.org/u/sakrejda)\
**Post date:** [September 22, 2017, 8:28pm UTC](https://discourse.mc-stan.org/t/has-only-int-args/1985/1 "2017-09-22T20:28:49Z")

</div>

In the code to generate standalone functions there’s this:

```
   if (rcpp_export && has_only_int_args(fun)
        && !fun.body_.is_no_op_statement())
          out << "// [[Rcpp::export]]" << EOL;

```

So it looks like it will only generate Rcpp::export on functions that have `int` arguments since  
`has_only_int_args` returns fault if any argument is not of the `INT_T` type. So 1) I don’t understand  
why Rcpp::export is not supposed to appear on doubles functions; and 2) actually a doubles  
function I tried to generate _does_ get an Rcpp::export comment prepended to it so I don’t understand  
that either. Does anyone know the logic here?

---

<div class="post-metadata">

**Author:** ![sakrejda](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/sakrejda/32/845_2.png) [@sakrejda](https://discourse.mc-stan.org/u/sakrejda)\
**Post date:** [September 22, 2017, 11:34pm UTC](https://discourse.mc-stan.org/t/has-only-int-args/1985/2 "2017-09-22T23:34:05Z")

</div>

Never mind, found it.
