Leanpub Header

Skip to main content

C++ Moderno

Guía rápida y concisa para programadores

Guía rápida y concisa para programadores que quieran ponerse al día con C++ moderno (C++11, C++14, C++17 y C++20). Colección de buenas prácticas, consejos y muchos ejemplos.

Minimum price

$7.99

$9.99

You pay

$9.99

Author earns

$7.99
$

...Or Buy With Credits!

You can get credits monthly with a Reader Membership
PDF
EPUB
WEB
About

About

About the Book

Este manual está pensado para programadores; gentes venidas de Java, Python, C# u otros lenguajes orientados a objetos. También por supuesto para amantes y profesionales de C/C++ que necesiten una puesta a punto o simplemente refrescar conceptos.

Este manual nació como un intento de poner orden a las distintas notas y apuntes que he ido redactando con el paso de los años. El manual contiene mucha información y muy concentrada. No es un manual de referencia.

Si necesitas refrescar conceptos, ponerte al día, aprender algo nuevo -como metaprogramación o move-semantics- ó si quieres saber las buenas prácticas más útiles, creo que este manual te será de gran ayuda.

Indice de contenidos:

C++ Moderno

Value Semantics

¿Qué es value-semantics?

Referencias

Constructor

Operaciones especiales

La regla del cero

La regla del tres

Move Semantics

¿Qué es move-semantics?

Propiedades de las expresiones

Ctor move y Assign move

Pass-by-value and move idiom

Exchange

Copy&Swap

Metaprogramación

¿Por qué plantillas?

Two-Phase translation

Tipo de retorno

Argumentos por defecto y sobrecarga

Conceptos

Parámetros no tipos

Variadic Template & Folding

Consideraciones básicas

Template parameters dentro de template parameters

Move semantics

Referencia universal con &&

Uso de std::forward

Implementación de std::foward y std::move

Pointer Semantics

Punteros

RAII

Smart Pointers

¿Cuando usar T*?

Ejemplo

Referencias circulares y weak_ptr

Polimorfismo

¿Por qué no hay un Gargabe Collector?

make_unique y make_shared

STL

Componentes

Iteradores

Adaptadores de iteradores

Ejemplo: Zipper

Algoritmos

C++17

Unpack

Limitando el alcance de la variable en if/switch

Class Template Argument Deduction

if constexpr

Buenas prácticas

Struct vs Class

Pasar argumentos

Devolver diferentes valores

Constructor por defecto

Argumentos por defecto

Bajo número de argumentos

No quites ‘const’, usa mutable

La regla del cero

The Big Five

Usa smart_pointers para indicar propiedad

Expresa las ideas directamente en código

Patrones de diseño

Los principios SOLID

Patrones de diseño

Singleton

Observer

Factory Method

Strategy

Adapter

Algoritmia

Partition Scheme

Quicksort

Quickselect

Maximum Subarray Sum

Subset sum

Edit Distance

Grafo

Graph SSSP

Topological Sort

Minimum Spanning Tree

Share this book

Categories

Author

About the Author

Jorge Moreno Aguilera

Programador. C++ / Algoritmia / UE4.

Contents

Table of Contents

C++ Moderno

Value Semantics

  1. ¿Qué es value-semantics?
  2. Referencias
  3. Constructor
  4. Operaciones especiales
  5. La regla del cero
  6. La regla del tres

Move Semantics

  1. ¿Qué es move-semantics?
  2. Propiedades de las expresiones
  3. Ctor move y Assign move
  4. Pass-by-value and move idiom
  5. Exchange
  6. Copy&Swap

Metaprogramación

  1. ¿Por qué plantillas?
  2. Two-Phase translation
  3. Tipo de retorno
  4. Argumentos por defecto y sobrecarga
  5. Conceptos
  6. Parámetros no tipos
  7. Variadic Template & Folding
  8. Consideraciones básicas
  9. Template parameters dentro de template parameters
  10. Move semantics
  11. Referencia universal con &&
  12. Uso de std::forward
  13. Implementación de std::foward y std::move

Pointer Semantics

  1. Punteros
  2. RAII
  3. Smart Pointers
  4. ¿Cuando usar T*?
  5. Ejemplo
  6. Referencias circulares y weak_ptr
  7. Polimorfismo
  8. ¿Por qué no hay un Gargabe Collector?
  9. make_unique y make_shared

STL

  1. Componentes
  2. Iteradores
  3. Adaptadores de iteradores
  4. Ejemplo: Zipper
  5. Algoritmos

C++17 y C++20

  1. Unpack
  2. Limitando el alcance de la variable en if/switch
  3. Class Template Argument Deduction
  4. if constexpr
  5. C++20: Módulos
  6. C++20: Rangos

Buenas prácticas

  1. Struct vs Class
  2. Pasar argumentos
  3. Devolver diferentes valores
  4. Constructor por defecto
  5. Argumentos por defecto
  6. Bajo número de argumentos.
  7. No quites ‘const’, usa mutable.
  8. La regla del cero
  9. The Big Five
  10. Usa smart_pointers para indicar propiedad
  11. Expresa las ideas directamente en código

Patrones de diseño

  1. Los principios SOLID
  2. Patrones de diseño
  3. Singleton
  4. Observer
  5. Factory Method
  6. Strategy
  7. Adapter

Algoritmia

  1. Partition Scheme
  2. Quicksort
  3. Quickselect
  4. Maximum Subarray Sum
  5. Subset sum
  6. Edit Distance
  7. Grafo
  8. Graph SSSP
  9. Topological Sort
  10. Minimum Spanning Tree

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub