Use of overloaded operator ambiguous
<p>The following code:</p>

<pre><code>typedef void HELPER;

const HELPER* helper = _helper;

inline ostream&amp; operator &lt;&lt;(ostream&amp; out,  const HELPER* arg) 
{ out &lt;&lt; (const char*)(arg); return out; }
</code></pre>

<p>Blows up if I attempt a </p>

<pre><code>cout &lt;&lt; helper;
</code></pre>

<p>Specifically, I get:</p>

<blockquote>
  <p>main.cpp:35:28: error: use of overloaded operator '&lt;&lt;' is ambiguous
  (with operand types 'basic_ostream >' and 'const HELPER *' (aka 'const void *'))</p>
</blockquote>

<p>and it lists a few candidates:</p>

<pre><code>/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:207:0: note: candidate function
    basic_ostream&amp; operator&lt;&lt;(const void* __p);
                   ^
main.cpp:25:17: note: candidate function
inline ostream&amp; operator &lt;&lt;(ostream&amp; out,  const HELPER* arg) 
                ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:195:20: note: candidate function
    basic_ostream&amp; operator&lt;&lt;(bool __n);
                   ^
</code></pre>

<p>I'm a little surprised that my typedef isn't invoking a stronger type matching here.  How can I get this operator overload running?</p>

<p>EDIT: Further clarification, the purpose of this code is that I am dual-targeting a set of Arduino libraries.  They manage their strings frequently with:</p>

<pre><code>typedef void __FlashStringHelper;

void showHelp(const __FlashStringHelper* helpText)
{
   Serial.print(helpText);
}
</code></pre>

<p>I like iostream and planned on this dual target, so I overloaded &lt;&lt; on Serial object and made the previous into (this is the oversimplified version, for example)</p>

<pre><code>#define cout Serial

void showHelp(const __FlashStringHelper* helpText)
{
   cout &lt;&lt; helpText;
}
</code></pre>

<p>Now I want to actually target real iostream for a different arch, but the old Arduino code can't vary (much) from its __FlashStringHelpers.  That's where I'm at</p>