metaprogramming
Template classes with specialised constructors
Consider the following contrived example of a templated array definition: template <typename t, unsigned int n> class TBase[详细]
2023-03-27 15:49 分类:问答read_inheritable_attribute unexpectedly modified in production
This is happening in Rails 3.0.7 and 3.0.9, WEBrick and Apache. I have a module Reportable that has a method that writes an inheritable_attribute:[详细]
2023-03-27 06:11 分类:问答Ruby: export variable into local namespace
I want to programmatically insert a 开发者_开发知识库new variable into the local Ruby namespace. For example, I want to be able to write[详细]
2023-03-26 23:32 分类:问答F# How to compile a code quotation to an assembly
I would like to know if there is a way to compile a code quotation into an assembly? I understand that it is possible to call CompileUntyped() or Compile() on the开发者_开发知识库 Exp<_> object[详细]
2023-03-26 14:15 分类:问答Ruby’s “method_missing” in Python [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: Python equivalent of Ruby's 'method_missing'[详细]
2023-03-26 06:56 分类:问答Macros iterating over undefined Symbols
开发者_JS百科When applying a macro multiple times with a another macro, bare Symbols are not inserted into the current context:[详细]
2023-03-26 05:31 分类:问答F# Loading quotation data from an assembly - the explicitlyRegisterTopDefs function
I would like to understand how to retrieve the quotation from a top level function marked with [<ReflectedDefinition>] from an assembly.[详细]
2023-03-26 03:45 分类:问答Ruby metaprogramming inside model
开发者_开发百科I have a model called Snippet, which contains snippets of HTML to push into views.[详细]
2023-03-25 23:09 分类:问答A language in which everything compiles
I\'m trying to 开发者_运维知识库do some research for a new project, and I need to create objects dynamically from random data.[详细]
2023-03-25 04:39 分类:问答How could my code tell a compile-time constant versus a variable?
Here\'s my problem. I have a BINARY_FLAG macro: #define BINARY_FLAG( n ) ( static_cast<DWORD>( 1 << ( n ) ) )[详细]
2023-03-25 00:12 分类:问答