Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 32,651 of 33,346    |
|    Matt Calabrese to All    |
|    Re: Is this a violation of the ODR?    |
|    14 Nov 12 17:04:34    |
   
   From: rivorus@googlemail.com   
      
   On Tuesday, November 13, 2012 6:02:26 PM UTC-5, SG wrote:   
   > Am 13.11.2012 08:14, schrieb Matt Calabrese:   
   > > ////////////////////   
   > > // namespace { bool foo(); }   
   > > // inline void bar() { decltype( foo() ) foobar; }   
   > > ////////////////////   
   > >   
   > > So, if the above code is inside of a header file that is included by   
   > > two or more different translation units, is the ODR technically still   
   > > violated? In other words, if I'm only doing something different in an   
   > > unevaluated context, but the resultant type is always the same in   
   > > every translation unit, is what I'm doing technically okay? Should I   
   > > worry about this even if it is questionable whether or not this is   
   > > valid? I don't see how this could possibly cause a problem, but for   
   > > the sake of being pedantic, I'd like to know if I'm committing one of   
   > > the worst of all C++ sins.   
   >   
   >
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca