13 #include <gtest/gtest.h> 14 #include "../../include/ecl/utilities/references.hpp" 28 class ReferenceDummy {
43 using ecl::utilities::tests::ReferenceDummy;
49 TEST(Reference,usage) {
52 ReferenceWrapper<int> wrapper(i);
57 TEST(Reference,traits) {
58 EXPECT_TRUE(is_reference_wrapper< ReferenceWrapper<int> >::value);
62 TEST(Reference,functions) {
64 ReferenceWrapper<int> refd =
ref(i);
65 ReferenceWrapper<int const> crefd =
cref(i);
74 int main(
int argc,
char **argv) {
75 testing::InitGoogleTest(&argc,argv);
76 return RUN_ALL_TESTS();
Embedded control libraries.
ReferenceWrapper< T const > cref(T const &wrapped_object)
Provides a wrapper which allows the original object to be passed like a reference.
TEST(TypeTests, fundamentals)
int main(int argc, char **argv)
Default action for detection of the reference wrapper type trait (false).
ReferenceWrapper< T > ref(T &wrapped_object)