#include <chrono>
namespace X
{
using namespace std;
struct A
{
std::chrono::seconds d = 0s; // ok
};
}
namespace Y
{
struct B
{
std::chrono::seconds d = 0s; // error
};
}
The error message is:
error : no matching literal operator for call to 'operator""s' with argument of type 'unsigned long long' or 'const char *', and no matching literal operator template std::chrono::seconds d = 0s;
My question is:
I don't want to use namespace std;
in namespace Y
; then, how should I make std::operator""s
visible in namespace Y
?
using namespace ...;
for the first, the second one issue a warning on g++. – Kymric