C++ Proposal
Let @ become a synonymn for this->
.
- // Example found searching through searching through system source files:
- TYPED_TEST(StorageCache, AddFilePaths)
- {
- /* this */
- auto ids = this->cache.ids( { this->filePath1, this->filePath2, this->filePath3, this->filePath4 } );
- ASSERT_THAT( ids, ElementsAre( this->id1, this->id2, this->id3, this->id4 ) );
- /* vs @ */
- auto ids = @cache.ids( { @filePath1, @filePath2, @filePath3, @filePath4 } );
- ASSERT_THAT( ids, ElementsAre( @id1, @id2, @id3, @id4 ) );
- /* vs nothing */
- auto ids = cache.ids( { filePath1, filePath2, filePath3, filePath4 } );
- ASSERT_THAT( ids, ElementsAre( id1, id2, id3, id4 ) );
- }
- TYPED_TEST(StorageCache, AddFilePaths)
- {
- auto ids = .cache.ids( { .filePath1, .filePath2, .filePath3, .filePath4 } );
- ASSERT_THAT( ids, ElementsAre( .id1, .id2, .id3, .id4 ) );
- }
Thank you for your time and consideration.