//********************************************************
// The following code example is taken from the book
//  C++23 - The Complete Guide
//  by Nicolai M. Josuttis (www.josuttis.com)
//  https://www.cppstd23.com
//
// The code is licensed under a
//  Creative Commons Attribution 4.0 International License
//  https://creativecommons.org/licenses/by/4.0/
//********************************************************


#include <iostream>

template<typename T1, typename T2>
void foo(const T1&, const T2&)
{
  std::cout << "different types\n";
}

template<typename T>
void foo(const T&, const T&)
{
  std::cout << "same type\n";
}

int main()
{
  int arr1[3] {};
  int arr2[5] {};  

  foo(arr1, arr2);              // two array of different size passed
  foo(auto(arr1), auto(arr2));  // two pointers of same type passed
}

