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
| wash@Pegasus:~/sandbox$ clang++ -cc1 -load ~/ariel/build/default/Profiler/libarielProfiler.so -plugin arielProfiler nested_inst.cpp | |
| foo -> 1 | |
| bar -> 1 | |
| wash@Pegasus:~/sandbox$ cat nested_inst.cpp | |
| template<typename T> | |
| struct bar { | |
| typedef T type; | |
| }; | |
| template<typename T> |
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
| wash@Pegasus:~/sandbox$ clang++ -cc1 -load ~/ariel/build/default/Profiler/libarielProfiler.so -plugin arielProfiler nested_inst.cpp | |
| foo -> 1 | |
| bar -> 1 | |
| wash@Pegasus:~/sandbox$ cat nested_inst.cpp | |
| template<typename T> | |
| struct bar { | |
| typedef T type; | |
| }; | |
| template<typename T> |
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
| wash@Pegasus:~/sandbox/clangtemplate$ cat none.cpp | |
| template<typename T> | |
| struct foo { | |
| typedef T type; | |
| }; | |
| int main (void) { | |
| } |
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
| wash@Pegasus:~/sandbox$ g++ crtp.cpp -o crtp | |
| wash@Pegasus:~/sandbox$ ./crtp | |
| eat! | |
| sift! | |
| compose! | |
| sift! | |
| compose! | |
| compose! | |
| wash@Pegasus:~/sandbox$ cat crtp.cpp | |
| #include <iostream> |
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
| wash@Pegasus:~/nt2/src$ tree | |
| . | |
| `-- nt2 | |
| `-- sdk | |
| |-- config | |
| | `-- version.cpp | |
| |-- details | |
| | `-- timestamp.cpp | |
| `-- memory | |
| |-- allocate.cpp |
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
| //===- llvm/ADT/scoped_ptr.h - basic smart pointer --------------*- C++ -*-===// | |
| // | |
| // The LLVM Compiler Infrastructure | |
| // | |
| // This file is distributed under the University of Illinois Open Source | |
| // License. See LICENSE.TXT for details. | |
| // | |
| //===----------------------------------------------------------------------===// | |
| // | |
| // This file defines the scoped_ptr smart pointer: scoped_ptr mimics a built-in |
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
| //===- llvm/ADT/OwningPtr.h - Smart ptr that owns the pointee ---*- C++ -*-===// | |
| // | |
| // The LLVM Compiler Infrastructure | |
| // | |
| // This file was developed by Chris Lattner and is distributed under the | |
| // University of Illinois Open Source License. See LICENSE.TXT for details. | |
| // | |
| //===----------------------------------------------------------------------===// | |
| // | |
| // This file defines and implements the OwningPtr class. |
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
| start %= kwd("help") [eps[help()]] | |
| / kwd("version") [eps[version()]] | |
| / kwd("include", 0, 1)['=' > *(include >> -lit(','))] | |
| / kwd("input", 0, 1) ['=' > input] | |
| ; |
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
| #include <iostream> | |
| #include <vector> | |
| #include <string> | |
| #include "function_object_adaptor.hpp" | |
| struct base { virtual ~base (void) { } }; | |
| struct element: base { }; |
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<typename Data, typename Function> | |
| struct function_object_adaptor { | |
| public: | |
| typedef typename Function::result_type value_type; | |
| typedef value_type& reference; | |
| typedef value_type* pointer; | |
| private: | |
| Data data; | |
| Function f; |