mirror of
				https://github.com/fmtlib/fmt.git
				synced 2025-11-03 23:51:41 +01:00 
			
		
		
		
	
		
			
	
	
		
			20 lines
		
	
	
		
			456 B
		
	
	
	
		
			C++
		
	
	
	
	
	
		
		
			
		
	
	
			20 lines
		
	
	
		
			456 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| 
								 | 
							
								// Formatting library for C++ - the core API
							 | 
						||
| 
								 | 
							
								//
							 | 
						||
| 
								 | 
							
								// Copyright (c) 2012 - present, Victor Zverovich
							 | 
						||
| 
								 | 
							
								// All rights reserved.
							 | 
						||
| 
								 | 
							
								//
							 | 
						||
| 
								 | 
							
								// For the license information refer to format.h.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include "fmt/ranges.h"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include <vector>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include "gtest/gtest.h"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// call fmt::format from another translation unit to test ODR
							 | 
						||
| 
								 | 
							
								TEST(ranges_odr_test, format_vector) {
							 | 
						||
| 
								 | 
							
								  auto v = std::vector<int>{1, 2, 3, 5, 7, 11};
							 | 
						||
| 
								 | 
							
								  EXPECT_EQ(fmt::format("{}", v), "[1, 2, 3, 5, 7, 11]");
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 |