I suppose that there is something terribly wrong with this code. It will compile but does not get linked.
#include <iostream>
#include <tuple>
class Table_class
{
public:
constexpr static std::tuple<int, unsigned int, unsigned short> table[3]
= {std::make_tuple(1, 2, 3),
std::make_tuple(4, 5, 6),
std::make_tuple(7, 8, 9)};
};
int main()
{
std::cout << std::get<0>(Table_class::table[0]);
return 0;
}
The error that shows up is this:
[31m/tmp/ccDiIuPv.o: In function `main':
file.cpp:(.text+0x5): undefined reference to `Table_class::table'
collect2: error: ld returned 1 exit status
Compilation Failed
How can this be corrected?