[LAD] Re: [semi-OT} c++20 concepts and syntax

"Jeanette C." <julien-3g/[email protected]>
Newsgroups gmane.linux.audio.devel
Message-ID <[email protected]>
Hi Lars,
Mar 8 2023, Lars Luthman has written:
...
but when you use them as type-constraints the actual type being constrained will be inserted automatically as the first template parameter.
...
>  template <typename T> requires std::convertible_to<T, int>
>  void foo(T t) {}
>
>  template <std::convertible_to<int> T>
>  void foo(T t) {}
>
>  void foo(std::convertible_to<int> auto t) {}
...
Many, many thanks. This was the bit of information I lacked.

Best wishes,

jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

And I love the way with just one whisper
You tell me everything <3
(Britney Spears)
_______________________________________________
Linux-audio-dev mailing list -- linux-audio-dev-cunTk1MwBs/[email protected]
To unsubscribe send an email to linux-audio-dev-leave-cunTk1MwBs/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.