On Mar 17, 2012, at 9:43 AM, Andrei Alexandrescu 
<[email protected]> wrote:

> On 3/17/12 9:10 AM, Sean Kelly wrote:
>> Pretty much. I'd expect to see:
>> 
>> version (linux) {
>>     // optimized impl
>> } else version (OSX) {
>>     version = UseDefault;
>> } else {
>>     static assert(false, "unknown platform");
>> }
>> version (UseDefault) {
>>     ...
>> }
> 
> Taking this to its logical conclusion means that _all_ code that is currently 
> unguarded must be guarded by version (UseDefault).

No need for logical fallacies.  My point was that for code where 
platform-specific optimizations are performed, construct the code in such a way 
that when porting to a new platform, the compiler points at places that bear 
investigation. 

Reply via email to