Thursday, February 18, 2016

Digest for comp.lang.c++@googlegroups.com - 3 updates in 2 topics

JiiPee <no@notvalid.com>: Feb 18 04:39PM

yes, this seems to do the job! Still trying to understand what is
happening here:
 
int const id = (human.*&Access::id)();
 
:)
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Feb 19 12:30AM +0100

On 2/18/2016 5:39 PM, JiiPee wrote:
> happening here:
 
> int const id = (human.*&Access::id)();
 
> :)
 
It's quite subtle. Which is why I'd rather use a formally UB
`static_cast`. You can add this declaration:
 
char* nah = *&Access::id;
 
to get an idea about it from the compilation error message.
 
 
Cheers & hth.,
 
- Alf
Wouter van Ooijen <wouter@voti.nl>: Feb 18 11:15PM +0100

Op 18-Feb-16 om 10:10 PM schreef Ian Collins:
 
> I prefer to teach the write a test, pass the test cycle as adding
> functionality rather than adding code. Code is too specific in my
> opinion: you might add functionality by removing code!
 
OK, so I think we agree that taking that Uncle Bob page literally is not
a good idea?
 
Can you refer me to a page or document or whatever that describes the
version of TDD that you find usefull?
 
==================
 
And back to the UART :)
 
After the first test case, would I be allowed to write the UART init
code that calculates the settings from the specified baudrate? That is
much more than needed to pass that single test (which is for one
baudrate). The TDD demo's that I have seen specifically don't do that.
 
Wouter
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: