How was this function signature inferred?
The compiler error I'm getting from g++ is
./Debug_gcc_lin64_5610_ST/tom.o: In function `process_P2T_CUST(IPC*)':
/mxhome/charrison/git/libs/tom.cpp:512: undefined reference to
`memorize_block(boost::unordered_map< ... >&, Block const&)'
(Ellipsis mine).
The source code snippet containing the undefined reference is:
void
process_P2T_CUST(IPC *client_ipc) {
// Get list of record types in block
Block& block = client_ipc->get_block();
block.get_record_types(input_record_set);
// Reset associative memory
memory.clear();
// Add all field=value pairs from P2T_CUST into memory
memorize_block(memory, block);
And the header definition of memorize_block is:
void memorize_block(MemoryBank&, Block&);
Now: here's how I interpret the error message - the linker (or actually
the compiler) has somehow inferred that the required signature of
memorize_block() must have parm1 = unordered_map&, and parm2 = Block
const&.
But why does it think that the Block should be const?
If I haven't provided enough source code, please comment and I'll amend
this question accordingly.
No comments:
Post a Comment