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> | |
| bool f (const bool& b = bool(true)) | |
| { | |
| return b; | |
| } | |
| using namespace std; |
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 <ace/Time_Value.h> | |
| #include <ctime> | |
| #include <iostream> | |
| #include <deque> | |
| #include <vector> | |
| #include <list> | |
| #include <limits> | |
| using namespace std; |
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 <ace/Reactor.h> | |
| #include <iostream> | |
| using namespace std; | |
| // -------------------------------------------------- | |
| // The goal is testing the shedule_timer() function | |
| // correctly triggers an event. | |
| // -------------------------------------------------- |
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> | |
| using namespace std; | |
| // ----------------------------------------------- | |
| // Test the Aggregates propreties with gcc v3.4 | |
| // ----------------------------------------------- | |
| // The rules for a type for being an Aggregates are: | |
| // - No user-defined ctor nor copy ctor. |
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 <boost/array.hpp> | |
| #include <boost/asio.hpp> | |
| using namespace std; | |
| using boost::asio::ip::tcp; | |
| int main(int argc, char *argv[]) | |
| { | |
| cout << "hello world." << endl; |
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 <ctime> | |
| #include <iostream> | |
| #include <string> | |
| #include <boost/asio.hpp> | |
| using boost::asio::ip::tcp; | |
| std::string make_daytime_string() | |
| { | |
| using namespace std; // For time_t, time and ctime; |
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> | |
| using namespace std; | |
| /* Test the decltype feature from c++11 */ | |
| /* /Soft/mag/dev/tools/gcc-4.7.1/bin/g++ --std=c++11 lambdas.cpp && ./a.out */ | |
| // You can't use decltype operator in the return declaration part (why??). | |
| // You need to use it in a special form. After the arrow... | |
| template <typename T1, typename T2> |
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> | |
| using namespace std; | |
| int main() | |
| { | |
| cout << "hello world." << endl; | |
| for ( int i : { 2, 3, 4, 5, 79, 44 } ) | |
| { | |
| cout << i << ", "; |
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> | |
| using namespace std; | |
| /* Test the lambda feature from c++11 */ | |
| /* /Soft/mag/dev/tools/gcc-4.7.1/bin/g++ --std=c++11 lambdas.cpp && ./a.out */ | |
| int main() | |
| { | |
| cout << "hello world." << endl; |
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 <boost/asio.hpp> | |
| // g++ -I /Soft/mag/dev/tools/boost-1.48.0/include/ -L /Soft/mag/dev/tools/boost-1.48.0/lib/ -l boost_system -lpthread client.cpp -o client | |
| using namespace std; | |
| using namespace boost; | |
| using namespace boost::asio; | |
| using namespace boost::asio::ip; |