Coder Social home page Coder Social logo

apress / design-patterns-in-modern-cpp Goto Github PK

View Code? Open in Web Editor NEW
525.0 35.0 189.0 260 KB

Source code for 'Design Patterns in Modern C++' by Dmitri Nesteruk

Home Page: http://www.apress.com/9781484236024

License: Other

C++ 96.23% C 0.79% C# 0.91% HTML 2.06%

design-patterns-in-modern-cpp's Introduction

Apress Source Code

This repository accompanies Design Patterns in Modern C++ by Dmitri Nesteruk (Apress, 2018).

Download the files as a zip using the green button, or clone the repository to your machine using Git.

Releases

Release v1.0 corresponds to the code in the published book, without corrections or updates.

Contributions

See the file Contributing.md for more information on how you can contribute to this repository.

design-patterns-in-modern-cpp's People

Contributors

gwens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

design-patterns-in-modern-cpp's Issues

bridge.cpp

I don't think the main() from bridge.cpp goes with bridge.cpp

unique_ptr lifetime bug in Builder.cpp

In Builder.cpp

  auto builder2 = HtmlElement::build("ul")
    ->add_child_2("li", "hello")->add_child_2("li", "world");
  cout << builder2 << endl;

builder2 doesn't store unique_ptr returned by HtmlElement::build, but stores HtmlBuilder* returned by add_child2.
unique_ptr is destroyed before call to cout and builder2 contains pointer to freed memory (address sanitizer error - heap use after free).

Solution: Increase unique_ptr lifetime by storing in local variable.

  auto builder = HtmlElement::build("ul");
  auto builder2 = builder->add_child_2("li", "hello")->add_child_2("li", "world");
  cout << builder2->str() << endl;

composite - neurons

I have a problem with compilation under gcc:

invalid use of incomplete type struct 'Neuron'.

In template struct SomeNeurons the compiler points from and to as problematic.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.