<p>Oh I see what you mean, you have syntax like:</p>

<pre><code>#define g(a) ...
void f( g(h) a ){}
</code></pre>

<p>But without C pre-processing the second line is illegal C/C++ syntax so the parser is confused and generates the wrong symbol.</p>

<p>To quote the Geany maintainer "Its very unlikely that pre-processing will be done" so its probably going to remain a limitation.</p>

<p>But a better way to do this (in C++) is to use an alias:</p>

<pre><code>template <typename T> using shared_ptr = std::shared_ptr<T>;
void func( shared_ptr<T1> t1 ) {}
</code></pre>

<p>That is subject to bug <a href="https://github.com/geany/geany/issues/975" class="issue-link js-issue-link" data-url="https://github.com/geany/geany/issues/975" data-id="143236190" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#975</a> but at least it doesn't confuse the parser and isn't an evil macro.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1172#issuecomment-238786475">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJyBtMlrSsTadP9lH5NmxjqmUFJdPks5qeXyHgaJpZM4JgGms">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ7sYE6llOgJGFCHiY7cJkKCsK3I3ks5qeXyHgaJpZM4JgGms.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1172#issuecomment-238786475"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@elextr in #1172: Oh I see what you mean, you have syntax like:\r\n\r\n```\r\n#define g(a) ...\r\nvoid f( g(h) a ){}\r\n```\r\n\r\nBut without C pre-processing the second line is illegal C/C++ syntax so the parser is confused and generates the wrong symbol.\r\n\r\nTo quote the Geany maintainer \"Its very unlikely that pre-processing will be done\" so its probably going to remain a limitation.\r\n\r\nBut a better way to do this (in C++) is to use an alias:\r\n\r\n```\r\ntemplate \u003ctypename T\u003e using shared_ptr = std::shared_ptr\u003cT\u003e;\r\nvoid func( shared_ptr\u003cT1\u003e t1 ) {}\r\n```\r\n\r\nThat is subject to bug #975 but at least it doesn't confuse the parser and isn't an evil macro.\r\n"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1172#issuecomment-238786475"}}}</script>