Added copylight text.

Refined examples.
This commit is contained in:
Takatoshi Kondo
2015-02-01 21:35:48 +09:00
parent fa231139d7
commit 213ba44b65
8 changed files with 166 additions and 30 deletions

View File

@@ -1,10 +1,28 @@
// MessagePack for C++ example
//
// Copyright (C) 2008-2015 FURUHASHI Sadayuki and KONDO Takatoshi
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include <string>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cassert>
#include <msgpack.hpp>
// msgpack.hpp is also ok
#include <msgpack_fwd.hpp>
class my_class {
@@ -39,6 +57,8 @@ void print(std::string const& buf) {
std::cout << std::endl;
}
#include <msgpack.hpp>
int main() {
my_class my("John Smith", 42);
std::stringstream ss;