Created
June 5, 2013 05:55
-
-
Save PkmX/5711872 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <boost/strong_typedef.hpp> | |
BOOST_STRONG_TYPEDEF(std::vector<std::vector<int>>, bitmap) | |
BOOST_STRONG_TYPEDEF(std::vector<std::vector<int>>, heightmap) | |
bitmap load_dog_sprite() | |
{ | |
return {}; | |
} | |
heightmap get_level1_terrain() | |
{ | |
return {}; | |
} | |
void render(const heightmap&, const bitmap&) | |
{ | |
} | |
int main() | |
{ | |
// gcc: error: invalid initialization of reference of type ‘const heightmap&’ from expression of type ‘bitmap’ | |
// clang: note: candidate function not viable: no known conversion from 'bitmap' to 'const heightmap' for 1st argument | |
render(load_dog_sprite(), get_level1_terrain()); | |
// ok | |
render(get_level1_terrain(), load_dog_sprite()); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment