Pages tagged #include

by . Last updated .

1. Tuesday 12th May 2015
Tuesday 12th May 2015: 5.46pm. Link shared: https://github.com/boostorg/test As part of publicising my C++ Now 2015 talk next week, here is part 9 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:9. MAINTENANCE: Consider making it possible to use an XML outputting unit testing framework, even if not enabled by defaultA very noticeable trend in the libraries reviewed above is that around half use good old C assert() and static_assert() instead of a unit testing framework. ...

2. Friday 15th May 2015
Friday 15th May 2015: 4.23pm. Link shared: https://en.wikipedia.org/wiki/Policy-based_design As part of publicising my C++ Now 2015 talk this week, here is part 14 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:14. DESIGN: Consider making (more) use of ADL C++ namespace composure as a design patternMost C++ programmers are aware of C++ template policy based design. This example is taken from https://en.wikipedia.org/wiki/Policy-based_design:#include <iostream>#include <string> template <typename OutputPolicy, typename LanguagePolicy>class HelloWorld : private OutputPolicy, private LanguagePolicy{ using OutputPolicy::print; using LanguagePolicy::message; public: // Behaviour method void run() const { // Two policy methods print(message()); }}; class OutputPolicyWriteToCout{protected: template<typename MessageType> void print(MessageType const &message) const { std::cout << message << std::endl; }}; class LanguagePolicyEnglish{protected: std::string message() const { return " ...

3. Friday 15th May 2015
Friday 15th May 2015: 4.23pm. Link shared: https://en.wikipedia.org/wiki/Policy-based_design As part of publicising my C++ Now 2015 talk this week, here is part 14 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:14. DESIGN: Consider making (more) use of ADL C++ namespace composure as a design patternMost C++ programmers are aware of C++ template policy based design. This example is taken from https://en.wikipedia.org/wiki/Policy-based_design:#include <iostream>#include <string> template <typename OutputPolicy, typename LanguagePolicy>class HelloWorld : private OutputPolicy, private LanguagePolicy{ using OutputPolicy::print; using LanguagePolicy::message; public: // Behaviour method void run() const { // Two policy methods print(message()); }}; class OutputPolicyWriteToCout{protected: template<typename MessageType> void print(MessageType const &message) const { std::cout << message << std::endl; }}; class LanguagePolicyEnglish{protected: std::string message() const { return " ...

4. Friday 15th May 2015
Friday 15th May 2015: 4.23pm. Link shared: https://en.wikipedia.org/wiki/Policy-based_design As part of publicising my C++ Now 2015 talk this week, here is part 14 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:14. DESIGN: Consider making (more) use of ADL C++ namespace composure as a design patternMost C++ programmers are aware of C++ template policy based design. This example is taken from https://en.wikipedia.org/wiki/Policy-based_design:#include <iostream>#include <string> template <typename OutputPolicy, typename LanguagePolicy>class HelloWorld : private OutputPolicy, private LanguagePolicy{ using OutputPolicy::print; using LanguagePolicy::message; public: // Behaviour method void run() const { // Two policy methods print(message()); }}; class OutputPolicyWriteToCout{protected: template<typename MessageType> void print(MessageType const &message) const { std::cout << message << std::endl; }}; class LanguagePolicyEnglish{protected: std::string message() const { return " ...

5. Friday 15th May 2015
Friday 15th May 2015: 4.23pm. Link shared: https://en.wikipedia.org/wiki/Policy-based_design As part of publicising my C++ Now 2015 talk this week, here is part 14 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:14. DESIGN: Consider making (more) use of ADL C++ namespace composure as a design patternMost C++ programmers are aware of C++ template policy based design. This example is taken from https://en.wikipedia.org/wiki/Policy-based_design:#include <iostream>#include <string> template <typename OutputPolicy, typename LanguagePolicy>class HelloWorld : private OutputPolicy, private LanguagePolicy{ using OutputPolicy::print; using LanguagePolicy::message; public: // Behaviour method void run() const { // Two policy methods print(message()); }}; class OutputPolicyWriteToCout{protected: template<typename MessageType> void print(MessageType const &message) const { std::cout << message << std::endl; }}; class LanguagePolicyEnglish{protected: std::string message() const { return " ...

6. Tuesday 19th May 2015
Tuesday 19th May 2015: 5.00pm. Link shared: https://github.com/sakra/cotire As part of publicising my C++ Now 2015 talk last week, here is part 15 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:15. BUILD: Consider defaulting to header only, but actively manage facilities for reducing build timesMaking your library header only is incredibly convenient for your users - they simply drop in a copy of your project and get to work, no build system worries. ...

7. Tuesday 19th May 2015
Tuesday 19th May 2015: 5.00pm. Link shared: https://github.com/sakra/cotire As part of publicising my C++ Now 2015 talk last week, here is part 15 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:15. BUILD: Consider defaulting to header only, but actively manage facilities for reducing build timesMaking your library header only is incredibly convenient for your users - they simply drop in a copy of your project and get to work, no build system worries. ...

8. Tuesday 19th May 2015
Tuesday 19th May 2015: 5.00pm. Link shared: https://github.com/sakra/cotire As part of publicising my C++ Now 2015 talk last week, here is part 15 of 20 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:15. BUILD: Consider defaulting to header only, but actively manage facilities for reducing build timesMaking your library header only is incredibly convenient for your users - they simply drop in a copy of your project and get to work, no build system worries. ...

9. Thursday 28th May 2015
Thursday 28th May 2015: 6.22pm. Link shared: https://github.com/BoostGSoC13/boost.afio/blob/master/include/boost/afio/config.hpp As part of publicising my C++ Now 2015 talk two weeks ago, here is part 16 of 19 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:16. COUPLING: Consider allowing your library users to dependency inject your dependencies on other librariesAs mentioned earlier, the libraries reviewed overwhelmingly chose to use STL11 over any equivalent Boost libraries, so hardcoded std::thread instead of boost::thread, hardcoded std::shared_ptr over boost::shared_ptr and so on. ...

10. Thursday 28th May 2015
Thursday 28th May 2015: 6.22pm. Link shared: https://github.com/BoostGSoC13/boost.afio/blob/master/include/boost/afio/config.hpp As part of publicising my C++ Now 2015 talk two weeks ago, here is part 16 of 19 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:16. COUPLING: Consider allowing your library users to dependency inject your dependencies on other librariesAs mentioned earlier, the libraries reviewed overwhelmingly chose to use STL11 over any equivalent Boost libraries, so hardcoded std::thread instead of boost::thread, hardcoded std::shared_ptr over boost::shared_ptr and so on. ...

11. Thursday 28th May 2015
Thursday 28th May 2015: 6.22pm. Link shared: https://github.com/BoostGSoC13/boost.afio/blob/master/include/boost/afio/config.hpp As part of publicising my C++ Now 2015 talk two weeks ago, here is part 16 of 19 from its accompanying Handbook of Examples of Best Practice for C++ 11/14 (Boost) libraries:16. COUPLING: Consider allowing your library users to dependency inject your dependencies on other librariesAs mentioned earlier, the libraries reviewed overwhelmingly chose to use STL11 over any equivalent Boost libraries, so hardcoded std::thread instead of boost::thread, hardcoded std::shared_ptr over boost::shared_ptr and so on. ...

12. Thursday 26th May 2016
Thursday 26th May 2016: 8.20am. Link shared: http://melpon.org/wandbox/permlink/4rJCUypvBbGGFTqx I'm not a natural C++ metaprogrammer, so it took me two mornings before work to come up with this of which I am quite proud:```#include <stdio.h>#include <string>template <class... Args> struct Foo {};template <class T, class... Args> struct Foo<T, Args...> { T v; Foo<Args...> rest;};template <class T> struct Foo<T> { T v; };namespace detail {template <size_t N, class T, class... Args> struct getFoo { constexpr auto operator()(const Foo<T, Args. ...

13. Thursday 26th May 2016
Thursday 26th May 2016: 8.20am. Link shared: http://melpon.org/wandbox/permlink/4rJCUypvBbGGFTqx I'm not a natural C++ metaprogrammer, so it took me two mornings before work to come up with this of which I am quite proud:```#include <stdio.h>#include <string>template <class... Args> struct Foo {};template <class T, class... Args> struct Foo<T, Args...> { T v; Foo<Args...> rest;};template <class T> struct Foo<T> { T v; };namespace detail {template <size_t N, class T, class... Args> struct getFoo { constexpr auto operator()(const Foo<T, Args. ...


Contact the webmaster: Niall Douglas @ webmaster2<at symbol>nedprod.com (Last updated: 2016-05-26 08:20:29 +0000 UTC)