[cfe-users] Anyway to prevent this code from compiling?

2016-02-29 Thread Brian Cole via cfe-users
Since switching over to clang C++11 on OS X, we had this weird C++ oddity surface while writing some new code. The problem is that ‘mutex’ is no longer a variable, it is a class type that can be interpreted as a function argument. That is, the following line of code can be interpreted as a funct

Re: [cfe-users] Anyway to prevent this code from compiling?

2016-02-29 Thread Brian Cole via cfe-users
vm.org<mailto:cfe-users@lists.llvm.org>" mailto:cfe-users@lists.llvm.org>> Subject: Re: [cfe-users] Anyway to prevent this code from compiling? Try using initialization list syntax. That way the parser won't think you are declaring a function. OELock lock{mutex}; On Mon, F

Re: [cfe-users] Anyway to prevent this code from compiling?

2016-02-29 Thread Brian Cole via cfe-users
"cfe-users@lists.llvm.org<mailto:cfe-users@lists.llvm.org>" mailto:cfe-users@lists.llvm.org>> Subject: Re: [cfe-users] Anyway to prevent this code from compiling? Try using initialization list syntax. That way the parser won't think you are declaring a function. OELock lo