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

2016-02-29 Thread Brian Cole via cfe-users
"[email protected]<mailto:[email protected]>" mailto:[email protected]>> 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

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

2016-02-29 Thread Brian Cole via cfe-users
vm.org<mailto:[email protected]>" mailto:[email protected]>> 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

[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