title: rvalue or lvalue (const) reference parameter
body: <p>I want to pass a parameter(s) (of some concrete type, say <code>int</code>) to the member function by r- or l- value (const) reference. My solution is:</p>
  
  <pre><code>#include &lt;type_traits&gt;
  #include &lt;utility&gt;
  
  struct F
  {
      using desired_parameter_type = int;
  
      template&lt; typename X, typename = typename std::enable_if&lt; std::is_same&lt; typename std::decay&lt; X &gt;::type, desired_parameter_type &gt;::value &gt;::type &gt;
      void operator () (X &amp;&amp; x) const
      {
          // or even static_assert(std::is_same&lt; typename std::decay&lt; X &gt;::type, desired_parameter_type &gt;::value, "");
          std::forward&lt; X &gt;(x); // something useful
      }
  };
  </code></pre>
  
  <p>Another exaple is here <a href="http://pastebin.com/9kgHmsVC" rel="noreferrer">http://pastebin.com/9kgHmsVC</a>.</p>
  
  <p>But it is too verbose. How to do it in a simpler way?</p>
  
  <p>Maybe I should use the superposition of <code>std::remove_reference</code> and <code>std::remove_const</code> instead of <code>std::decay</code>, but there is just a simplification here.</p>