mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Fixed limitation example code
This commit is contained in:
parent
dfa3cb44e6
commit
e5b8a19628
1 changed files with 13 additions and 13 deletions
|
|
@ -54,8 +54,8 @@ public:
|
|||
template< typename T >
|
||||
void function_under_test( T t ) // T is supposed to model the previous concept
|
||||
{
|
||||
t.create< int >();
|
||||
t.create< std::string >();
|
||||
t.template create< int >();
|
||||
t.template create< std::string >();
|
||||
}
|
||||
//]
|
||||
|
||||
|
|
@ -65,19 +65,19 @@ MOCK_CLASS( mock_concept )
|
|||
template< typename T >
|
||||
T create();
|
||||
|
||||
template<>
|
||||
int create< int >()
|
||||
{
|
||||
return create_int();
|
||||
}
|
||||
template<>
|
||||
std::string create< std::string >()
|
||||
{
|
||||
return create_string();
|
||||
}
|
||||
|
||||
MOCK_METHOD( create_int, 0, int(), create_int )
|
||||
MOCK_METHOD( create_string, 0, std::string(), create_string )
|
||||
};
|
||||
|
||||
template<>
|
||||
int mock_concept::create< int >()
|
||||
{
|
||||
return create_int();
|
||||
}
|
||||
template<>
|
||||
std::string mock_concept::create< std::string >()
|
||||
{
|
||||
return create_string();
|
||||
}
|
||||
//]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue