| 1 | #include <boost/detail/lightweight_test.hpp>
|
|---|
| 2 | #include <boost/noncopyable.hpp>
|
|---|
| 3 |
|
|---|
| 4 | namespace xxx {
|
|---|
| 5 | namespace nested {
|
|---|
| 6 | struct aaa {};
|
|---|
| 7 | }
|
|---|
| 8 | void begin(nested::aaa) {}
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | namespace nnn {
|
|---|
| 12 | void begin(xxx::nested::aaa) {}
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | namespace boost {
|
|---|
| 16 | template<class X>
|
|---|
| 17 | void the_end(X &) {}
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | namespace my {
|
|---|
| 21 | struct ccc : private boost::noncopyable {};
|
|---|
| 22 | template<class X>
|
|---|
| 23 | void the_end(X &) {}
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | int main()
|
|---|
| 27 | {
|
|---|
| 28 | {
|
|---|
| 29 | using namespace nnn;
|
|---|
| 30 | xxx::nested::aaa a;
|
|---|
| 31 | begin(a); // ambiguous error in msvc-9.0
|
|---|
| 32 | }
|
|---|
| 33 | {
|
|---|
| 34 | my::ccc c;
|
|---|
| 35 | the_end(c); // ambiguous error in msvc-9.0
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 | return boost::report_errors();
|
|---|
| 39 | }
|
|---|