[Ardour-Dev] Feedback on string-convert branch

Tim Mayberry mojofunk at gmail.com
Mon Jan 9 15:29:44 PST 2017


On Thu, Jan 5, 2017 at 6:13 AM, John Emmas <johne53 at tiscali.co.uk> wrote:

> Hi Tim, MSVC is throwing up a minor problem...
>
>
Hi John,

Sorry, for some reason your emails went into my spam folder.


> I switched to your new branch and added the 2 new source files to libpbd
> (i.e. to my MSVC project).
>

Thanks for trying to build the branch, it is useful to know if there are
issues with other compilers.


>
> libpbd itself built okay - but when I try to build anything further up the
> chain (e.g. libardour) 'string_convert.h' gives me this error at lines 77,
> 152 and 239:-
>
>     error C2039: 'TO_STRING_TEMPLATE_NOT_DEFINED_FOR_THIS_TYPE' : is not
> a member of global namespace'
>
> (and likewise for line 336).  If I comment out those lines temporarily,
> everything then builds okay.  I haven't yet tried a Debug build (so I don't
> yet know if the DEBUG_SCONVERT stuff works) but in the meantime, I thought
> I'd flag this up to you.
>
>
As is indicated in the comment, those lines of code exists to give a
useful/obvious error message for types that don't have a template
specialization defined. It should only be a compile time error if that
template is instantiated.

It should be able to be safely ifdef'd without any issues as long as it
works as intended on the other compilers, but can you try changing those
lines to:

typename T::TO_STRING_TEMPLATE_NOT_DEFINED_FOR_THIS_TYPE invalid_type;

What compiler/version are you using?

Tim.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ardour.org/pipermail/ardour-dev-ardour.org/attachments/20170110/78b7e261/attachment.htm>


More information about the Ardour-Dev mailing list