Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > it.comp.lang.c++ > #4634

Re: make_unique, enable_if?

Newsgroups it.comp.lang.c++
Date 2018-04-05 18:53 -0700
References <d42d4d78-870e-4bc7-a61f-3d0888f1c241@googlegroups.com> <pa6jnt$7qq$1@virtdiesel.mng.cu.mi.it>
Message-ID <ceab1a64-e151-4662-a959-317e9d4e6434@googlegroups.com> (permalink)
Subject Re: make_unique, enable_if?
From fmassei@gmail.com

Show all headers | View raw


On Thursday, April 5, 2018 at 9:49:50 PM UTC-4, enoquick wrote:
> Il 05/04/2018 02:55, Emanuele Merlo ha scritto:
> > Qualcuno sa spiegarmi i segreti della definizione di make_unique, in
> > particolare perché c'è "enable_if"?
> 
> hai toccato una delle parti piu complesse e meno conosciute di C++
> La definizione a compile time  di metodi che esistono solo se sono 
> soddisfatte alcune condizioni (in questo caso se _Ty non e' un array)
>

In fondo è il risultato dello stesso argomento di cui parlavamo nell'ultimo
thread, le r-value references.
Il C++11 s'è portato dietro un sacco di novità. Sono comunque 6-7 anni fa.

Ciao!

Back to it.comp.lang.c++ | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

make_unique, enable_if? Emanuele Merlo <emanuele.merlo@gmail.com> - 2018-04-05 00:55 -0700
  Re: make_unique, enable_if? fmassei@gmail.com - 2018-04-05 12:19 -0700
  Re: make_unique, enable_if? enoquick <enoquick@gmail.com> - 2018-04-05 20:49 -0500
    Re: make_unique, enable_if? fmassei@gmail.com - 2018-04-05 18:53 -0700
      Re: make_unique, enable_if? enoquick <enoquick@gmail.com> - 2018-04-05 20:59 -0500

csiph-web