diff options
author | Christian <c@ethdev.com> | 2014-10-24 18:42:44 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-10-24 18:42:44 +0800 |
commit | 1ae1fc66e2d02fc17d4148a553a59ead402b9f54 (patch) | |
tree | 4c7378c2d1568a1f4bbffc95ea41bc3529d46be9 /BaseTypes.h | |
parent | 094ee44f721054518ff384aef7cde1afe649636d (diff) | |
download | dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar.gz dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar.bz2 dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar.lz dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar.xz dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.tar.zst dexon-solidity-1ae1fc66e2d02fc17d4148a553a59ead402b9f54.zip |
Use createTypeError everywhere and stream out Location.
Diffstat (limited to 'BaseTypes.h')
-rw-r--r-- | BaseTypes.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/BaseTypes.h b/BaseTypes.h index fdf3f7b5..cfc14c7e 100644 --- a/BaseTypes.h +++ b/BaseTypes.h @@ -22,6 +22,7 @@ #pragma once +#include <ostream> namespace dev { @@ -41,5 +42,11 @@ struct Location int end; }; +/// Stream output for Location (used e.g. in boost exceptions). +inline std::ostream& operator<<(std::ostream& _out, Location const& _location) +{ + return _out << "[" << _location.start << "," << _location.end << ")"; +} + } } |