This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Dog {}; | |
struct Husky : public Dog {}; | |
struct Poodle :public Dog {}; | |
template<class T> | |
struct is_husky { | |
static constexpr bool result = false; | |
}; | |
template<> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <bool, typename T = void> | |
struct stop_if{ | |
typedef T type; | |
}; | |
template <typename T> | |
struct stop_if<true, T> {}; | |
struct Dog {}; | |
struct Husky : public Dog {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Dog {}; | |
struct Husky: public Dog {}; | |
struct Poodle:public Dog {}; | |
template<class T> | |
void DogCanBeSmartExceptHusky(const T&& dog) {}; | |
int main() | |
{ | |
DogCanBeSmartExceptHusky( Poodle{} ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
db: | |
image: postgres | |
ports: | |
- 5432:5432 | |
environment: | |
- POSTGRES_USER=postgres | |
- POSTGRES_PASSWORD=postgres | |
# You definitly need some tools to visualize/edit/debug your database right? |