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 <iostream> | |
#include <functional> | |
#include <string> | |
#include <map> | |
class X; | |
template<class X> | |
class dispatch_traits; |
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 <iostream> | |
#include <string> | |
using namespace std; | |
class Car | |
{ | |
public: | |
Car(const basic_string<char>& _name, int _year) | |
: name(_name), year(_year) |
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 <iostream> | |
#include <string> | |
#include <typeinfo> | |
using namespace std; | |
class Car | |
{ | |
public: | |
Car(const basic_string<char>& _name, int _year) | |
: name(_name), year(_year) |
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 <iostream> | |
#include <utility> | |
#include <tuple> | |
#include <sstream> | |
#include <typeinfo> | |
#include <vector> | |
using namespace std; | |
class Point | |
{ |
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 <iostream> | |
#include <string> | |
template< class ForwardIt1, class ForwardIt2 > | |
bool is_subset(ForwardIt1 first1, ForwardIt1 last1, | |
ForwardIt2 first2, ForwardIt2 last2) | |
{ | |
auto initial = first2; | |
for (; (first1 != last1) && (first2 != last2); ++first1) |
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 <iostream> | |
#include <sstream> | |
static int tied_stream() | |
{ | |
static int i = std::ios_base::xalloc(); return i; | |
} | |
static int first_check() | |
{ |
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 <iostream> | |
#include <functional> | |
class manipulator | |
{ | |
public: | |
template<typename Stream, typename F, typename... Args> | |
manipulator(Stream& os, F&& f, Args&&... args) | |
: callback(std::bind(std::forward<F>(f), std::ref(os), std::forward<Args>(args)...)) | |
{ callback();} |
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 <iostream> | |
static int disable() { | |
static int index(std::ios_base::xalloc()); | |
return index; | |
} | |
class save_buffer | |
{ | |
public: |
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 <iostream> | |
class endl_n_manipulator | |
{ | |
public: | |
endl_n_manipulator(int count) : count(count) { } | |
friend std::ostream& operator<<(std::ostream& os, const endl_n_manipulator& manip) | |
{ | |
std::ostream::sentry s(os); |
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 <iostream> | |
#include <sstream> | |
#include <vector> | |
#include <iterator> | |
template<class charT> | |
class reverse_buffer : public std::basic_stringbuf<charT> | |
{ | |
typedef std::basic_stringbuf<charT> streambuf_type; | |
typedef typename streambuf_type::int_type int_type; |