Index: src/Common/CodeLocation.h
===================================================================
--- src/Common/CodeLocation.h	(revision b11d8e252d318eafc0b6d8d5d7ca14620e333aae)
+++ src/Common/CodeLocation.h	(revision 4e8949f3e86a781045a82d44c0fd4e0469048937)
@@ -16,4 +16,5 @@
 #pragma once
 
+#include <iostream>
 #include <string>
 
@@ -44,11 +45,4 @@
 	}
 
-	void unset () {
-		linenumber = -1;
-		filename = "";
-	}
-
-	// Use field access for set.
-
 	bool followedBy( CodeLocation const & other, int seperation ) {
 		return (linenumber + seperation == other.linenumber &&
@@ -65,7 +59,6 @@
 };
 
-inline std::string to_string( const CodeLocation& location ) {
-    // Column number ":1" allows IDEs to parse the error message and position the cursor in the source text.
-    return location.isSet() ? location.filename + ":" + std::to_string(location.linenumber) + ":1 " : "";
+inline std::ostream & operator<<( std::ostream & out, const CodeLocation & location ) {
+	// Column number ":1" allows IDEs to parse the error message and position the cursor in the source text.
+	return location.isSet() ? out << location.filename << ":" << location.linenumber << ":1 " : out;
 }
-
Index: src/Common/SemanticError.cc
===================================================================
--- src/Common/SemanticError.cc	(revision b11d8e252d318eafc0b6d8d5d7ca14620e333aae)
+++ src/Common/SemanticError.cc	(revision 4e8949f3e86a781045a82d44c0fd4e0469048937)
@@ -45,5 +45,5 @@
 	using std::to_string;
 	for( auto err : errors ) {
-		os << to_string( err.location ) << err.description << std::endl;
+		os << err.location << err.description << std::endl;
 	}
 }
