title: To not pass an argument due to a condition
body: <p>I have this function declaration:</p>
  
  <pre><code>void do_somthing(int a,int b,foo bar = foo());
  </code></pre>
  
  <p>I want to call it for some arguments as follow:</p>
  
  <pre><code>foo bar = get_bar_by_some_algorithm();
  int a = 5,b = 6;
  if(bar.empty()){
      do_somthing(a,b);
  }
  else{
      do_somthing(a,b,bar);
  }
  </code></pre>
  
  <p>I want to get rid of the <code>if</code> statement. So, I did it like this:</p>
  
  <pre><code>foo bar = get_bar_by_some_algorithm();
  int a = 5,b = 6;
  do_somthing(a,b,bar.empty()?foo():bar);
  </code></pre>
  
  <p>However, my approach is acceptable (is it good even?) if <code>do_somthing</code> is stable from default argument point of view but if it changed to something like this:</p>
  
  <pre><code>void do_somthing(int a,int b,foo bar = get_special_foo());
  </code></pre>
  
  <p>My code will be outdated because <code>foo()</code> is not equal too <code>get_special_foo()</code>.</p>
  
  <p>The question is How can I use <code>?</code> operator or any short equivalent to pass an argument in case of non-empty and <strong>NOT Passing</strong> anything in case of empty?</p>
  
  <p>Example for clarification (Imaginary syntax):</p>
  
  <pre><code>do_somthing(a,b,bar.empty()? the_default_argument : bar);
  </code></pre>