-
-
Save elextr/cb78f60a6b3613c901b45e4fa941025f to your computer and use it in GitHub Desktop.
Simple project
This file contains 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 <string> | |
class Hpp { | |
std::string s; | |
public: | |
Hpp(std::string&& st):s(move(st)){} | |
std::string str(){ return s; } | |
size_t size(); | |
~Hpp(){} | |
}; |
This file contains 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
project('Foo', 'cpp') | |
inc = include_directories('inc') | |
subdir('src') |
This file contains 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 <string> | |
#include <iostream> | |
#include "foo.hpp" | |
class Cpp { | |
std::string s; | |
public: | |
Cpp(std::string&& st):s(move(st)){} | |
std::string str(){ return s; } | |
size_t size(); | |
~Cpp(){} | |
}; | |
size_t Cpp::size(){ | |
return s.size(); | |
} | |
size_t Hpp::size(){ | |
return s.size(); | |
} | |
int main(){ | |
Hpp h("foo"); | |
Cpp c("bar"); | |
std::cout<<"h="<<h.str()<<":"<<h.size()<<" c="<<c.str()<<":"<<c.size()<<std::endl; | |
return 0; | |
} |
This file contains 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
executable('foo', 'foo.cpp', include_directories: inc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment