I'm trying to define a Struct type, and use it as a _keytype for a mapping.
contract TestContract
{
struct Structure {
bytes32 structure_name;
}
mapping (Structure => address) public test_mapping;
}
Using Solidity real time compiler I get the following error message:
Error: Expected elementary type name for mapping key type
However, according to Solidity's documentation, every data type except for 'mapping' can be used for _keytype:
Mapping types are declared as mapping _KeyType => _ValueType, where _KeyType can be almost any type except for a mapping and _ValueType can actually be any type, including mappings.
Did I understand the documentation wrongly?