{"action":"created","issue":{"url":"https://api.github.com/repos/01org/parameter-framework/issues/310","labels_url":"https://api.github.com/repos/01org/parameter-framework/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/01org/parameter-framework/issues/310/comments","events_url":"https://api.github.com/repos/01org/parameter-framework/issues/310/events","html_url":"https://github.com/01org/parameter-framework/pull/310","id":116540189,"number":310,"title":"[review] Add an option for removing Werror; have travis build in release config","user":{"login":"dawagner","id":6430928,"avatar_url":"https://avatars.githubusercontent.com/u/6430928?v=3","gravatar_id":"","url":"https://api.github.com/users/dawagner","html_url":"https://github.com/dawagner","followers_url":"https://api.github.com/users/dawagner/followers","following_url":"https://api.github.com/users/dawagner/following{/other_user}","gists_url":"https://api.github.com/users/dawagner/gists{/gist_id}","starred_url":"https://api.github.com/users/dawagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dawagner/subscriptions","organizations_url":"https://api.github.com/users/dawagner/orgs","repos_url":"https://api.github.com/users/dawagner/repos","events_url":"https://api.github.com/users/dawagner/events{/privacy}","received_events_url":"https://api.github.com/users/dawagner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/01org/parameter-framework/labels/build","name":"build","color":"555555"},{"url":"https://api.github.com/repos/01org/parameter-framework/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-12T12:27:54Z","updated_at":"2015-11-20T12:27:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/01org/parameter-framework/pulls/310","html_url":"https://github.com/01org/parameter-framework/pull/310","diff_url":"https://github.com/01org/parameter-framework/pull/310.diff","patch_url":"https://github.com/01org/parameter-framework/pull/310.patch"},"body":"Fix some compilation errors in release configuration (strict aliasing violations) and add an option to enable/disable the -Werror flag. This is useful for integrators.\r\n\r\nHave travis build in release configuration instead of \"None\" configuration.\n<a href='#crh-start'></a><a href='#crh-data-%7B%22processed%22%3A%20%5B%22https%3A//github.com/01org/parameter-framework/pull/310%23issuecomment-156107307%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23issuecomment-157379370%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23issuecomment-158006925%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23issuecomment-158045976%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23issuecomment-158382257%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45089579%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45089675%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45089800%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45089822%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45091171%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45094136%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45094436%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45100096%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45101137%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337303%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337346%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337392%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337576%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337675%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337851%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337950%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45338045%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45338962%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45339868%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45339972%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45339974%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45339976%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45339977%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45339979%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45356414%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45356441%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45356598%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45356602%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45356603%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45356605%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45356607%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45356611%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45455358%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45455359%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45455507%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45455675%22%2C%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45455945%22%5D%2C%20%22comments%22%3A%20%7B%22General%20Comment%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23issuecomment-156107307%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22%3A%2B1%3A%22%2C%20%22created_at%22%3A%20%222015-11-12T13%3A51%3A47Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/11178583%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/tcahuzax%22%7D%7D%2C%20%7B%22body%22%3A%20%22%40krocard%20ping%3F%20%28cf.%20https%3A//github.com/01org/parameter-framework/pull/310%23commitcomment-14409352%29%22%2C%20%22created_at%22%3A%20%222015-11-17T14%3A09%3A16Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%2C%20%7B%22body%22%3A%20%22%40krocard%20%40tcahuzax%20please%20review%22%2C%20%22created_at%22%3A%20%222015-11-19T09%3A50%3A32Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3Ashipit%3A%20%22%2C%20%22created_at%22%3A%20%222015-11-19T12%3A41%3A06Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/11178583%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/tcahuzax%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3Ashipit%3A%22%2C%20%22created_at%22%3A%20%222015-11-20T12%3A24%3A03Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/11178583%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/tcahuzax%22%7D%7D%5D%2C%20%22title%22%3A%20%22General%20Comment%22%7D%2C%20%22Pull%20a3cd3ad7740a4a39902e6ece7ec4566c12584938%20utility/BinaryCopy.hpp%2050%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45091171%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22%60%60%60cpp%5Cr%5Cntemplate%20%3Cclass%20Destination%2C%20class%20Source%3E%5Cr%5CnDestination%20binaryCopy%28const%20Source%20source%29%5Cr%5Cn%60%60%60%5Cr%5CnReturn%20by%20value%20%3F%22%2C%20%22created_at%22%3A%20%222015-11-17T17%3A33%3A58Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A32%3A01Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20utility/BinaryCopy.hpp%3AL1-65%22%7D%2C%20%22Pull%20012a6053c1b883bed1171ac7be4dde8df16ac614%20utility/test/utility.cpp%2028%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337950%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22%7E%7E%7E%20cpp%5Cr%5CnCHECK%28utility%3A%3AbinaryCopy%3Cdouble%3E%280x408edd3c0cb3420e%29%20%3D%3D%20987.65432109876%29%5Cr%5Cn%7E%7E%7E%5Cr%5CnMaybe%20also%20test%20the%20reverse%20%3F%20Consider%3A%5Cr%5Cn%7E%7E%7E%20cpp%5Cr%5Cntemplate%20%3Cclass%20V1%2C%20class%20V2%3E%5Cr%5CncheckBinaryEqual%28V1%20v1%2C%20V2%20v2%29%20%7B%5Cr%5Cn%20%20%20%20CAPTURE%28V1%29%3B%5Cr%5Cn%20%20%20%20CAPTURE%28V2%29%3B%5Cr%5Cn%20%20%20%20CHECK%28utility%3A%3AbinaryCopy%3CV1%3E%28v2%29%20%3D%3D%20v1%29%5Cr%5Cn%20%20%20%20CHECK%28utility%3A%3AbinaryCopy%3CV2%3E%28v1%29%20%3D%3D%20v2%29%5Cr%5Cn%7D%5Cr%5Cn%7E%7E%7E%5Cr%5CnThen%20replace%20all%20your%20%60CHECK%60%20by%20%60checkBinaryEqual%60.%20You%20will%20test%20each%20conversion%20direction%20for%20free%20%21%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A11%3A15Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-20T10%3A36%3A27Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20utility/test/utility.cpp%3AL177-204%22%7D%2C%20%22Pull%20a3cd3ad7740a4a39902e6ece7ec4566c12584938%20parameter/FloatingPointParameterType.cpp%2025%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45101137%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22%7E%7E%7Ecpp%5Cr%5CnuiValue%20%3D%20utility%3A%3AbinaryCopy%3Cdecltype%28uiValue%29%3E%28fValue%29%3B%5Cr%5Cn%7E%7E%7E%5Cr%5CnType%20can%20be%20autodeduce.%22%2C%20%22created_at%22%3A%20%222015-11-17T18%3A46%3A10Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A32%3A02Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20parameter/FloatingPointParameterType.cpp%3AL174-181%22%7D%2C%20%22Pull%20a3cd3ad7740a4a39902e6ece7ec4566c12584938%20parameter/FloatingPointParameterType.cpp%2070%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45089822%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Lets%20pretend%20that%20binary%20returns%20the%20copy%3A%5Cr%5Cn%7E%7E%7Ecpp%5Cr%5Cnauto%20fValue%20%3D%20utility%3A%3AbinaryCopy%3Cfloat%3E%28dUserValue%29%3B%5Cr%5Cn%7E%7E%7E%5Cr%5CnI%20prefer%20to%20initialize%20variable%20on%20declaration.%22%2C%20%22created_at%22%3A%20%222015-11-17T17%3A23%3A52Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A32%3A02Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20parameter/FloatingPointParameterType.cpp%3AL265-273%22%7D%2C%20%22Pull%20012a6053c1b883bed1171ac7be4dde8df16ac614%20utility/test/utility.cpp%2032%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45338045%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22%7E%7E%7Ecpp%5Cr%5CnCHECK%28utility%3A%3AbinaryCopy%3Cint8_t%3E%280xff%29%20%3D%3D%20-1%29%5Cr%5Cn%7E%7E%7E%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A12%3A29Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%20%22%2C%20%22created_at%22%3A%20%222015-11-20T10%3A38%3A55Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20utility/test/utility.cpp%3AL177-204%22%7D%2C%20%22Pull%20a3cd3ad7740a4a39902e6ece7ec4566c12584938%20parameter/FloatingPointParameterType.cpp%2014%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45089579%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Lets%20pretend%20that%20binary%20returns%20the%20copy%3A%5Cr%5Cn%7E%7E%7Ecpp%5Cr%5Cnauto%20fData%20%3D%20utility%3A%3AbinaryCopy%3Cfloat%3E%28uiValue%29%5Cr%5Cn%7E%7E%7E%5Cr%5CnI%20prefer%20to%20initialize%20variable%20on%20declaration.%22%2C%20%22created_at%22%3A%20%222015-11-17T17%3A22%3A08Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22That%27s%20what%20I%20originally%20did.%20But%20consider%20line%20177%3A%20I%20would%20find%20dangerous%20using%20an%20explicit%20template%20instantiation%20because%2C%20if%20the%20type%20of%20%60uiValue%60%20changes%2C%20the%20code%20might%20still%20compile%20but%20will%20not%20behave%20as%20intended.%22%2C%20%22created_at%22%3A%20%222015-11-17T17%3A57%3A16Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%2C%20%7B%22body%22%3A%20%22What%20about%20%60decltype%28uiValue%29%60%20then%20%3F%22%2C%20%22created_at%22%3A%20%222015-11-17T17%3A59%3A17Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22I%20already%20considered%20this%20too.%20But%20I%20know%20from%20a%20previous%20try%20at%20another%20patch%20that%20Visual%20Studio%2012%20does%20not%20support%20using%20%60decltype%60%20on%20the%20variable%20being%20declared%20%28which%20is%20the%20case%20in%20your%20suggestion%29.%20%3A%28%22%2C%20%22created_at%22%3A%20%222015-11-17T18%3A39%3A12Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-19T15%3A44%3A02Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20parameter/FloatingPointParameterType.cpp%3AL139-147%22%7D%2C%20%22Pull%20a3cd3ad7740a4a39902e6ece7ec4566c12584938%20parameter/FloatingPointParameterType.cpp%2038%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45089675%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Lets%20pretend%20that%20binary%20returns%20the%20copy%3A%5Cr%5Cn%7E%7E%7Ecpp%5Cr%5Cnauto%20uiMin%20%3D%20utility%3A%3AbinaryCopy%3Cuint32_t%3E%28_fMin%29%5Cr%5Cnauto%20uiMax%20%3D%20utility%3A%3AbinaryCopy%3Cuint32_t%3E%28_fMax%29%5Cr%5Cn%7E%7E%7E%5Cr%5CnI%20prefer%20to%20initialize%20variable%20on%20declaration.%22%2C%20%22created_at%22%3A%20%222015-11-17T17%3A22%3A48Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A32%3A03Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20parameter/FloatingPointParameterType.cpp%3AL193-203%22%7D%2C%20%22Pull%20012a6053c1b883bed1171ac7be4dde8df16ac614%20utility/test/utility.cpp%2021%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337675%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22%7E%7E%7E%20cpp%5Cr%5CnCHECK%28utility%3A%3AbinaryCopy%3Cuint32_t%3E%281.23456f%29%20%3D%3D%200x3f9e0610%29%5Cr%5Cn%7E%7E%7E%5Cr%5CnI%20am%20not%20sure%20outX%20and%20inX%20variables%20or%20of%20any%20use.%20%2B%20that%20would%20make%20a%20nicer%20error%20message%20in%20case%20of%20failure.%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A08%3A02Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-19T15%3A44%3A03Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20utility/test/utility.cpp%3AL177-204%22%7D%2C%20%22Pull%20012a6053c1b883bed1171ac7be4dde8df16ac614%20utility/test/utility.cpp%2034%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45338962%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Let%20me%20sumerize%20my%20proposition%3A%5Cr%5Cn%7E%7E%7Ecpp%5Cr%5Cntemplate%20%3Cclass%20V1%2C%20class%20V2%3E%5Cr%5CncheckBinaryEqual%28V1%20v1%2C%20V2%20v2%29%20%7B%5Cr%5Cn%20%20%20%20CAPTURE%28V1%29%3B%5Cr%5Cn%20%20%20%20CAPTURE%28V2%29%3B%5Cr%5Cn%20%20%20%20CHECK%28utility%3A%3AbinaryCopy%3CV1%3E%28v2%29%20%3D%3D%20v1%29%5Cr%5Cn%20%20%20%20CHECK%28utility%3A%3AbinaryCopy%3CV2%3E%28v1%29%20%3D%3D%20v2%29%5Cr%5Cn%7D%5Cr%5Cn%5Cr%5CnSCENARIO%28%5C%22binaryCopy%20bit%20exactness%5C%22%29%20%7B%5Cr%5Cn%20%20%20%20WITH%28%5C%22Integer%20representation%20computed%20using%20http%3A//babbage.cs.qc.cuny.edu/IEEE-754/%5C%22%29%20%7B%5Cr%5Cn%5Cr%5Cn%20%20%20%20%20%20%20%20THEN%28%5C%22Float%20should%20coded%20on%2032bits.%20That%20assumption%20is%20made%20in%20the%20Parameter%20Framework.%5C%22%29%20%7B%5Cr%5Cn%20%20%20%20%20%20%20%20%20%20%20%20REQUIRE%28sizeof%28float%29%20%3D%3D%20sizeof%28uint32_t%29%29%3B%5Cr%5Cn%20%20%20%20%20%20%20%20%7D%5Cr%5Cn%20%20%20%20%20%20%20%20WHEN%28%5C%22Testing%20float%20%3C%3D%3E%20uint32_t%20conversion%5C%22%29%20%7B%5Cr%5Cn%20%20%20%20%20%20%20%20%20%20%20%20checkBinaryEqual%3Cfloat%2C%20int32_t%3E%281.23456f%2C%200x3f9e0610%29%3B%5Cr%5Cn%20%20%20%20%20%20%20%20%7D%5Cr%5Cn%5Cr%5Cn%20%20%20%20%20%20%20%20THEN%28%5C%22Double%20should%20coded%20on%2064bits.%20That%20assumption%20is%20made%20in%20the%20Parameter%20Framework.%5C%22%29%20%7B%5Cr%5Cn%20%20%20%20%20%20%20%20%20%20%20%20REQUIRE%28sizeof%28double%29%20%3D%3D%20sizeof%28uint64_t%29%29%3B%5Cr%5Cn%20%20%20%20%20%20%20%20%7D%5Cr%5Cn%20%20%20%20%20%20%20%20WHEN%28%5C%22Testing%20double%20%3C%3D%3E%20uint64_t%20conversion%5C%22%29%20%7B%5Cr%5Cn%20%20%20%20%20%20%20%20%20%20%20%20checkBinaryEqual%3Cdouble%2C%20int64_t%3E%280x408edd3c0cb3420e%2C%20987.65432109876%29%5Cr%5Cn%20%20%20%20%20%20%20%20%7D%5Cr%5Cn%5Cr%5Cn%20%20%20%20%20%20%20%20WHEN%28%5C%22Testing%20int8_t%20%3C%3D%3E%20uint8_t%20conversion%5C%22%29%20%7B%5Cr%5Cn%20%20%20%20%20%20%20%20%20%20%20%20checkBinaryEqual%3Cint8_t%2C%20uint8_t%3E%28-1%2C%200xff%29%3B%5Cr%5Cn%20%20%20%20%20%20%20%20%7D%5Cr%5Cn%7D%5Cr%5Cn%7E%7E%7E%5Cr%5CnTo%20summarizer%2C%20try%20not%20to%20use%20comments%20in%20catch%20tests%20but%20instead%20use%20the%20SECTION%20%26%20CO%20macro.%20This%20at%20the%20very%20least%20does%20not%20impact%20the%20readability%20and%20improves%20error%20messages.%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A22%3A27Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%20done%22%2C%20%22created_at%22%3A%20%222015-11-19T15%3A42%3A53Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20utility/test/utility.cpp%3AL177-204%22%7D%2C%20%22Pull%20012a6053c1b883bed1171ac7be4dde8df16ac614%20utility/test/utility.cpp%2015%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337392%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22%7E%7E%7Ecpp%5Cr%5CnWHEN%28%5C%22Binary%20copy%20float%20to%20uint32_t%5C%22%29%20%7B%5Cr%5Cn%7E%7E%7E%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A05%3A34Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-19T15%3A44%3A04Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20utility/test/utility.cpp%3AL177-204%22%7D%2C%20%22Pull%20012a6053c1b883bed1171ac7be4dde8df16ac614%20utility/test/utility.cpp%2014%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337303%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22%7E%7E%7Ecpp%5Cr%5CnWITH%28%5C%22Integer%20representation%20computed%20using%20http%3A//babbage.cs.qc.cuny.edu/IEEE-754/%5C%22%29%20%7B%5Cr%5Cn%7E%7E%7E%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A04%3A24Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-19T15%3A44%3A04Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20utility/test/utility.cpp%3AL177-204%22%7D%2C%20%22Pull%20012a6053c1b883bed1171ac7be4dde8df16ac614%20utility/test/utility.cpp%2016%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337346%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22%7E%7E%7Ecpp%5Cr%5CnCAPTURE%28int1%29%3B%5Cr%5Cn%7E%7E%7E%5Cr%5Cn%5Cr%5CnNote%3A%20Useless%20if%20you%20follow%20my%20%60checkBinaryEqual%60%20advise.%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A04%3A52Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-19T15%3A44%3A05Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20utility/test/utility.cpp%3AL177-204%22%7D%2C%20%22Pull%208d12cdbf2bb9e97408b261e2474bc8050eace63c%20utility/test/utility.cpp%2017%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45455507%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Is%20did%20the%20%60CHECK%28v1%20%3D%3D%20utility%3A%3AbinaryCopy%3CT1%3E%28v2%29%29%29%3B%60%20swap%20trick%20working%20%3F%22%2C%20%22created_at%22%3A%20%222015-11-20T10%3A38%3A09Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22nope%20%3A%28%20I%27m%20now%20trying%20with%20intermediate%20variables.%22%2C%20%22created_at%22%3A%20%222015-11-20T10%3A41%3A46Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20utility/test/utility.cpp%3AL177-216%22%7D%2C%20%22Pull%20012a6053c1b883bed1171ac7be4dde8df16ac614%20CMakeLists.txt%2020%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45339868%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22You%20forgot%20the%20swig%20-Werror.%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A31%3A07Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%20done%22%2C%20%22created_at%22%3A%20%222015-11-19T15%3A42%3A42Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20CMakeLists.txt%3AL69-83%22%7D%2C%20%22Pull%20a3cd3ad7740a4a39902e6ece7ec4566c12584938%20parameter/FloatingPointParameterType.cpp%2059%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45089800%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Lets%20pretend%20that%20binary%20returns%20the%20copy%3A%5Cr%5Cn%7E%7E%7Ecpp%5Cr%5Cnauto%20fValue%20%3D%20utility%3A%3AbinaryCopy%3Cfloat%3E%28dUserValue%29%3B%5Cr%5Cn%7E%7E%7E%5Cr%5CnI%20prefer%20to%20initialize%20variable%20on%20declaration.%22%2C%20%22created_at%22%3A%20%222015-11-17T17%3A23%3A41Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-complete%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A32%3A03Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20parameter/FloatingPointParameterType.cpp%3AL255-262%22%7D%2C%20%22Pull%20012a6053c1b883bed1171ac7be4dde8df16ac614%20utility/test/utility.cpp%2018%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337576%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22%7E%7E%7Ecpp%5Cr%5CnTHEN%28%5C%22Float%20should%20coded%20on%2032bits.%20That%20assumption%20is%20made%20in%20the%20Parameter%20Framework.%5C%22%29%20%7B%5Cr%5Cn%20%20%20%20REQUIRE%28sizeof%28float%29%20%3D%3D%20sizeof%28uint32_t%29%29%3B%5Cr%5Cn%7D%5Cr%5Cn%7E%7E%7E%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A07%3A18Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-complete%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-19T15%3A44%3A05Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6430928%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dawagner%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20utility/test/utility.cpp%3AL177-204%22%7D%2C%20%22Pull%20012a6053c1b883bed1171ac7be4dde8df16ac614%20utility/test/utility.cpp%2024%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/01org/parameter-framework/pull/310%23discussion_r45337851%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22%7E%7E%7Ecpp%5Cr%5CnTHEN%28%5C%22Double%20should%20coded%20on%2064bits.%20That%20assumption%20is%20made%20in%20the%20Parameter%20Framework.%5C%22%29%20%7B%5Cr%5Cn%20%20%20%20REQUIRE%28sizeof%28double%29%20%3D%3D%20sizeof%28uint64_t%29%29%3B%5Cr%5Cn%7D%5Cr%5Cn%7E%7E%7E%22%2C%20%22created_at%22%3A%20%222015-11-19T13%3A10%3A13Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-complete%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-11-20T10%3A36%3A27Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/6862950%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/krocard%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20utility/test/utility.cpp%3AL177-204%22%7D%7D%2C%20%22approved%22%3A%20%7B%22https%3A//github.com/tcahuzax%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/11178583%3Fv%3D3%22%7D%7D%7D'></a>\n<a href='https://www.codereviewhub.com/'><img src='http://www.codereviewhub.com/site/github-bar.png' height=40></a>\n\n<img src='http://www.codereviewhub.com/site/github-approved-avatar.png'><a href='https://github.com/tcahuzax'><img src='https://avatars.githubusercontent.com/u/11178583?v=3' width=34 height=34></a>\n\n- [ ] <a href='#crh-comment-Pull 8d12cdbf2bb9e97408b261e2474bc8050eace63c utility/test/utility.cpp 17'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45455507'>File: utility/test/utility.cpp:L177-216</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> Is did the `CHECK(v1 == utility::binaryCopy<T1>(v2)));` swap trick working ?\n- <a href='https://github.com/dawagner'><img border=0 src='https://avatars.githubusercontent.com/u/6430928?v=3' height=16 width=16'></a> nope :( I'm now trying with intermediate variables.\n- [x] <a href='#crh-comment-General Comment'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#issuecomment-156107307'>General Comment</a></b>\n- <a href='https://github.com/tcahuzax'><img border=0 src='https://avatars.githubusercontent.com/u/11178583?v=3' height=16 width=16'></a> :+1:\n- <a href='https://github.com/dawagner'><img border=0 src='https://avatars.githubusercontent.com/u/6430928?v=3' height=16 width=16'></a> @krocard ping? (cf. https://github.com/01org/parameter-framework/pull/310#commitcomment-14409352)\n- <a href='https://github.com/dawagner'><img border=0 src='https://avatars.githubusercontent.com/u/6430928?v=3' height=16 width=16'></a> @krocard @tcahuzax please review\n- [x] <a href='#crh-comment-Pull a3cd3ad7740a4a39902e6ece7ec4566c12584938 parameter/FloatingPointParameterType.cpp 14'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45089579'>File: parameter/FloatingPointParameterType.cpp:L139-147</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> Lets pretend that binary returns the copy:\n~~~cpp\nauto fData = utility::binaryCopy<float>(uiValue)\n~~~\nI prefer to initialize variable on declaration.\n- <a href='https://github.com/dawagner'><img border=0 src='https://avatars.githubusercontent.com/u/6430928?v=3' height=16 width=16'></a> That's what I originally did. But consider line 177: I would find dangerous using an explicit template instantiation because, if the type of `uiValue` changes, the code might still compile but will not behave as intended.\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> What about `decltype(uiValue)` then ?\n- <a href='https://github.com/dawagner'><img border=0 src='https://avatars.githubusercontent.com/u/6430928?v=3' height=16 width=16'></a> I already considered this too. But I know from a previous try at another patch that Visual Studio 12 does not support using `decltype` on the variable being declared (which is the case in your suggestion). :(\n- [x] <a href='#crh-comment-Pull a3cd3ad7740a4a39902e6ece7ec4566c12584938 parameter/FloatingPointParameterType.cpp 38'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45089675'>File: parameter/FloatingPointParameterType.cpp:L193-203</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> Lets pretend that binary returns the copy:\n~~~cpp\nauto uiMin = utility::binaryCopy<uint32_t>(_fMin)\nauto uiMax = utility::binaryCopy<uint32_t>(_fMax)\n~~~\nI prefer to initialize variable on declaration.\n- [x] <a href='#crh-comment-Pull a3cd3ad7740a4a39902e6ece7ec4566c12584938 parameter/FloatingPointParameterType.cpp 59'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45089800'>File: parameter/FloatingPointParameterType.cpp:L255-262</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> Lets pretend that binary returns the copy:\n~~~cpp\nauto fValue = utility::binaryCopy<float>(dUserValue);\n~~~\nI prefer to initialize variable on declaration.\n- [x] <a href='#crh-comment-Pull a3cd3ad7740a4a39902e6ece7ec4566c12584938 parameter/FloatingPointParameterType.cpp 70'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45089822'>File: parameter/FloatingPointParameterType.cpp:L265-273</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> Lets pretend that binary returns the copy:\n~~~cpp\nauto fValue = utility::binaryCopy<float>(dUserValue);\n~~~\nI prefer to initialize variable on declaration.\n- [x] <a href='#crh-comment-Pull a3cd3ad7740a4a39902e6ece7ec4566c12584938 utility/BinaryCopy.hpp 50'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45091171'>File: utility/BinaryCopy.hpp:L1-65</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> \n```cpp\ntemplate <class Destination, class Source>\nDestination binaryCopy(const Source source)\n```\nReturn by value ?\n- [x] <a href='#crh-comment-Pull a3cd3ad7740a4a39902e6ece7ec4566c12584938 parameter/FloatingPointParameterType.cpp 25'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45101137'>File: parameter/FloatingPointParameterType.cpp:L174-181</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> ~~~cpp\nuiValue = utility::binaryCopy<decltype(uiValue)>(fValue);\n~~~\nType can be autodeduce.\n- [x] <a href='#crh-comment-Pull 012a6053c1b883bed1171ac7be4dde8df16ac614 utility/test/utility.cpp 14'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45337303'>File: utility/test/utility.cpp:L177-204</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> ~~~cpp\nWITH(\"Integer representation computed using http://babbage.cs.qc.cuny.edu/IEEE-754/\") {\n~~~\n- [x] <a href='#crh-comment-Pull 012a6053c1b883bed1171ac7be4dde8df16ac614 utility/test/utility.cpp 16'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45337346'>File: utility/test/utility.cpp:L177-204</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> ~~~cpp\nCAPTURE(int1);\n~~~\nNote: Useless if you follow my `checkBinaryEqual` advise.\n- [x] <a href='#crh-comment-Pull 012a6053c1b883bed1171ac7be4dde8df16ac614 utility/test/utility.cpp 15'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45337392'>File: utility/test/utility.cpp:L177-204</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> ~~~cpp\nWHEN(\"Binary copy float to uint32_t\") {\n~~~\n- [x] <a href='#crh-comment-Pull 012a6053c1b883bed1171ac7be4dde8df16ac614 utility/test/utility.cpp 18'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45337576'>File: utility/test/utility.cpp:L177-204</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> ~~~cpp\nTHEN(\"Float should coded on 32bits. That assumption is made in the Parameter Framework.\") {\nREQUIRE(sizeof(float) == sizeof(uint32_t));\n}\n~~~\n- [x] <a href='#crh-comment-Pull 012a6053c1b883bed1171ac7be4dde8df16ac614 utility/test/utility.cpp 21'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45337675'>File: utility/test/utility.cpp:L177-204</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> ~~~ cpp\nCHECK(utility::binaryCopy<uint32_t>(1.23456f) == 0x3f9e0610)\n~~~\nI am not sure outX and inX variables or of any use. + that would make a nicer error message in case of failure.\n- [x] <a href='#crh-comment-Pull 012a6053c1b883bed1171ac7be4dde8df16ac614 utility/test/utility.cpp 24'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45337851'>File: utility/test/utility.cpp:L177-204</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> ~~~cpp\nTHEN(\"Double should coded on 64bits. That assumption is made in the Parameter Framework.\") {\nREQUIRE(sizeof(double) == sizeof(uint64_t));\n}\n~~~\n- [x] <a href='#crh-comment-Pull 012a6053c1b883bed1171ac7be4dde8df16ac614 utility/test/utility.cpp 28'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45337950'>File: utility/test/utility.cpp:L177-204</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> ~~~ cpp\nCHECK(utility::binaryCopy<double>(0x408edd3c0cb3420e) == 987.65432109876)\n~~~\nMaybe also test the reverse ? Consider:\n~~~ cpp\ntemplate <class V1, class V2>\ncheckBinaryEqual(V1 v1, V2 v2) {\nCAPTURE(V1);\nCAPTURE(V2);\nCHECK(utility::binaryCopy<V1>(v2) == v1)\nCHECK(utility::binaryCopy<V2>(v1) == v2)\n}\n~~~\nThen replace all your `CHECK` by `checkBinaryEqual`. You will test each conversion direction for free !\n- [x] <a href='#crh-comment-Pull 012a6053c1b883bed1171ac7be4dde8df16ac614 utility/test/utility.cpp 32'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45338045'>File: utility/test/utility.cpp:L177-204</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> ~~~cpp\nCHECK(utility::binaryCopy<int8_t>(0xff) == -1)\n~~~\n- [x] <a href='#crh-comment-Pull 012a6053c1b883bed1171ac7be4dde8df16ac614 utility/test/utility.cpp 34'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45338962'>File: utility/test/utility.cpp:L177-204</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> Let me sumerize my proposition:\n~~~cpp\ntemplate <class V1, class V2>\ncheckBinaryEqual(V1 v1, V2 v2) {\nCAPTURE(V1);\nCAPTURE(V2);\nCHECK(utility::binaryCopy<V1>(v2) == v1)\nCHECK(utility::binaryCopy<V2>(v1) == v2)\n}\nSCENARIO(\"binaryCopy bit exactness\") {\nWITH(\"Integer representation computed using http://babbage.cs.qc.cuny.edu/IEEE-754/\") {\nTHEN(\"Float should coded on 32bits. That assumption is made in the Parameter Framework.\") {\nREQUIRE(sizeof(float) == sizeof(uint32_t));\n}\nWHEN(\"Testing float <=> uint32_t conversion\") {\ncheckBinaryEqual<float, int32_t>(1.23456f, 0x3f9e0610);\n}\nTHEN(\"Double should coded on 64bits. That assumption is made in the Parameter Framework.\") {\nREQUIRE(sizeof(double) == sizeof(uint64_t));\n}\nWHEN(\"Testing double <=> uint64_t conversion\") {\ncheckBinaryEqual<double, int64_t>(0x408edd3c0cb3420e, 987.65432109876)\n}\nWHEN(\"Testing int8_t <=> uint8_t conversion\") {\ncheckBinaryEqual<int8_t, uint8_t>(-1, 0xff);\n}\n}\n~~~\nTo summarizer, try not to use comments in catch tests but instead use the SECTION & CO macro. This at the very least does not impact the readability and improves error messages.\n- <a href='https://github.com/dawagner'><img border=0 src='https://avatars.githubusercontent.com/u/6430928?v=3' height=16 width=16'></a> :+1: done\n- [x] <a href='#crh-comment-Pull 012a6053c1b883bed1171ac7be4dde8df16ac614 CMakeLists.txt 20'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/01org/parameter-framework/pull/310#discussion_r45339868'>File: CMakeLists.txt:L69-83</a></b>\n- <a href='https://github.com/krocard'><img border=0 src='https://avatars.githubusercontent.com/u/6862950?v=3' height=16 width=16'></a> You forgot the swig -Werror.\n- <a href='https://github.com/dawagner'><img border=0 src='https://avatars.githubusercontent.com/u/6430928?v=3' height=16 width=16'></a> :+1: done\n\n\n<a href='https://www.codereviewhub.com/01org/parameter-framework/pull/310?mark_as_completed=1'><img src='http://www.codereviewhub.com/site/github-mark-as-completed.png' height=26></a>&nbsp;<a href='https://www.codereviewhub.com/01org/parameter-framework/pull/310?approve=1'><img src='http://www.codereviewhub.com/site/github-approve.png' height=26></a>&nbsp;<a href='https://www.codereviewhub.com/01org/parameter-framework/pull/310?approve=0'><img src='http://www.codereviewhub.com/site/github-undo-approve.png' height=26></a>&nbsp;<a href='https://github.com/01org/parameter-framework/pull/310'><img src='http://www.codereviewhub.com/site/github-refresh.png' height=26></a>\n<a href='#crh-end'></a>"},"comment":{"url":"https://api.github.com/repos/01org/parameter-framework/issues/comments/158383567","html_url":"https://github.com/01org/parameter-framework/pull/310#issuecomment-158383567","issue_url":"https://api.github.com/repos/01org/parameter-framework/issues/310","id":158383567,"user":{"login":"dawagner","id":6430928,"avatar_url":"https://avatars.githubusercontent.com/u/6430928?v=3","gravatar_id":"","url":"https://api.github.com/users/dawagner","html_url":"https://github.com/dawagner","followers_url":"https://api.github.com/users/dawagner/followers","following_url":"https://api.github.com/users/dawagner/following{/other_user}","gists_url":"https://api.github.com/users/dawagner/gists{/gist_id}","starred_url":"https://api.github.com/users/dawagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dawagner/subscriptions","organizations_url":"https://api.github.com/users/dawagner/orgs","repos_url":"https://api.github.com/users/dawagner/repos","events_url":"https://api.github.com/users/dawagner/events{/privacy}","received_events_url":"https://api.github.com/users/dawagner/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T12:27:46Z","updated_at":"2015-11-20T12:27:46Z","body":"@krocard One last review, please?"}}