[Ardour-Dev] Feedback on string-convert branch

John Emmas johne53 at tiscali.co.uk
Tue Jan 10 07:50:58 PST 2017


On 09/01/2017 23:29, Tim Mayberry wrote:
>
> 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?
>

Sorry Tim, that didn't help.  I'm using VC8 although I've tried a few 
tests with VC15 and I see the same results.  However...

It turns out that I only see those compiler errors if any source file 
#includes 'pbd/string_convert.h' and also #includes anything which 
ultimately ends up #including 'ardour/rc_configuration_vars.h'.  
Strangely, it doesn't seem to matter which order they get #included.  I 
quickly realised that rc_configuration_vars.h doesn't have the normal 
header guards at the top - e.g.

       #ifndef __rc_configuration_vars_h__
       #define __rc_configuration_vars_h__

Assuming that must be the problem, I tried adding some - but it didn't 
help.  I then realised that the config variables tend to look like this:-

     /* disk operations */

     CONFIG_VARIABLE (uint32_t, minimum_disk_read_bytes, 
"minimum-disk-read-bytes", 
ARDOUR::Diskstream::default_disk_read_chunk_frames() * sizeof 
(ARDOUR::Sample))
     CONFIG_VARIABLE (uint32_t, minimum_disk_write_bytes, 
"minimum-disk-write-bytes", 
ARDOUR::Diskstream::default_disk_write_chunk_frames() * sizeof 
(ARDOUR::Sample))
     CONFIG_VARIABLE (float, midi_readahead,  "midi-readahead", 1.0)
     CONFIG_VARIABLE (BufferingPreset, buffering_preset, 
"buffering-preset", Medium)

     /* OSC */

     CONFIG_VARIABLE (uint32_t, osc_port, "osc-port", 3819)
     CONFIG_VARIABLE (bool, use_osc, "use-osc", false)

     /* editing related */

     CONFIG_VARIABLE (LayerModel, layer_model, "layer-model", Manual)

There's no problem if I comment out all the unusual looking ones 
(LayerModel / BufferingPreset etc) and just leave the more conventional 
ones (bool / float etc).  But once I put the other ones back again, I 
see this weird conflict between 'string_convert.h' and 
'rc_configuration_vars.h'.  I haven't got a clue what's going on. Can 
anyone suggest what might be wrong here??

John


More information about the Ardour-Dev mailing list