From 026f4c6024ced642e7fff1949a38657b40a92c45 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 26 Mar 2021 14:41:58 +0100
Subject: [PATCH] SL-14999 - more cpp features tests

---
 indra/newview/tests/cppfeatures_test.cpp | 43 ++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/indra/newview/tests/cppfeatures_test.cpp b/indra/newview/tests/cppfeatures_test.cpp
index bfaa83140df..9f052c11c4f 100644
--- a/indra/newview/tests/cppfeatures_test.cpp
+++ b/indra/newview/tests/cppfeatures_test.cpp
@@ -335,6 +335,49 @@ void cpp_features_test_object_t::test<10>()
 	static_assert(ce_factorial(6)==720, "bad factorial"); // OK
 }
 
+// type aliases
+//
+// https://en.cppreference.com/w/cpp/language/type_alias
+// 
+// You can use the "using" statement to create simpler templates that
+// are aliases for more complex ones. "Template typedef"
+
+// This makes stringmap<T> an alias for std::map<std::string, T>
+template<typename T>
+using stringmap = std::map<std::string, T>;
+
+template<> template<>
+void cpp_features_test_object_t::test<11>()
+{
+	stringmap<S32> name_counts{ {"alice", 3}, {"bob", 2} };
+	ensure("type alias", name_counts["bob"]==2);
+}
+
+
+// nullptr
+
+// enums
+
+// std::unique_ptr and make_unique
+
+// std::shared_ptr and make_shared
+
+// lambdas
+
+// perfect forwarding
+
+// variadic templates
+
+// std::thread
+
+// std::mutex
+
+// thread_local
+
+// rvalue reference &&
+
+// move semantics
 
+// std::move
 
 } // namespace tut
-- 
GitLab