Boost logo

Boost :

Subject: Re: [boost] [test]enable_if, etc. : was : ...multiprecision types ... for unit tests?
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2013-06-12 22:29:21


Christopher Kormanyos <e_float <at> yahoo.com> writes:

> * OK for GCC 4.7.2
> * Errors for VC10 (ambiguous symbols), AKA VisualStudio 2010
> * Errors for VC11 (ambiguous symbols), AKA VisualStudio 2012

Sorry. I've misinterpreted MSVC output. I do see the error now. And... this
is really weird one. I did not see something like this in a long time. What
it comes to can be illustrated in this example:

#include <boost/multiprecision/cpp_dec_float.hpp>

namespace boost {

struct A{};

namespace inner1 {
struct enable_if {};
} // inner

namespace inner2 {
using namespace ::boost::inner1;

template<typename T>
void f1( A& ) {}

void f2()
{
    f1<int>( A() ); // <=== !!!!!! Offending line
}

} // inner2
} // boost

void foo()
{
  typedef
boost::multiprecision::number<boost::multiprecision::cpp_dec_float<50>,
                                        boost::multiprecision::et_off>
mp_type;

  const mp_type test_value = mp_type(12) / 7;
}

I'm sure it can be simplified further by removing specifics of
multiprecision library. And the offending line is ... the template
instantiation, in unrelated namespace HAS NOTHING TO DO with enable_if at
all.

Good job MS - I am still trying to figure out how you manage to achieve this
"result".

Any hints are welcome.

Gennadiy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk