Question: I have a C++ interface with two methods. Any class implementing this interface need to implement at least one of the two methods but may define both. It is however not necessary to define both. What is the best pattern to use in such situation ?

Answer: 
For completely silencing the output, here what works for me

```
```{r error=FALSE, warning=FALSE, message=FALSE}
invisible({capture.output({

# Your code here
2 * 2
# etc etc

})})
```

```

The 5 measures used above are

1. `error = FALSE`
2. `warning = FALSE`
3. `message = FALSE`
4. `invisible()`
5. `capture.output()`
To hide warnings, you can also do 
`{r, warning=FALSE}`