adapted to biicode via biicode.conf, ignore.bii and CMakeLists.txt; mixed Travis

(original and biicode building)
This commit is contained in:
franchuti688
2015-02-09 10:31:22 +01:00
parent cfd476bb8b
commit 7b77eb61b5
7 changed files with 98 additions and 3 deletions

18
biicode/samples/basic.cpp Normal file
View File

@@ -0,0 +1,18 @@
#include "vitaut/cppformat/format.h"
class Date {
int year_, month_, day_;
public:
Date(int year, int month, int day) : year_(year), month_(month), day_(day) {}
friend std::ostream &operator<<(std::ostream &os, const Date &d) {
return os << d.year_ << '-' << d.month_ << '-' << d.day_;
}
};
int main(int argc, char *argv[]){
std::string s = fmt::format("The date is {}", Date(2012, 12, 9));
fmt::print("Hello, {}!", "world"); // uses Python-like format string syntax
fmt::printf("\n%s", s); // uses printf format string syntax
return 0;
}