[vlc-devel] [PATCH] demux: adaptative: fix compilation

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Jul 29 10:27:59 CEST 2015


On 29/07/2015 05:23, KO Myung-Hun wrote:
>
>
> Hugo Beauzée-Luyssen wrote:
>> On 27/07/2015 18:29, Filipe Cabecinhas wrote:
>>> Hi Hugo,
>>>
>>> I tried searching on the site, and repo, but couldn’t find anything.
>>> What’s the minimum C++ language standard VLC requires, if C++ is
>>> available (I see VLC requires C99 *on UNIX*, but haven’t even found
>>> that for other systems)?
>>>
>>> Just so I don’t complain about stuff like this again (if I remember
>>> about standard changes :-) ).
>>>
>>> Thank you,
>>>
>>>     Filipe
>>>
>>>> On Jul 27, 2015, at 01:54, Hugo Beauzée-Luyssen <hugo at beauzee.fr> wrote:
>>>>
>>>> On 27/07/2015 05:59, Filipe Cabecinhas wrote:
>>>>> How would that be a “fix compilation”?
>>>>> How is being less specific better?
>>>>>
>>>>>     Filipe
>>>>>
>>>>>> On Jul 26, 2015, at 20:55, KO Myung-Hun <komh78 at gmail.com> wrote:
>>>>>>
>>>>>> ---
>>>>>> modules/demux/adaptative/Streams.cpp | 2 +-
>>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/modules/demux/adaptative/Streams.cpp
>>>>>> b/modules/demux/adaptative/Streams.cpp
>>>>>> index 746c065..cad9d7f 100644
>>>>>> --- a/modules/demux/adaptative/Streams.cpp
>>>>>> +++ b/modules/demux/adaptative/Streams.cpp
>>>>>> @@ -34,7 +34,7 @@ using namespace adaptative::logic;
>>>>>> Stream::Stream(demux_t * demux_, const StreamFormat &format_)
>>>>>> {
>>>>>>       p_demux = demux_;
>>>>>> -    type = StreamType::UNKNOWN;
>>>>>> +    type = UNKNOWN;
>>>>>>       format = format_;
>>>>>>       output = NULL;
>>>>>>       adaptationLogic = NULL;
>>>>>> --
>>>>>> 1.9.5
>>>>>>
>>>>
>>>> Hi,
>>>>
>>>> Scoped enumerations aren't part of C++98, so creating an enum doesn't
>>>> create a "namespace". This patch makes perfect sense as far as I'm
>>>> concerned.
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Hugo Beauzée-Luyssen
>>
>> Hi,
>>
>> VLC requires C99 & C++98 on all platforms. It can (and will), however,
>> take advantage of some C11 & C++11 features, mostly atomic & thread
>> related.
>> Also, for the sake of it, scoped enum is a slightly different feature,
>> all enum names become valid "namespace" starting from C++11, so my
>> initial explanation was incorrect.
>
> However, this patch doesn't break C++11 compilation, does it ?
>
>

It doesn't. As long as you're using the "old" enum declaration, all the 
enum-keys are unscoped and therefore part of the namespace the enum is 
being declared in.

Regards,

-- 
Hugo Beauzée-Luyssen



More information about the vlc-devel mailing list