[LLVMdev] C++ 11 explicit keyword error

Jean-Daniel Dupas mailing at xenonium.com
Tue Apr 8 07:27:02 PDT 2014


It probably didn't make it to the standard as I don't see it in the ISO edition (2011-09-01):

class-specifier:

class-head { member-specificationopt }

class-head:
class-key attribute-specifier-seqopt class-head-name class-virt-specifieropt base-clauseopt class-key attribute-specifier-seqopt base-clauseopt

class-head-name:
nested-name-specifieropt class-name

class-virt-specifier:

final

class-key:

              class
              struct
              union

Le 8 avr. 2014 à 13:37, Alessio Giovanni Baroni <alessiogiovanni.baroni at gmail.com> a écrit :

> C++ 11 last draft:
> 
> class-specifier:
> class-head { member-specificationopt }
> 
> class-head:
> class-key attribute-specifier-seqopt class-head-name class-virt-specifier-seqopt base-clauseopt class-key attribute-specifier-seqopt base-clauseopt
> 
> class-head-name:
> nested-name-specifieropt class-name
> 
> class-virt-specifier-seq: class-virt-specifier
> 
> class-virt-specifier-seq class-virt-specifier
> 
> class-virt-specifier:
> 
>               final
>               explicit
> 
> Alessio.
> 
> 
> Il giorno 08/apr/2014, alle ore 13:17, Jean-Daniel Dupas <mailing at xenonium.com> ha scritto:
> 
>> 
>> Le 8 avr. 2014 à 12:55, Alessio Giovanni Baroni <alessiogiovanni.baroni at gmail.com> a écrit :
>> 
>>> Hi,
>>> 
>>> I’m on Mac OS X 10.9.2 with all last updates; if I have this source:
>>> 
>>> class xxx explicit
>>> {
>>> };
>>> 
>>> int main (int argc, char **argv)
>>> {
>>> 
>>>     return 0;
>>> }
>>> 
>>> and I compile it with clang++ -std=c++11 -Wall -pedantic -c I obtain this error:
>>> 
>>> nn:1: error: expected unqualified-id
>>> {
>>> ^
>>> 1 error generated.
>>> 
>>> But the C++ 11 standard permits explicit on classes.
>> 
>> What standard version are you talking about ?
>> 
>> I don't see anything like that in the C++11 final standard, nor in the current C++14 draft.
>> 
>> 
>>> It’s a bug?
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140408/8671ac72/attachment.html>


More information about the llvm-dev mailing list