Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2006-07-26 10:13:41

On Jul 26, 2006, at 4:55 AM, John Maddock wrote:

> Won't bool isnormal(const Person&) be the better overload and
> therefore the
> one called? The worst I can see happening is an "ambiguous
> overload" error.

Fwiw, here's a standalone test. But at this point it's academic as I
didn't know about boost::math which I think is probably sufficient

#include <iostream>

namespace boost

template <class T>
isnormal(T t) {std::cout << "boost::isnormal\n"; return true;}

template<class T>
class optional {};


namespace Mine

struct sense_of_humor {};

struct Person : private boost::optional<sense_of_humor> {};

struct Female : public Person {};

bool isnormal(const Person&) {std::cout << "Mine::isnormal\n"; return

bool foo()
     Female Jane;
     return isnormal(Jane);


int main()

This prints out "boost::isnormal" for me.


Boost list run by bdawes at, gregod at, cpdaniel at, john at