Home » U++ Library support » U++ Core » [GCC][C++11] error: call of overloaded 'pick(Upp::Any&)' is ambiguous
[GCC][C++11] error: call of overloaded 'pick(Upp::Any&)' is ambiguous [message #45003] |
Sat, 15 August 2015 22:35 |
Zbych
Messages: 326 Registered: July 2009
|
Senior Member |
|
|
Hi,
When I am trying to turn on c++11 and compile even simplest application:
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
}
gcc (4.8.4/ubuntu1~14.04) shows me this errors
/home/zbych/upp/uppsrc/Core/Other.h:98:70: error: call of overloaded 'pick(Upp::Any&)' is ambiguous
void operator=(Any rval_ s) { Clear(); Pick(pick(s)); }
/home/zbych/upp/uppsrc/Core/Defs.h:391:5: note: T&& Upp::pick(T&) [with T = Upp::Any]
T&& pick(T& x) { return static_cast<T&&>(x); }
/home/zbych/upp/uppsrc/Core/Defs.h:394:5: note: T&& Upp::pick(T&&) [with T = Upp::Any&]
T&& pick(T&& x) { return static_cast<T&&>(x); }
It appears that gcc doesn't know which template it should use:
template <typename T>
T&& pick(T& x) { return static_cast<T&&>(x); }
template <typename T>
T&& pick(T&& x) { return static_cast<T&&>(x); }
How can I fix this errors?
|
|
|
Goto Forum:
Current Time: Sun May 12 07:41:45 CEST 2024
Total time taken to generate the page: 0.02742 seconds
|